Skip to content

Commit 0314df7

Browse files
authored
ci: set up Ccache earlier (#1115)
Set up Ccache earlier to capture `pod install` artifacts, and allow expansion to Android later.
1 parent 6181ea7 commit 0314df7

File tree

6 files changed

+242
-227
lines changed

6 files changed

+242
-227
lines changed

.github/actions/setup-toolchain/action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11+
- name: Set up Ccache
12+
if: ${{ inputs.platform == 'ios' || inputs.platform == 'macos' }}
13+
run: |
14+
if ! command -v ccache 1> /dev/null; then
15+
brew install ccache
16+
fi
17+
18+
CCACHE_HOME=$(dirname $(dirname $(which ccache)))/opt/ccache
19+
20+
echo "CCACHE_DIR=$(git rev-parse --show-toplevel)/.ccache" >> $GITHUB_ENV
21+
22+
echo "CC=${CCACHE_HOME}/libexec/clang" >> $GITHUB_ENV
23+
echo "CXX=${CCACHE_HOME}/libexec/clang++" >> $GITHUB_ENV
24+
echo "CMAKE_C_COMPILER_LAUNCHER=$(which ccache)" >> $GITHUB_ENV
25+
echo "CMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)" >> $GITHUB_ENV
26+
27+
ccache --zero-stats 1> /dev/null
28+
shell: bash
1129
- name: Set up Node.js
1230
uses: actions/[email protected]
1331
with:

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
schedule:
88
# nightly builds against react-native@nightly at 5:00
99
- cron: 0 5 * * *
10+
env:
11+
HOMEBREW_NO_INSTALL_CLEANUP: 1
1012
jobs:
1113
lint-commit:
1214
name: "lint commit message"

Brewfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tap 'homebrew/cask-versions'
22
brew 'clang-format'
33
brew 'ktlint'
4-
brew 'node'
4+
brew 'n'
55
brew 'swiftformat'
66
brew 'swiftlint'
77
brew 'yarn'

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ PODS:
285285
- React-jsinspector (0.68.3)
286286
- React-logger (0.68.3):
287287
- glog
288-
- react-native-safe-area-context (4.3.1):
288+
- react-native-safe-area-context (4.3.3):
289289
- RCT-Folly
290290
- RCTRequired
291291
- RCTTypeSafety
292-
- React
292+
- React-Core
293293
- ReactCommon/turbomodule/core
294294
- React-perflogger (0.68.3)
295295
- React-RCTActionSheet (0.68.3):
@@ -549,7 +549,7 @@ SPEC CHECKSUMS:
549549
React-jsiexecutor: a5043e9e1e1bd13b80b58b228c6901b3721a4f54
550550
React-jsinspector: 86e89b9f135787a2e8eb74b3fc00ec61e9a80ae1
551551
React-logger: f790bd10f86b38012e108fb4b564023602702270
552-
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
552+
react-native-safe-area-context: b456e1c40ec86f5593d58b275bd0e9603169daca
553553
React-perflogger: fa15d1d29ff7557ee25ea48f7f59e65896fb3215
554554
React-RCTActionSheet: e83515333352a3cc19c146e3c7a63a8a9269da8f
555555
React-RCTAnimation: 8032daa2846e3db7ac28c4c5a207d0bfb5e1e3ad

0 commit comments

Comments
 (0)