Skip to content

Commit

Permalink
Fix dependency caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Sep 14, 2021
1 parent 61865d3 commit 45a724d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
swift_build: swift build --build-tests
swift_test: swift test
periphery_scan: ./.build/debug/periphery scan --quiet --skip-build
cache_version: 1
jobs:
macOS:
strategy:
Expand Down Expand Up @@ -40,9 +41,9 @@ jobs:
path: |
.build
Package.resolved
key: ${{ runner.os }}-${{ matrix.xcode }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-${{ hashFiles('**/Package.*') }}
key: ${{ runner.os }}-${{ matrix.xcode }}-${{ steps.get-swift-version.outputs.version }}-${{ env.cache_version }}-spm-deps-${{ hashFiles('**/Package.swift', '**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ matrix.xcode }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-
${{ runner.os }}-${{ matrix.xcode }}-${{ steps.get-swift-version.outputs.version }}-${{ env.cache_version }}-spm-deps-
- name: Resolve dependencies
if: steps.cache-resolved-dependencies.outputs.cache-hit != 'true'
run: ${{ env.swift_package_resolve }}
Expand Down Expand Up @@ -84,9 +85,9 @@ jobs:
path: |
.build
Package.resolved
key: ${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-${{ hashFiles('**/Package.*') }}
key: ${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-${{ env.cache_version }}-spm-deps-${{ hashFiles('**/Package.swift', '**/Package.resolved') }}
restore-keys: |
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-${{ env.cache_version }}-spm-deps-
- name: Resolve dependencies
if: steps.cache-resolved-dependencies.outputs.cache-hit != 'true'
run: ${{ env.swift_package_resolve }}
Expand Down

0 comments on commit 45a724d

Please sign in to comment.