CI: build the Modern console and run the Modern engine tests on all platforms

The main CI stops at the public history check on 0.3, so the Modern season
core was only ever built on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-25 12:38:36 +01:00
1 parent aadc50cb75
commit 5ea213feb1
1 file changed
+66
+66
View File
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: GPL-3.0-only
# Builds the Modern season core, its console and the data-free Modern engine tests on all
# three platforms (docs/new_engine). The game data tests stay local.
name: Modern engine
on:
push:
branches: ['0.3']
paths:
- 'src/modern/game/**'
- 'src/modern/content/**'
- 'src/modern/app/**'
- 'src/game/**'
- 'src/app/**'
- 'src/formats/**'
- 'tests/modern_*'
- 'CMakeLists.txt'
- '.github/workflows/modern-engine.yml'
pull_request:
paths:
- 'src/modern/game/**'
- 'src/modern/content/**'
- 'src/modern/app/**'
- 'tests/modern_*'
- '.github/workflows/modern-engine.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: modern-engine-${{ github.ref }}
cancel-in-progress: true
jobs:
engine:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-14]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y build-essential git cmake ninja-build pkg-config libgtk-3-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxfixes-dev libxss-dev libasound2-dev libpulse-dev libgl1-mesa-dev libudev-dev
- name: Set up MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@a102174a2b586eec2ea151a69e6fd14404a8ce7c # v1.13.0
with:
arch: x64
- name: Configure without game data
run: cmake -S . -B build-engine -G Ninja -DCMAKE_BUILD_TYPE=Release -DOPENBMH_BUILD_EDITOR=OFF -DBMH_DATA=
- name: Compile the Modern console, simulator and engine tests
run: cmake --build build-engine --target openbmh_modern_cli modern_season_sim modern_world_info modern_camp_tests modern_almanac_tests modern_toto_tests modern_calendar_tests --parallel 2
- name: Run the data-free Modern engine tests
run: ctest --test-dir build-engine -R "^modern_(camp|almanac|toto|calendar)_tests$" --output-on-failure --output-junit modern-engine-results.xml
- name: Upload test report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: modern-engine-tests-${{ matrix.os }}
path: build-engine/modern-engine-results.xml
if-no-files-found: warn