Skip to content

Commit 13f58bd

Browse files
authored
ci: use better restore keys for derived data (iOS builds) (#1296)
## 📜 Description Don't restore build cache if xcode version has been changed. ## 💡 Motivation and Context If we change XCode version then we may consume the derived data from old xcode version. This PR assures that we will not restore derived data if xcode version has been changed 🤞 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### CI - use better restore keys for derived data (iOS builds). ## 🤔 How Has This Been Tested? Tested manually via this PR. ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 24a1d36 commit 13f58bd

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/build-ios-fabric.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ jobs:
9898
uses: actions/cache@v5
9999
with:
100100
path: FabricExample/ios/build
101-
key: ${{ runner.os }}-fabric-derived-data-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock', '**/package.json', '**/yarn.lock') }}-xcode-${{ env.XCODE_VERSION }}
101+
key: ${{ runner.os }}-fabric-derived-data-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock', '**/package.json', '**/yarn.lock') }}
102102
restore-keys: |
103-
${{ runner.os }}-fabric-derived-data
103+
${{ runner.os }}-fabric-derived-data-xcode-${{ env.XCODE_VERSION }}-
104104
- name: Install xcpretty
105105
run: gem install xcpretty
106106
- name: Build App

.github/workflows/build-ios.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ jobs:
9696
uses: actions/cache@v5
9797
with:
9898
path: example/ios/build
99-
key: ${{ runner.os }}-derived-data-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock', '**/package.json', '**/yarn.lock') }}-xcode-${{ env.XCODE_VERSION }}
99+
key: ${{ runner.os }}-derived-data-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock', '**/package.json', '**/yarn.lock') }}
100100
restore-keys: |
101-
${{ runner.os }}-derived-data-
101+
${{ runner.os }}-derived-data-xcode-${{ env.XCODE_VERSION }}-
102102
- name: Build App
103103
run: "set -o pipefail && xcodebuild \
104104
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \

0 commit comments

Comments
 (0)