Skip to content

Commit

Permalink
Merge pull request #28 from danra/mac_ci
Browse files Browse the repository at this point in the history
Mac CI
  • Loading branch information
kevinbentley authored Apr 17, 2024
2 parents 3bc8b7e + d3c4fdd commit 4c0c6d3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ jobs:
fail-fast: false

matrix:
os: [windows-latest]
os: [{runner: windows-latest, preset: win}, {runner: macos-latest, preset: mac}]
build_type: [Debug, Release]

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os.runner }}

steps:
- uses: actions/checkout@v4

- name: Install macOS dependencies
if: ${{ matrix.os.preset == 'mac' }}
run: |
# Note this is x86_64 Homebrew
/usr/local/bin/brew install sdl12-compat sdl2_image
curl --output-dir /tmp -fsSLO https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.5/XQuartz-2.8.5.pkg
sudo installer -pkg /tmp/XQuartz-2.8.5.pkg -target LocalSystem
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -A "Win32"
run: cmake --preset ${{matrix.os.preset}} -B ${{github.workspace}}/build

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
Expand Down
27 changes: 27 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": 3
, "configurePresets": [
{
"name": "win"
, "condition": {
"type": "equals"
, "lhs": "${hostSystemName}"
, "rhs": "Windows"
}
, "cacheVariables": {
"CMAKE_GENERATOR_PLATFORM": {
"type": "STRING"
, "value": "Win32"
}
}
}
, {
"name": "mac"
, "condition": {
"type": "equals"
, "lhs": "${hostSystemName}"
, "rhs": "Darwin"
}
}
]
}

0 comments on commit 4c0c6d3

Please sign in to comment.