Skip to content

Commit 1ba0685

Browse files
authored
chore: use ccache on CI only (#651)
## 📜 Description Use ccache only on CI. ## 💡 Motivation and Context If user don't have ccache installed or have invalid cache it may result in a failed build and users will not be able to assemble example app. So I decided to enable ccache only for CI (I have na access to cache so anytime I can remove poisoned cache and fix the problem by my hand). ## 📢 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 - export `USE_CCACHE=1` before `pod install`; - update `Podfile.lock` and `.pbxproj`; ## 🤔 How Has This Been Tested? Tested on CI. Builds can be assembled in ~3-5 minutes (as before). ## 📸 Screenshots (if appropriate): <img width="820" alt="image" src="https://github.com/user-attachments/assets/b2cc6584-72c4-4f67-84f7-82f579443389"> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent f48d2d7 commit 1ba0685

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
restore-keys: |
8686
${{ runner.os }}-fabric-pods-
8787
- name: Install Pods
88-
run: pod install
88+
run: export USE_CCACHE=1 && pod install
8989
- name: Install xcpretty
9090
run: gem install xcpretty
9191
- name: Build App

.github/workflows/build-ios.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
restore-keys: |
8484
${{ runner.os }}-pods-
8585
- name: Install Pods
86-
run: pod install
86+
run: export USE_CCACHE=1 && pod install
8787
- name: Install xcpretty
8888
run: gem install xcpretty
8989
- name: Build App

.github/workflows/ios-e2e-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
${{ runner.os }}-pods-
8585
- name: Install pods
8686
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
87-
run: pod install
87+
run: export USE_CCACHE=1 && pod install
8888
- name: Build app
8989
working-directory: e2e
9090
run: yarn build-example:ios

FabricExample/ios/KeyboardControllerFabricExample.xcodeproj/project.pbxproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@
541541
isa = XCBuildConfiguration;
542542
buildSettings = {
543543
ALWAYS_SEARCH_USER_PATHS = NO;
544-
CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
544+
CC = "";
545545
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
546546
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
547547
CLANG_CXX_LIBRARY = "libc++";
@@ -569,7 +569,7 @@
569569
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
570570
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
571571
COPY_PHASE_STRIP = NO;
572-
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
572+
CXX = "";
573573
ENABLE_STRICT_OBJC_MSGSEND = YES;
574574
ENABLE_TESTABILITY = YES;
575575
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
@@ -590,8 +590,8 @@
590590
GCC_WARN_UNUSED_FUNCTION = YES;
591591
GCC_WARN_UNUSED_VARIABLE = YES;
592592
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
593-
LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
594-
LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
593+
LD = "";
594+
LDPLUSPLUS = "";
595595
LD_RUNPATH_SEARCH_PATHS = (
596596
/usr/lib/swift,
597597
"$(inherited)",
@@ -629,7 +629,7 @@
629629
isa = XCBuildConfiguration;
630630
buildSettings = {
631631
ALWAYS_SEARCH_USER_PATHS = NO;
632-
CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
632+
CC = "";
633633
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
634634
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
635635
CLANG_CXX_LIBRARY = "libc++";
@@ -657,7 +657,7 @@
657657
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
658658
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
659659
COPY_PHASE_STRIP = YES;
660-
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
660+
CXX = "";
661661
ENABLE_NS_ASSERTIONS = NO;
662662
ENABLE_STRICT_OBJC_MSGSEND = YES;
663663
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
@@ -674,8 +674,8 @@
674674
GCC_WARN_UNUSED_FUNCTION = YES;
675675
GCC_WARN_UNUSED_VARIABLE = YES;
676676
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
677-
LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
678-
LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
677+
LD = "";
678+
LDPLUSPLUS = "";
679679
LD_RUNPATH_SEARCH_PATHS = (
680680
/usr/lib/swift,
681681
"$(inherited)",

FabricExample/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ target 'KeyboardControllerFabricExample' do
3636
installer,
3737
config[:reactNativePath],
3838
:mac_catalyst_enabled => false,
39-
:ccache_enabled => true
39+
# :ccache_enabled => true
4040
)
4141
end
4242
end

FabricExample/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,6 @@ SPEC CHECKSUMS:
20602060
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
20612061
Yoga: 1354c027ab07c7736f99a3bef16172d6f1b12b47
20622062

2063-
PODFILE CHECKSUM: 2316454ecd5e0e694e9833fa0cd6301198b512c8
2063+
PODFILE CHECKSUM: 802cba1de01f270fb7f8acc01d301b8df2e5c762
20642064

20652065
COCOAPODS: 1.14.3

example/ios/KeyboardControllerExample.xcodeproj/project.pbxproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@
734734
isa = XCBuildConfiguration;
735735
buildSettings = {
736736
ALWAYS_SEARCH_USER_PATHS = NO;
737-
CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
737+
CC = "";
738738
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
739739
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
740740
CLANG_CXX_LIBRARY = "libc++";
@@ -761,7 +761,7 @@
761761
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
762762
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
763763
COPY_PHASE_STRIP = NO;
764-
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
764+
CXX = "";
765765
ENABLE_STRICT_OBJC_MSGSEND = YES;
766766
ENABLE_TESTABILITY = YES;
767767
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
@@ -782,8 +782,8 @@
782782
GCC_WARN_UNUSED_FUNCTION = YES;
783783
GCC_WARN_UNUSED_VARIABLE = YES;
784784
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
785-
LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
786-
LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
785+
LD = "";
786+
LDPLUSPLUS = "";
787787
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
788788
LIBRARY_SEARCH_PATHS = (
789789
"$(SDKROOT)/usr/lib/swift",
@@ -806,7 +806,7 @@
806806
isa = XCBuildConfiguration;
807807
buildSettings = {
808808
ALWAYS_SEARCH_USER_PATHS = NO;
809-
CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
809+
CC = "";
810810
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
811811
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
812812
CLANG_CXX_LIBRARY = "libc++";
@@ -833,7 +833,7 @@
833833
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
834834
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
835835
COPY_PHASE_STRIP = YES;
836-
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
836+
CXX = "";
837837
ENABLE_NS_ASSERTIONS = NO;
838838
ENABLE_STRICT_OBJC_MSGSEND = YES;
839839
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
@@ -850,8 +850,8 @@
850850
GCC_WARN_UNUSED_FUNCTION = YES;
851851
GCC_WARN_UNUSED_VARIABLE = YES;
852852
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
853-
LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh";
854-
LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
853+
LD = "";
854+
LDPLUSPLUS = "";
855855
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
856856
LIBRARY_SEARCH_PATHS = (
857857
"$(SDKROOT)/usr/lib/swift",

example/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ target 'KeyboardControllerExample' do
3131
installer,
3232
config[:reactNativePath],
3333
:mac_catalyst_enabled => false,
34-
:ccache_enabled => true
34+
# :ccache_enabled => true
3535
)
3636
end
3737
end

example/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,6 @@ SPEC CHECKSUMS:
20092009
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
20102010
Yoga: 1354c027ab07c7736f99a3bef16172d6f1b12b47
20112011

2012-
PODFILE CHECKSUM: f68187c1aaac1680980e6aa945a248d09064d1c0
2012+
PODFILE CHECKSUM: 99c5edd78bbd8964f66a818b60d5e3aba4adc048
20132013

20142014
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)