no message #674
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.target.name }} - ${{ matrix.toolchain.name }} | |
runs-on: ${{ matrix.toolchain.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- name: quakespasm | |
toolchain: | |
- name: Linux Clang | |
os: ubuntu-24.04 | |
# TODO: find the way to avoid duplication of dependencies command | |
deps: sudo apt update && sudo apt install libflac-dev libmpg123-dev libmodplug-dev libopusfile-dev libsdl2-dev libvorbis-dev | |
cmake_args: -DCMAKE_C_COMPILER=clang | |
- name: Linux GCC | |
os: ubuntu-24.04 | |
# TODO: find the way to avoid duplication of dependencies command | |
deps: sudo apt update && sudo apt install libflac-dev libmpg123-dev libmodplug-dev libopusfile-dev libsdl2-dev libvorbis-dev | |
- name: macOS Intel | |
os: macos-13 | |
deps: brew install flac libmodplug libvorbis mpg123 opusfile sdl2 | |
- name: macOS ARM | |
os: macos-14 | |
deps: brew install flac libmodplug libvorbis mpg123 opusfile sdl2 | |
- name: MSVC 32-bit | |
os: windows-2022 | |
cmake_args: -A Win32 | |
- name: MSVC 64-bit | |
os: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout Source Code | |
shell: bash | |
run: | | |
git submodule update --init -- src/${{ matrix.target.name }} | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
${{ matrix.toolchain.deps }} | |
${{ matrix.target.deps.common }} | |
${{ matrix.target.deps[runner.os] }} | |
- name: Configure | |
shell: bash | |
run: | | |
${{ matrix.target.configure }} | |
cmake -B build -DQUAKE_TARGET=${{ matrix.target.name }} ${{ matrix.toolchain.cmake_args }} . | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Build | |
shell: bash | |
run: | | |
export MAKEFLAGS=--keep-going | |
cmake --build build --config Release --parallel ${{ steps.cpu-cores.outputs.count }} | |
- name: List Build Directory | |
if: always() | |
shell: bash | |
run: | | |
git status | |
ls -lR build |