summaryrefslogtreecommitdiff
path: root/.github/workflows/macos-compile.yml
blob: 59986d8fcf3a4cc29c93783d5fe68db7139631f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: MacOS Validation

on:
  pull_request:
    branches: [ "*" ]

jobs:
  build:
    runs-on: macOS-latest
    strategy:
      matrix:
        config: [Release, Debug]
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          fetch-tags: true
          submodules: recursive
      - name: Install dependencies
        run: brew install ninja cmake
      - name: Build
        run: |
          cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DENABLE_VCPKG=ON
          cmake --build build-cmake -j --config ${{ matrix.config }}
      - name: Create Package
        run: |
          mkdir spaghetti-${{ matrix.config }}
          # The mac build now produces SpaghettiKart.app; zip with ditto so the
          # executable bit survives artifact upload.
          ditto -c -k --keepParent build-cmake/SpaghettiKart.app spaghetti-${{ matrix.config }}/SpaghettiKart.app.zip
      - name: Publish packaged artifacts
        uses: actions/upload-artifact@v4
        with:
            name: spaghetti-mac-universal-${{ matrix.config }}
            path: spaghetti-${{ matrix.config }}
            retention-days: 1