mirror of
https://github.com/open-goal/jak-project
synced 2026-06-04 18:59:37 -04:00
578cbe15a7
libidn2 which is a potential part of libcurl seemingly slipped into the latest release (0.2.25) and it was dynamically linked. This causes issues: ``` dyld[95648]: Library not loaded: /usr/local/opt/libidn2/lib/libidn2.0.dylib Referenced from: <9DA6EC1D-F99A-3233-8264-AAEA87F07743> /Users/tyler/Downloads/opengoal-macos-arm-v0.2.25/gk Reason: tried: '/usr/local/opt/libidn2/lib/libidn2.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libidn2/lib/libidn2.0.dylib' (no such file), '/usr/local/opt/libidn2/lib/libidn2.0.dylib' (no such file) zsh: abort ./g ``` My theory for why is that the underlying image changed (now has this library) and so the cmake detected that and started building with it. The simple fix is to just disable it, as we don't need it. If we do eventually, I can figure out how to ensure it's properly compiled.
85 lines
2.2 KiB
YAML
85 lines
2.2 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-13
|
|
timeout-minutes: 120
|
|
|
|
steps:
|
|
# minimal checkout if we're NOT uploading artifacts
|
|
- name: Checkout Repository
|
|
if: ${{ ! inputs.uploadArtifacts }}
|
|
uses: actions/checkout@v4
|
|
|
|
# full checkout with tags if we ARE uploading artifacts
|
|
- name: Checkout Repository with Tags
|
|
if: ${{ inputs.uploadArtifacts }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Install Package Dependencies
|
|
run: brew install cmake nasm ninja
|
|
|
|
- name: Setup sccache
|
|
uses: hendrikmuhs/ccache-action@v1.2.18
|
|
with:
|
|
variant: sccache
|
|
key: macos-13-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
|
|
restore-keys: macos-13-${{ 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: List libraries of gk
|
|
run: otool -L ./build/game/gk
|
|
|
|
- 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
|