WIP: tests #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
brew install sdl2 | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_HEADLESS_TESTS=ON | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --config Release | |
- name: Run SDL tests in CI mode | |
run: | | |
cd build/bin | |
# macOS needs special handling for mouse automation in headless mode | |
# We'll use the CI mode flag we're adding to the test application | |
./RobotCPPSDLTest --ci-mode --run-tests | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: 5568f110b509a9fd90711978a7cb76bae75bb092 | |
- name: Install SDL2 | |
run: | | |
vcpkg install sdl2:x64-windows | |
- name: Configure | |
shell: powershell | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_HEADLESS_TESTS=ON | |
- name: Build | |
shell: powershell | |
run: | | |
cd build | |
cmake --build . --config Release | |
- name: Run SDL tests in CI mode | |
shell: powershell | |
run: | | |
cd build\bin\Release | |
.\RobotCPPSDLTest.exe --ci-mode --run-tests |