File tree 5 files changed +47
-9
lines changed
5 files changed +47
-9
lines changed Original file line number Diff line number Diff line change @@ -357,3 +357,27 @@ jobs:
357
357
run : | # Allow asm/test.sh to run `git describe` for the version test
358
358
git config --global --add safe.directory '*'
359
359
test/run-tests.sh --only-internal
360
+
361
+ freebsd :
362
+ runs-on : ubuntu-latest
363
+ timeout-minutes : 30
364
+ steps :
365
+ - name : Checkout repo
366
+ uses : actions/checkout@v4
367
+ - name : Build & test on FreeBSD
368
+ uses : vmactions/freebsd-vm@v1
369
+ with :
370
+ release : " 15.0"
371
+ usesh : true
372
+ prepare : | # Do not use `make develop` sanitizers ASan or UBSan
373
+ pkg install -y \
374
+ bash \
375
+ bison \
376
+ cmake \
377
+ git \
378
+ png
379
+ run : |
380
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF
381
+ cmake --build build -j4 --verbose
382
+ cmake --install build --verbose
383
+ 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