Skip to content

Commit 52848f9

Browse files
committed
refactor: improve CI cache isolation with Swift version keys
- Add Swift version to cache keys to prevent version mismatch issues - Improve cache isolation between Swift 6.0 and 6.2 builds - Align cache key naming with swift-html-types and swift-types-foundation This prevents potential issues from cached modules built with different Swift versions being loaded by newer compilers.
1 parent 89c0ab7 commit 52848f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
uses: actions/cache@v4
3232
with:
3333
path: .build
34-
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
34+
key: ${{ runner.os }}-swift62-spm-${{ hashFiles('Package.swift') }}
3535
restore-keys: |
36-
${{ runner.os }}-spm-
36+
${{ runner.os }}-swift62-spm-
3737
3838
# Note: swift test builds automatically, no separate build step needed
3939
- name: Test
@@ -63,8 +63,8 @@ jobs:
6363
uses: actions/cache@v4
6464
with:
6565
path: .build
66-
key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }}
67-
restore-keys: ${{ runner.os }}-spm-
66+
key: ${{ runner.os }}-swift62-spm-${{ hashFiles('Package.swift') }}
67+
restore-keys: ${{ runner.os }}-swift62-spm-
6868

6969
# Note: swift test builds automatically in release mode
7070
- name: Test (release)
@@ -83,8 +83,8 @@ jobs:
8383
uses: actions/cache@v4
8484
with:
8585
path: .build
86-
key: ${{ runner.os }}-swift60-spm-${{ hashFiles('Package.swift') }}
87-
restore-keys: ${{ runner.os }}-swift60-spm-
86+
key: ${{ runner.os }}-swift60-compat-spm-${{ hashFiles('Package.swift') }}
87+
restore-keys: ${{ runner.os }}-swift60-compat-spm-
8888

8989
# Note: swift test builds automatically
9090
- name: Test (Swift 6.0)

0 commit comments

Comments
 (0)