Files
kichikuou_xsystem35-sdl2/.github/workflows/linux.yml
T
kichikuou 3cbe4c73d8 CI: Add SDL2 and SDL3 build matrix
Document the supported SDL configurations and build dependencies for each
platform. Keep Android on SDL3 only and identify every packaged artifact by
its SDL version.
2026-09-22 21:39:05 +09:00

48 lines
1.5 KiB
YAML

name: Linux Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
build-type: ["Debug", "Release"]
sdl-version: [2, 3]
name: Linux SDL${{ matrix.sdl-version }} ${{ matrix.build-type }}
steps:
- uses: actions/checkout@v6
- name: Install Deps
run: |
sudo apt update
sudo apt install libfreetype-dev libwebp-dev libportmidi-dev libcjson-dev asciidoctor gettext
if [ "${{ matrix.sdl-version }}" = 2 ]; then
sudo apt install libsdl2-dev libsdl2-mixer-dev
else
sudo apt install libsdl3-dev libsdl3-mixer-dev
fi
- name: Build
run: |
cmake -S . -B out/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DXSYSTEM35_SDL_VERSION=${{ matrix.sdl-version }}
cmake --build out/build -j4
- name: Test
run: ctest --test-dir out/build --output-on-failure
- name: Verify xsystem35.pot is up to date
if: matrix.build-type == 'Debug' && matrix.sdl-version == 2
run: |
xgettext --default-domain=xsystem35 --directory=. \
--keyword=_ --keyword=N_ \
--files-from=po/POTFILES.in \
--output=/tmp/fresh.pot
if ! diff <(grep '^msgid' po/xsystem35.pot | sort) \
<(grep '^msgid' /tmp/fresh.pot | sort); then
echo "::error::po/xsystem35.pot is out of date. Build the 'pot' target and commit the changes under po/."
exit 1
fi