Skip to content

v1.2

v1.2 #18

Workflow file for this run

name: Build (macOS)
on:
push:
paths-ignore:
- '**/README.md'
- '.github/workflows/ubuntu-build.yml'
- '.github/workflows/windows-build-msvc.yml'
- '.github/workflows/windows-build-msys2.yml'
- 'appimage-data/**'
- 'assets/**'
- 'flatpak-data/**'
pull_request:
jobs:
build-macos:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
build_type: ["Release"]
cmake_generator: ["Ninja"]
config:
- {
os: macos-latest,
cc: "clang",
cxx: "clang++"
}
- {
os: macos-latest,
cc: "gcc-13",
cxx: "g++-13"
}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: |
brew install ninja sdl2 sdl2_image sdl2_mixer
- name: Configure CMake
run: >
cmake
-G ${{ matrix.cmake_generator }}
-S ${{ github.workspace }}
-B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_C_COMPILER=${{ matrix.config.cc }}
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--config ${{ matrix.build_type }}