summaryrefslogtreecommitdiff
path: root/.github/workflows/macos-compile.yml
blob: d3c5dfbf8e4c6cdebb004db0f45387a14b36fd9e (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
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 }}
          mv build-cmake/Spaghettify spaghetti-${{ matrix.config }}/
      - name: Publish packaged artifacts
        uses: actions/upload-artifact@v4
        with:
            name: spaghetti-mac-universal-${{ matrix.config }}
            path: spaghetti-${{ matrix.config }}
            retention-days: 1