Files
jak-project/.github/workflows/macos-build.yaml
T
Tyler Wilding a80f4e7cca ci: move to macos-12 (#3407)
macos-11 is end of life, it has been for 5 months
https://endoflife.date/macos, it will be removed as a runner on github
in Q2 2024. Next release will require atleast macOS 12.


![300882082-ac6ef1f1-8e18-4af1-a97f-d38cf82885df](https://github.com/open-goal/jak-project/assets/13153231/88bed2ae-8059-4d01-b4a6-8994af131c89)
2024-03-06 23:40:00 -05:00

72 lines
1.8 KiB
YAML

name: MacOS Build
on:
workflow_call:
inputs:
cmakePreset:
required: true
type: string
cachePrefix:
required: true
type: string
uploadArtifacts:
required: false
type: boolean
default: false
jobs:
build:
name: Intel
runs-on: macos-12
timeout-minutes: 120
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Package Dependencies
run: brew install cmake nasm ninja
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2.12
with:
variant: sccache
key: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
restore-keys: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}
max-size: 1000M
- name: CMake Generation
env:
CC: clang
CXX: clang++
run: |
cmake -B build --preset=${{ inputs.cmakePreset }} \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build Project
run: cmake --build build --parallel $((`sysctl -n hw.logicalcpu`))
- name: Run Tests
run: ./test.sh
- name: Prepare artifacts
if: ${{ inputs.uploadArtifacts }}
run: |
strip ./build/goalc/goalc
strip ./build/decompiler/extractor
strip ./build/game/gk
strip ./build/lsp/lsp
- name: Upload artifact
uses: actions/upload-artifact@v4
if: ${{ inputs.uploadArtifacts }}
with:
name: opengoal-macos-${{ inputs.cachePrefix }}
if-no-files-found: error
path: |
./build/goalc/goalc
./build/decompiler/extractor
./build/game/gk
./build/lsp/lsp