mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
ci: use ccache on macos
This commit is contained in:
parent
cfbe59868b
commit
8d6c90bce8
1 changed files with 18 additions and 0 deletions
18
.github/workflows/desktop-build.yml
vendored
18
.github/workflows/desktop-build.yml
vendored
|
|
@ -235,6 +235,7 @@ jobs:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
env:
|
env:
|
||||||
|
CACHE: /tmp/${{matrix.os}}-${{matrix.type}}-cache # ${{runner.temp}} does not work?
|
||||||
DEVELOPER_DIR:
|
DEVELOPER_DIR:
|
||||||
/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
|
/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
|
||||||
CMAKE_GENERATOR: 'Ninja'
|
CMAKE_GENERATOR: 'Ninja'
|
||||||
|
|
@ -253,6 +254,16 @@ jobs:
|
||||||
brew update
|
brew update
|
||||||
brew install protobuf qt --force-bottle
|
brew install protobuf qt --force-bottle
|
||||||
|
|
||||||
|
- name: Restore compiler cache (ccache)
|
||||||
|
id: ccache_restore
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
env:
|
||||||
|
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||||
|
with:
|
||||||
|
path: ${{env.CACHE}}
|
||||||
|
key: ccache-${{matrix.os}}-${{matrix.type}}-${{env.BRANCH_NAME}}
|
||||||
|
restore-keys: ccache-${{matrix.os}}-${{matrix.type}}-
|
||||||
|
|
||||||
- name: Build & Sign on Xcode ${{matrix.xcode}}
|
- name: Build & Sign on Xcode ${{matrix.xcode}}
|
||||||
shell: bash
|
shell: bash
|
||||||
id: build
|
id: build
|
||||||
|
|
@ -323,6 +334,13 @@ jobs:
|
||||||
xcrun stapler staple ${{steps.build.outputs.path}}
|
xcrun stapler staple ${{steps.build.outputs.path}}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Save compiler cache (ccache)
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: ${{env.CACHE}}
|
||||||
|
key: ${{ steps.ccache_restore.outputs.cache-primary-key }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.make_package
|
if: matrix.make_package
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue