Build tests for all CMake platforms on CI

This commit is contained in:
Cameron Cawley 2022-05-08 17:08:41 +01:00 committed by Sam Lantinga
parent f8ae3ef1eb
commit 12f9bcd2f4
6 changed files with 19 additions and 1 deletions

View File

@ -13,10 +13,17 @@ jobs:
- name: Configure CMake - name: Configure CMake
run: | run: |
emcmake cmake -S . -B build \ emcmake cmake -S . -B build \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_INSTALL_PREFIX=prefix
- name: Build - name: Build
run: cmake --build build/ --verbose 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 - name: Install
run: | run: |
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV

View File

@ -114,7 +114,7 @@ jobs:
run: | run: |
cmake --build build/ --config Release --verbose --parallel cmake --build build/ --config Release --verbose --parallel
- name: Run build-time tests (CMake) - name: Run build-time tests (CMake)
if: "matrix.platform.shell == 'sh' && ! matrix.platform.autotools" if: "! matrix.platform.autotools"
run: | run: |
set -eu set -eu
export SDL_TESTS_QUICK=1 export SDL_TESTS_QUICK=1

View File

@ -27,10 +27,16 @@ jobs:
- name: Configure CMake - name: Configure CMake
run: cmake -S . -B build ` run: cmake -S . -B build `
-DSDL_TESTS=ON ` -DSDL_TESTS=ON `
-DSDL_INSTALL_TESTS=ON `
${{ matrix.platform.flags }} ` ${{ matrix.platform.flags }} `
-DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_INSTALL_PREFIX=prefix
- name: Build CMake - name: Build CMake
run: cmake --build build/ --config Release --parallel 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 - name: Install CMake
run: | run: |
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV

View File

@ -17,6 +17,7 @@ jobs:
cmake -S . -B build \ cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \ -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
-DSDL_TESTS=ON \ -DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_INSTALL_PREFIX=prefix
- name: Build - name: Build

View File

@ -44,6 +44,8 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \ -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
-DRISCOS=ON \ -DRISCOS=ON \
-DSDL_GCC_ATOMICS=OFF \ -DSDL_GCC_ATOMICS=OFF \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
- name: Build (CMake) - name: Build (CMake)

View File

@ -21,6 +21,8 @@ jobs:
run: | run: |
cmake -S . -B build -G Ninja \ cmake -S . -B build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \ -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_INSTALL_PREFIX=prefix
- name: Build - name: Build