mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-21 21:27:05 +00:00
Try to automatically determine the test OS name
This commit is contained in:
@@ -72,7 +72,7 @@ jobs:
|
|||||||
# Note that since this is specific to our CI environment, the workaround is
|
# Note that since this is specific to our CI environment, the workaround is
|
||||||
# better applied here than in our CMakeLists, where it could affect and break someone else.
|
# better applied here than in our CMakeLists, where it could affect and break someone else.
|
||||||
run: |
|
run: |
|
||||||
CXX=${{ matrix.cxx }} cmake -B build -G Ninja --preset develop -DCMAKE_FIND_FRAMEWORK=LAST -DTESTS_OS_NAME=${{ matrix.os }}
|
CXX=${{ matrix.cxx }} cmake -B build -G Ninja --preset develop -DCMAKE_FIND_FRAMEWORK=LAST
|
||||||
cmake --build build -- -k 0
|
cmake --build build -- -k 0
|
||||||
- name: Install using CMake
|
- name: Install using CMake
|
||||||
if: matrix.buildsys == 'cmake'
|
if: matrix.buildsys == 'cmake'
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -G Ninja --preset macos-static -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}" -DTESTS_OS_NAME=macos
|
cmake -B build -G Ninja --preset macos-static -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}"
|
||||||
cmake --build build -- -k 0
|
cmake --build build -- -k 0
|
||||||
env:
|
env:
|
||||||
LDFLAGS: -fuse-ld=lld # cmake/macos-static.cmake comments explain why we use lld.
|
LDFLAGS: -fuse-ld=lld # cmake/macos-static.cmake comments explain why we use lld.
|
||||||
@@ -197,7 +197,7 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: | # ASan seems to be broken on Windows, so we disable it.
|
run: | # ASan seems to be broken on Windows, so we disable it.
|
||||||
call .github\scripts\msvc-env.bat ${{ matrix.bits }}
|
call .github\scripts\msvc-env.bat ${{ matrix.bits }}
|
||||||
cmake -B build -G Ninja --preset develop -DSANITIZERS=OFF -DTESTS_OS_NAME=${{ matrix.os }} ^
|
cmake -B build -G Ninja --preset develop -DSANITIZERS=OFF ^
|
||||||
-DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}" -DCMAKE_C_FLAGS="/nologo"
|
-DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}" -DCMAKE_C_FLAGS="/nologo"
|
||||||
cmake --build build -- -k 0
|
cmake --build build -- -k 0
|
||||||
- name: Install
|
- name: Install
|
||||||
@@ -399,7 +399,7 @@ jobs:
|
|||||||
prepare: |
|
prepare: |
|
||||||
.github/scripts/install_deps.sh freebsd
|
.github/scripts/install_deps.sh freebsd
|
||||||
run: | # Leak detection is not supported on FreeBSD, so disable it.
|
run: | # Leak detection is not supported on FreeBSD, so disable it.
|
||||||
cmake -B build --preset develop -DTESTS_OS_NAME=freebsd
|
cmake -B build --preset develop
|
||||||
cmake --build build --verbose -- -k -j 4
|
cmake --build build --verbose -- -k -j 4
|
||||||
ASAN_OPTIONS=detect_leaks=0 ctest --test-dir build --schedule-random --label-exclude external
|
ASAN_OPTIONS=detect_leaks=0 ctest --test-dir build --schedule-random --label-exclude external
|
||||||
cmake --install build --verbose
|
cmake --install build --verbose
|
||||||
|
|||||||
+9
-2
@@ -1,6 +1,13 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
set(TESTS_OS_NAME "" CACHE STRING "Skip running tests known to fail on this OS.")
|
if(DEFINED TESTS_OS_NAME)
|
||||||
|
# Avoid re-computing the default value if the cache entry already exists.
|
||||||
|
elseif(APPLE)
|
||||||
|
set(TESTS_OS_NAME "macos-${CMAKE_SYSTEM_VERSION}")
|
||||||
|
else()
|
||||||
|
string(TOLOWER "${CMAKE_SYSTEM}" TESTS_OS_NAME)
|
||||||
|
endif()
|
||||||
|
set(TESTS_OS_NAME "${TESTS_OS_NAME}" CACHE STRING "Skip running tests known to fail on this OS.")
|
||||||
|
|
||||||
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)
|
||||||
@@ -69,6 +76,6 @@ endforeach()
|
|||||||
|
|
||||||
# gb-starter kit fails with any `make` on Windows: https://codeberg.org/ISSOtm/gb-starter-kit/issues/1
|
# gb-starter kit fails with any `make` on Windows: https://codeberg.org/ISSOtm/gb-starter-kit/issues/1
|
||||||
# gb-starter-kit fails with macOS/BSD `make`: https://codeberg.org/ISSOtm/gb-starter-kit/issues/29
|
# gb-starter-kit fails with macOS/BSD `make`: https://codeberg.org/ISSOtm/gb-starter-kit/issues/29
|
||||||
if(TESTS_OS_NAME MATCHES "^(windows|macos|.*bsd)(-.*)?")
|
if(TESTS_OS_NAME MATCHES "^(windows|macos|[^-]*bsd)(-.*)?")
|
||||||
set_tests_properties(gb-starter-kit PROPERTIES DISABLED TRUE)
|
set_tests_properties(gb-starter-kit PROPERTIES DISABLED TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user