Skip to content

Commit 4d0d34c

Browse files
committed
ci: add CACHE_VERSION and broader restore-keys for Pods/DerivedData to enable periodic cache rotation
1 parent a6057d8 commit 4d0d34c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
build:
1515
runs-on: macos-14
1616
env:
17+
CACHE_VERSION: v1 # bump to v2 to invalidate old caches
1718
SCHEME: Avro Keyboard # Default equals target name in this repo
1819
TARGET: Avro Keyboard # Fallback target if no shared scheme
1920
CONFIG: Debug
@@ -58,8 +59,9 @@ jobs:
5859
Pods
5960
~/.cocoapods
6061
~/Library/Caches/CocoaPods
61-
key: ${{ runner.os }}-pods-${{ hashFiles('Podfile.lock') }}
62+
key: ${{ runner.os }}-${{ env.CACHE_VERSION }}-pods-${{ hashFiles('Podfile.lock') }}
6263
restore-keys: |
64+
${{ runner.os }}-${{ env.CACHE_VERSION }}-pods-
6365
${{ runner.os }}-pods-
6466
6567
- name: Cache Xcode DerivedData
@@ -68,8 +70,9 @@ jobs:
6870
with:
6971
path: |
7072
~/Library/Developer/Xcode/DerivedData
71-
key: ${{ runner.os }}-derived-${{ hashFiles('AvroKeyboard.xcodeproj/project.pbxproj', 'Podfile.lock') }}-${{ env.SCHEME }}
73+
key: ${{ runner.os }}-${{ env.CACHE_VERSION }}-derived-${{ hashFiles('AvroKeyboard.xcodeproj/project.pbxproj', 'Podfile.lock') }}-${{ env.SCHEME }}
7274
restore-keys: |
75+
${{ runner.os }}-${{ env.CACHE_VERSION }}-derived-
7376
${{ runner.os }}-derived-
7477
7578
- name: Pod install

0 commit comments

Comments
 (0)