Skip to content

Commit 52d1081

Browse files
committed
Run internal tests in Cygwin
1 parent 727c1f5 commit 52d1081

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

.github/workflows/testing.yml

+37
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,40 @@ jobs:
320320
shell: bash
321321
run: |
322322
test/run-tests.sh
323+
324+
cygwin:
325+
strategy:
326+
matrix:
327+
bits: [32, 64]
328+
include:
329+
- bits: 32
330+
arch: x86
331+
- bits: 64
332+
arch: x86_64
333+
fail-fast: false
334+
runs-on: windows-2019
335+
timeout-minutes: 30
336+
steps:
337+
- name: Checkout repo
338+
uses: actions/checkout@v4
339+
- name: Setup Cygwin
340+
uses: cygwin/cygwin-install-action@v4
341+
with:
342+
platform: ${{ matrix.arch }}
343+
packages: >-
344+
bison
345+
gcc-g++
346+
libpng-devel
347+
make
348+
pkg-config
349+
- name: Build & install using Make
350+
shell: C:\cygwin\bin\bash.exe '{0}'
351+
run: | # Cygwin does not support `make develop` sanitizers ASan or UBSan
352+
PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
353+
make -kj Q=
354+
make install -j Q=
355+
- name: Run tests
356+
shell: C:\cygwin\bin\bash.exe '{0}'
357+
run: |
358+
PATH="/usr/bin:$(cygpath "${SYSTEMROOT}")/System32"
359+
test/run-tests.sh --only-internal

test/run-tests.sh

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ cd "$(dirname "$0")"
66
usage() {
77
echo "Runs regression tests on RGBDS."
88
echo "Options:"
9-
echo " -h, --help show this help message"
10-
echo " --only-free skip tests that build nonfree codebases"
9+
echo " -h, --help show this help message"
10+
echo " --only-free skip tests that build nonfree codebases"
11+
echo " --only-internal skip tests that build external codebases"
1112
}
1213

1314
# Parse options in pure Bash because macOS `getopt` is stuck
1415
# in what util-linux `getopt` calls `GETOPT_COMPATIBLE` mode
1516
nonfree=true
17+
external=true
1618
FETCH_TEST_DEPS="fetch-test-deps.sh"
1719
while [[ $# -gt 0 ]]; do
1820
case "$1" in
@@ -24,6 +26,9 @@ while [[ $# -gt 0 ]]; do
2426
nonfree=false
2527
FETCH_TEST_DEPS="fetch-test-deps.sh --only-free"
2628
;;
29+
--only-internal)
30+
external=false
31+
;;
2732
--)
2833
break
2934
;;
@@ -49,6 +54,10 @@ for dir in asm link fix gfx; do
4954
popd
5055
done
5156

57+
if ! "$external"; then
58+
exit
59+
fi
60+
5261
# Test some significant external projects that use RGBDS
5362
# When adding new ones, don't forget to add them to the .gitignore!
5463
# When updating subprojects, change the commit being checked out, and set the `shallow-since`

0 commit comments

Comments
 (0)