File tree 5 files changed +48
-11
lines changed
5 files changed +48
-11
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,29 @@ jobs:
354
354
make install -j Q=
355
355
- name : Run tests
356
356
shell : C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -o igncr '{0}'
357
- run : | # Allow asm/test.sh to run `git describe` for the version test
358
- git config --global --add safe.directory '*'
357
+ run : |
359
358
test/run-tests.sh --only-internal
359
+
360
+ freebsd :
361
+ runs-on : ubuntu-latest
362
+ timeout-minutes : 30
363
+ steps :
364
+ - name : Checkout repo
365
+ uses : actions/checkout@v4
366
+ - name : Build & test on FreeBSD
367
+ uses : vmactions/freebsd-vm@v1
368
+ with :
369
+ release : " 15.0"
370
+ usesh : true
371
+ prepare : | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan
372
+ pkg install -y \
373
+ bash \
374
+ bison \
375
+ cmake \
376
+ git \
377
+ png
378
+ run : |
379
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF
380
+ cmake --build build -j4 --verbose
381
+ cmake --install build --verbose
382
+ cmake --build build --target test
Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: MIT
2
2
3
- OPTION (USE_NONFREE_TESTS "run tests that build nonfree codebases" ON )
3
+ option (USE_NONFREE_TESTS "run tests that build nonfree codebases" ON )
4
+ option (USE_EXTERNAL_TESTS "run tests that build external codebases" ON )
4
5
5
6
if (NOT USE_NONFREE_TESTS)
6
7
set (ONLY_FREE "--only-free" )
7
8
endif ()
9
+ if (NOT USE_EXTERNAL_TESTS)
10
+ set (ONLY_INTERNAL "--only-internal" )
11
+ endif ()
8
12
9
13
add_executable (randtilegen gfx/randtilegen.cpp)
10
14
add_executable (rgbgfx_test gfx/rgbgfx_test.cpp)
@@ -27,6 +31,6 @@ foreach(TARGET randtilegen rgbgfx_test)
27
31
endforeach ()
28
32
29
33
add_test (NAME all
30
- COMMAND ./run-tests.sh ${ONLY_FREE}
34
+ COMMAND ./run-tests.sh ${ONLY_FREE} ${ONLY_INTERNAL}
31
35
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
32
36
)
Original file line number Diff line number Diff line change 1
- set (CTEST_CUSTOM_PRE_TEST "bash -c 'cd @CMAKE_CURRENT_SOURCE_DIR@\; ./fetch-test-deps.sh @ONLY_FREE@'" )
1
+ set (CTEST_CUSTOM_PRE_TEST "bash -c 'cd @CMAKE_CURRENT_SOURCE_DIR@\; ./fetch-test-deps.sh @ONLY_FREE@ @ONLY_INTERNAL@ '" )
Original file line number Diff line number Diff line change @@ -6,16 +6,18 @@ cd "$(dirname "$0")"
6
6
usage () {
7
7
echo " Downloads source code of Game Boy programs used as RGBDS test cases."
8
8
echo " Options:"
9
- echo " -h, --help show this help message"
10
- echo " --only-free download only freely licensed codebases"
11
- echo " --get-deps install programs' own dependencies instead of themselves"
12
- echo " --get-hash print programs' commit hashes instead of downloading them"
13
- echo " --get-paths print programs' GitHub paths instead of downloading them"
9
+ echo " -h, --help show this help message"
10
+ echo " --only-free download only freely licensed codebases"
11
+ echo " --only-internal do not download any codebases"
12
+ echo " --get-deps install programs' own dependencies instead of themselves"
13
+ echo " --get-hash print programs' commit hashes instead of downloading them"
14
+ echo " --get-paths print programs' GitHub paths instead of downloading them"
14
15
}
15
16
16
17
# Parse options in pure Bash because macOS `getopt` is stuck
17
18
# in what util-linux `getopt` calls `GETOPT_COMPATIBLE` mode
18
19
nonfree=true
20
+ external=true
19
21
actionname=
20
22
osname=
21
23
while [[ $# -gt 0 ]]; do
@@ -27,6 +29,9 @@ while [[ $# -gt 0 ]]; do
27
29
--only-free)
28
30
nonfree=false
29
31
;;
32
+ --only-internal)
33
+ external=false
34
+ ;;
30
35
--get-deps)
31
36
actionname=" $1 "
32
37
shift
@@ -97,6 +102,10 @@ case "$actionname" in
97
102
}
98
103
esac
99
104
105
+ if ! " $external " ; then
106
+ exit
107
+ fi
108
+
100
109
if " $nonfree " ; then
101
110
action pret pokecrystal 2024-12-28 86a87a355e6805663cfecf150a3af71c66441a3e
102
111
action pret pokered 2024-12-26 f023c68417ff0b14db1ab28ecff67f8d123ede44
Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ while [[ $# -gt 0 ]]; do
24
24
;;
25
25
--only-free)
26
26
nonfree=false
27
- FETCH_TEST_DEPS=" fetch-test-deps.sh --only-free"
27
+ FETCH_TEST_DEPS=" $FETCH_TEST_DEPS --only-free"
28
28
;;
29
29
--only-internal)
30
30
external=false
31
+ FETCH_TEST_DEPS=" $FETCH_TEST_DEPS --only-internal"
31
32
;;
32
33
--)
33
34
break
You can’t perform that action at this time.
0 commit comments