Cache Xcode derived data and SPM packages for unit tests

This commit is contained in:
Stefan Ceriu
2024-03-22 15:56:00 +02:00
committed by Stefan Ceriu
parent a177db71b1
commit 70441ef32a

View File

@@ -14,9 +14,8 @@ jobs:
runs-on: macos-14
concurrency:
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
group: ${{ github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
group: ${{ format('unit-tests-{0}', github.ref) }}
cancel-in-progress: true
steps:
@@ -24,6 +23,11 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.ref }}
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.ref }}
- uses: actions/cache@v3
with:
path: vendor/bundle