Skip to content

WIP: tests

WIP: tests #15

Workflow file for this run

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
# Simplified vcpkg setup that should work more reliably
- name: Install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 5568f110b509a9fd90711978a7cb76bae75bb092
setupOnly: true
- name: Install SDL2
run: |
$VCPKG_ROOT/vcpkg install sdl2:x64-windows
shell: bash
- name: Configure
shell: powershell
run: |
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_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