Skip to content

Commit 3a896df

Browse files
authored
Set explicit OS with version in cache keys (#6362)
1 parent f017bff commit 3a896df

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
2525
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
2626
with:
27-
key: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
28-
restore-keys: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-
27+
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
28+
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
2929
path: .build
3030
- name: Build everything
3131
run: swift build --build-tests

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
3030
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3131
with:
32-
key: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
33-
restore-keys: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-
32+
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
33+
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
3434
path: .build
3535
- name: Generate documentation
3636
run: |

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
2626
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
2727
with:
28-
key: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
29-
restore-keys: ${{ runner.os }}-spm-${{ steps.swift_version.outputs.version }}-
28+
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
29+
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
3030
path: .build
3131
- name: Run tests
3232
uses: ./.github/actions/run-make
@@ -53,8 +53,8 @@ jobs:
5353
persist-credentials: false
5454
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5555
with:
56-
key: ${{ runner.os }}-xcode-spm-${{ matrix.xcode }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
57-
restore-keys: ${{ runner.os }}-xcode-spm-${{ matrix.xcode }}-
56+
key: macos-${{ matrix.macOS }}-xcode-spm-${{ matrix.xcode }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
57+
restore-keys: macos-${{ matrix.macOS }}-xcode-spm-${{ matrix.xcode }}-
5858
path: .build
5959
- name: Run tests
6060
run: make spm_test

0 commit comments

Comments
 (0)