mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add gb-starter-kit to test suite, excluding it on Windows, macOS, and BSD (#1753)
This commit is contained in:
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
test/fetch-test-deps.sh --get-deps ubuntu
|
test/fetch-test-deps.sh --get-deps ubuntu
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: |
|
run: |
|
||||||
contrib/coverage.bash false
|
contrib/coverage.bash ubuntu-ci
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
10
.github/workflows/testing.yml
vendored
10
.github/workflows/testing.yml
vendored
@@ -69,7 +69,7 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
CXX=${{ matrix.cxx }} test/run-tests.sh
|
CXX=${{ matrix.cxx }} test/run-tests.sh --os ${{ matrix.os }}
|
||||||
|
|
||||||
macos-static:
|
macos-static:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
@@ -121,7 +121,7 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
test/run-tests.sh
|
test/run-tests.sh --os macos
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -212,7 +212,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cp bins/* .
|
cp bins/* .
|
||||||
cp bins/*.dll test/gfx
|
cp bins/*.dll test/gfx
|
||||||
test/run-tests.sh
|
test/run-tests.sh --os ${{ matrix.os }}
|
||||||
|
|
||||||
windows-mingw-build:
|
windows-mingw-build:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -319,7 +319,7 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
test/run-tests.sh
|
test/run-tests.sh --os ${{ matrix.os }}
|
||||||
|
|
||||||
cygwin:
|
cygwin:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -382,7 +382,7 @@ jobs:
|
|||||||
git \
|
git \
|
||||||
png
|
png
|
||||||
run: | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan
|
run: | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan
|
||||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF -DOS=bsd
|
||||||
cmake --build build -j4 --verbose
|
cmake --build build -j4 --verbose
|
||||||
cmake --install build --verbose
|
cmake --install build --verbose
|
||||||
cmake --build build --target test
|
cmake --build build --target test
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ make coverage -j
|
|||||||
# Run the tests
|
# Run the tests
|
||||||
pushd test
|
pushd test
|
||||||
./fetch-test-deps.sh
|
./fetch-test-deps.sh
|
||||||
./run-tests.sh
|
if [[ $# -eq 0 ]]; then
|
||||||
|
./run-tests.sh
|
||||||
|
else
|
||||||
|
./run-tests.sh --os "$1"
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Generate coverage logs
|
# Generate coverage logs
|
||||||
@@ -21,7 +25,7 @@ lcov -r "$COVERAGE_INFO" src/asm/parser.{hpp,cpp} src/link/script.{hpp,cpp} -o "
|
|||||||
genhtml --dark-mode -f -s -o coverage/ "$COVERAGE_INFO"
|
genhtml --dark-mode -f -s -o coverage/ "$COVERAGE_INFO"
|
||||||
|
|
||||||
# Check whether running from coverage.yml workflow
|
# Check whether running from coverage.yml workflow
|
||||||
if [ "$1" != "false" ]; then
|
if [ "$1" != "ubuntu-ci" ]; then
|
||||||
# Open report in web browser
|
# Open report in web browser
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
open coverage/index.html
|
open coverage/index.html
|
||||||
|
|||||||
1
test/.gitignore
vendored
1
test/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/gb-starter-kit/
|
||||||
/LADX-Disassembly/
|
/LADX-Disassembly/
|
||||||
/libbet/
|
/libbet/
|
||||||
/pokecrystal/
|
/pokecrystal/
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ endif()
|
|||||||
if(NOT USE_EXTERNAL_TESTS)
|
if(NOT USE_EXTERNAL_TESTS)
|
||||||
set(ONLY_INTERNAL "--only-internal")
|
set(ONLY_INTERNAL "--only-internal")
|
||||||
endif()
|
endif()
|
||||||
|
if(DEFINED OS)
|
||||||
|
set(OS_NAME "--os" "${OS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(randtilegen gfx/randtilegen.cpp)
|
add_executable(randtilegen gfx/randtilegen.cpp)
|
||||||
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
||||||
@@ -31,6 +34,6 @@ foreach(TARGET randtilegen rgbgfx_test)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_test(NAME all
|
add_test(NAME all
|
||||||
COMMAND ./run-tests.sh ${ONLY_FREE} ${ONLY_INTERNAL}
|
COMMAND ./run-tests.sh ${ONLY_FREE} ${ONLY_INTERNAL} ${OS_NAME}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ case "$actionname" in
|
|||||||
|
|
||||||
action() { # owner repo shallow-since commit
|
action() { # owner repo shallow-since commit
|
||||||
if [ ! -d "$2" ]; then
|
if [ ! -d "$2" ]; then
|
||||||
git clone "https://github.com/$1/$2.git" --shallow-since="$3" --single-branch
|
git clone "https://github.com/$1/$2.git" --recursive --shallow-since="$3" --single-branch
|
||||||
fi
|
fi
|
||||||
pushd "$2"
|
pushd "$2"
|
||||||
git checkout -f "$4"
|
git checkout -f "$4"
|
||||||
@@ -114,3 +114,4 @@ fi
|
|||||||
action AntonioND ucity 2025-05-30 83e5c697cbd9e10a0bc72b02bcb6146c35e2c328
|
action AntonioND ucity 2025-05-30 83e5c697cbd9e10a0bc72b02bcb6146c35e2c328
|
||||||
action pinobatch libbet 2025-05-20 bb6cfc026644aa1034eee6d9c49bb4705601c9f6
|
action pinobatch libbet 2025-05-20 bb6cfc026644aa1034eee6d9c49bb4705601c9f6
|
||||||
action LIJI32 SameBoy 2025-06-28 33d237706e18d92fb79e3fd7313d5181d8a806cd
|
action LIJI32 SameBoy 2025-06-28 33d237706e18d92fb79e3fd7313d5181d8a806cd
|
||||||
|
action ISSOtm gb-starter-kit 2025-06-13 3cce3215b0bcb559a5cf4ca5916e2d817d53ff29
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
# Game Boy release date, 1989-04-21T12:34:56Z (for reproducible test results)
|
||||||
|
export SOURCE_DATE_EPOCH=609165296
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -20,6 +25,7 @@ nonfree=true
|
|||||||
internal=true
|
internal=true
|
||||||
external=true
|
external=true
|
||||||
installedrgbds=false
|
installedrgbds=false
|
||||||
|
osname=
|
||||||
FETCH_TEST_DEPS="fetch-test-deps.sh"
|
FETCH_TEST_DEPS="fetch-test-deps.sh"
|
||||||
RGBDS_PATH="RGBDS=../../"
|
RGBDS_PATH="RGBDS=../../"
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@@ -43,6 +49,10 @@ while [[ $# -gt 0 ]]; do
|
|||||||
installedrgbds=true
|
installedrgbds=true
|
||||||
RGBDS_PATH=
|
RGBDS_PATH=
|
||||||
;;
|
;;
|
||||||
|
--os)
|
||||||
|
shift
|
||||||
|
osname="$1"
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
@@ -122,3 +132,8 @@ fi
|
|||||||
test_downstream AntonioND ucity all ucity.gbc d2f4a7db48ee208b1bd69a78bd492a1c9ac4a030
|
test_downstream AntonioND ucity all ucity.gbc d2f4a7db48ee208b1bd69a78bd492a1c9ac4a030
|
||||||
test_downstream pinobatch libbet all libbet.gb f117089aa056600e2d404bbcbac96b016fc64611
|
test_downstream pinobatch libbet all libbet.gb f117089aa056600e2d404bbcbac96b016fc64611
|
||||||
test_downstream LIJI32 SameBoy bootroms build/bin/BootROMs/cgb_boot.bin 113903775a9d34b798c2f8076672da6626815a91
|
test_downstream LIJI32 SameBoy bootroms build/bin/BootROMs/cgb_boot.bin 113903775a9d34b798c2f8076672da6626815a91
|
||||||
|
# gb-starter kit make fails on Windows: https://github.com/ISSOtm/gb-starter-kit/issues/1
|
||||||
|
# gb-starter-kit fails with macOS/BSD make: https://github.com/ISSOtm/gb-starter-kit/issues/29
|
||||||
|
if [[ "${osname%-*}" != "windows" && "${osname%-*}" != "macos" && "${osname%-*}" != "bsd" ]]; then
|
||||||
|
test_downstream ISSOtm gb-starter-kit all bin/boilerplate.gb b4f130169ba73284e0d0e71b53e7baa4eca2f7fe
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user