Build tests for all CMake platforms on CI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml
index b14a054..16f0fc7 100644
--- a/.github/workflows/emscripten.yml
+++ b/.github/workflows/emscripten.yml
@@ -13,10 +13,17 @@ jobs:
- name: Configure CMake
run: |
emcmake cmake -S . -B build \
+ -DSDL_TESTS=ON \
+ -DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build
run: cmake --build build/ --verbose
+ - name: Run build-time tests
+ run: |
+ set -eu
+ export SDL_TESTS_QUICK=1
+ ctest -VV --test-dir build/
- name: Install
run: |
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ff22966..f49f54a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -114,7 +114,7 @@ jobs:
run: |
cmake --build build/ --config Release --verbose --parallel
- name: Run build-time tests (CMake)
- if: "matrix.platform.shell == 'sh' && ! matrix.platform.autotools"
+ if: "! matrix.platform.autotools"
run: |
set -eu
export SDL_TESTS_QUICK=1
diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml
index 1db6a39..2c4cb6f 100644
--- a/.github/workflows/msvc.yml
+++ b/.github/workflows/msvc.yml
@@ -27,10 +27,16 @@ jobs:
- name: Configure CMake
run: cmake -S . -B build `
-DSDL_TESTS=ON `
+ -DSDL_INSTALL_TESTS=ON `
${{ matrix.platform.flags }} `
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build CMake
run: cmake --build build/ --config Release --parallel
+ - name: Run build-time tests
+ if: "! contains(matrix.platform.name, 'ARM')"
+ run: |
+ $env:SDL_TESTS_QUICK=1
+ ctest -VV --test-dir build/ -C Release
- name: Install CMake
run: |
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
diff --git a/.github/workflows/psp.yaml b/.github/workflows/psp.yaml
index bed0a01..1ca74f6 100644
--- a/.github/workflows/psp.yaml
+++ b/.github/workflows/psp.yaml
@@ -17,6 +17,7 @@ jobs:
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
-DSDL_TESTS=ON \
+ -DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build
diff --git a/.github/workflows/riscos.yml b/.github/workflows/riscos.yml
index 7c3340c..1791c95 100644
--- a/.github/workflows/riscos.yml
+++ b/.github/workflows/riscos.yml
@@ -44,6 +44,8 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
-DRISCOS=ON \
-DSDL_GCC_ATOMICS=OFF \
+ -DSDL_TESTS=ON \
+ -DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
- name: Build (CMake)
diff --git a/.github/workflows/vita.yaml b/.github/workflows/vita.yaml
index 792bd5b..4e2a026 100644
--- a/.github/workflows/vita.yaml
+++ b/.github/workflows/vita.yaml
@@ -21,6 +21,8 @@ jobs:
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
+ -DSDL_TESTS=ON \
+ -DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build