Skip to content

More enhancements

More enhancements #159

Workflow file for this run

name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build-linux-gcc:
runs-on: ubuntu-24.04
name: "Linux - GCC / Make"
steps:
- uses: actions/checkout@v4
- name: Download SDL2
run: sudo apt-get install libsdl2-dev
- name: Configure CMake
run: cmake -B build --preset=linux-gcc-make -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel
- name: Test
working-directory: build
run: ctest --output-on-failure
build-windows:
runs-on: windows-latest
name: Windows - ${{ matrix.make-program.name }}
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
make-program:
- name: MinGW / Make
preset: windows-mingw-make
- name: MinGW / Ninja
preset: windows-mingw-ninja
- name: MSVC / MSBuild
preset: windows-msvc-release
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-ninja
path-type: inherit
- name: Configure CMake
# Must override the compiler from the preset in order to get the right root path (ignored for MSVC build)
run: cmake -B build --preset="${{ matrix.make-program.preset }}" -DCMAKE_CXX_COMPILER="/mingw64/bin/g++.exe" -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test
working-directory: build
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure