Skip to content

WIP: upgrade to SDL3 #197

WIP: upgrade to SDL3

WIP: upgrade to SDL3 #197

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
strategy:
matrix:
platform:
- { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
- { name: MacOS, os: macos-latest, shell: sh }
- { name: mingw-w64 (i686), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: mingw-w64 (x86_64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
- { name: MSVC (x86), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64_x86 }
- { name: MSVC (x64), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64 }
- { name: MSVC (ARM64), os: windows-latest, shell: pwsh, msvc: 1, msvc-arch: amd64_arm64 }
steps:
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.platform.msvc }}
with:
arch: ${{ matrix.platform.msvc-arch }}
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install cmake ninja-build
- name: Set up MSYS2
if: ${{ matrix.platform.shell == 'msys2 {0}' }}
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
${{ matrix.platform.msys-env }}-gcc
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-ninja
- name: Set up Ninja
uses: aseprite/get-ninja@main
if: ${{ !contains(matrix.platform.shell, 'msys2') }}
- name: Set up SDL
id: sdl
uses: libsdl-org/setup-sdl@main
with:
cmake-generator: Ninja
version: 3-head
sdl-test: false
shell: ${{ matrix.platform.shell }}
- name: Get SDL_sound sources
uses: actions/checkout@v3
- name: Configure (CMake)
run: cmake -B build -DSDLSOUND_DECODER_MIDI=ON ${{ matrix.platform.flags }} -DCMAKE_INSTALL_PREFIX=prefix -DCMAKE_BUILD_TYPE=Release
- name: Build (CMake)
run: cmake --build build/ --config Release
- name: Install (CMake)
run: |
cmake --install build/ --config Release
- name: Verify CMake configuration files
run: |
cmake -S cmake/test -B build_cmake_test ${{ matrix.platform.flags }} -DCMAKE_PREFIX_PATH="${{ github.workspace }}/prefix" -DCMAKE_BUILD_TYPE=Release
cmake --build build_cmake_test --verbose --config Release