mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-24 23:58:04 +03:00
Add optional SDL3 support while keeping SDL2 as the default. SDL3 builds must be selected explicitly with the SYSTEM3_SDL_VERSION CMake option. Centralize most SDL2/SDL3 API differences behind compatibility interfaces. Audio playback uses a dedicated SDL3 backend based on SDL3 audio streams, implemented separately in mako_sdl3.cpp. Android and Nintendo Switch remain on SDL2 for now.
37 lines
938 B
YAML
37 lines
938 B
YAML
name: Linux Build
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-26.04
|
|
strategy:
|
|
matrix:
|
|
build-type: ["Debug", "Release"]
|
|
sdl-version: [2, 3]
|
|
|
|
name: Linux SDL${{ matrix.sdl-version }} ${{ matrix.build-type }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install Deps
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install librtmidi-dev nlohmann-json3-dev ninja-build
|
|
if [ "${{ matrix.sdl-version }}" = 2 ]; then
|
|
sudo apt install libsdl2-dev libsdl2-ttf-dev
|
|
else
|
|
sudo apt install libsdl3-dev libsdl3-ttf-dev
|
|
fi
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
|
|
-DSYSTEM3_SDL_VERSION=${{ matrix.sdl-version }}
|
|
cmake --build build
|
|
|
|
- name: Test
|
|
run: ctest --output-on-failure --test-dir build
|