Skip to content

Commit 5dc45ce

Browse files
authored
ci: refactor and add caching, use macOS-26 image for iOS (#189)
* ci: refactor and add caching, use macOS-26 image for iOS * ci: print ccache stats in job summary * fix: properly cache outputs of CLI build * ci: print simple ccache stats in job summary * fix: include build outputs of brownie & brownfield packages in Turbo's cache * ci: optimize Android build caching * chore: disable verbose logging in RNApp CLI build scripts * ci: skip cleaning large packages on Ubuntu runner * ci: parallelize Android CI workflow
1 parent 2ced426 commit 5dc45ce

File tree

23 files changed

+304
-214
lines changed

23 files changed

+304
-214
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'ccache statistics'
2+
description: 'Print job summary with selected ccache statistics'
3+
4+
inputs:
5+
name:
6+
description: 'Label to print in summary'
7+
required: true
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Log ccache stats
13+
run: ccache -s > $GITHUB_STEP_SUMMARY
14+
shell: bash
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Prepare Android environment
2+
description: Prepare Android environment and set up the project
3+
4+
inputs:
5+
free-disk-space:
6+
description: 'Whether to free disk space on the runner'
7+
required: false
8+
default: 'true'
9+
10+
run-yarn-build:
11+
description: 'Whether to run yarn build'
12+
required: false
13+
default: 'true'
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Validate Gradle Wrapper
19+
uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5
20+
21+
- name: Setup Java
22+
uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5
23+
with:
24+
distribution: 'zulu'
25+
java-version: '17'
26+
27+
- name: Free Disk Space (Ubuntu)
28+
if: inputs.free-disk-space == 'true'
29+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
30+
with:
31+
tool-cache: false
32+
33+
android: false
34+
dotnet: true
35+
haskell: true
36+
large-packages: false
37+
docker-images: true
38+
swap-storage: false
39+
40+
- name: Build packages
41+
if: inputs.run-yarn-build == 'true'
42+
run: yarn build
43+
shell: bash
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Prepare iOS environment
2+
description: Prepare iOS environment and set up the project
3+
4+
inputs:
5+
run-yarn-build:
6+
description: 'Whether to run yarn build'
7+
required: false
8+
default: 'true'
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Use appropriate Xcode version
14+
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
15+
with:
16+
xcode-version: '26'
17+
18+
- name: Setup Ruby
19+
uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0
20+
with:
21+
ruby-version: '3.2'
22+
bundler-cache: true
23+
24+
- name: Build packages
25+
if: inputs.run-yarn-build == 'true'
26+
run: yarn build
27+
shell: bash

.github/actions/setup/action.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Setup
22
description: Setup Node.js and install dependencies
33

4+
inputs:
5+
restore-turbo-cache:
6+
description: 'Whether to restore the Turbo cache'
7+
required: false
8+
default: 'true'
9+
410
runs:
511
using: composite
612
steps:
@@ -10,7 +16,12 @@ runs:
1016
node-version: 'lts/*'
1117
cache: 'yarn'
1218

13-
- name: Restore turbo cache
19+
- name: Install dependencies
20+
run: yarn install
21+
shell: bash
22+
23+
- name: Restore Turbo cache
24+
if: inputs.restore-turbo-cache == 'true'
1425
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
1526
with:
1627
path: |
@@ -20,7 +31,3 @@ runs:
2031
key: ${{ runner.os }}-turbo-${{ hashFiles('.turbo', '**/.turbo') }}
2132
restore-keys: |
2233
${{ runner.os }}-turbo-
23-
24-
- name: Install dependencies
25-
run: yarn install
26-
shell: bash

0 commit comments

Comments
 (0)