From d65199a614e9e23ff307ef49929d1e39d76b6741 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Fri, 22 Mar 2024 15:56:00 +0200 Subject: [PATCH] Cache Xcode derived data and SPM packages for unit tests --- .github/workflows/unit_tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index b2f9d249a..57e87b49f 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -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