Skip to content

Commit 4cc94a2

Browse files
committed
chore: update workflows
1 parent ae269e7 commit 4cc94a2

2 files changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build Android
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/android-build.yml'
9+
- 'example/android/**'
10+
- 'nitrogen/generated/shared/**'
11+
- 'nitrogen/generated/android/**'
12+
- 'cpp/**'
13+
- 'android/**'
14+
- '**/bun.lock'
15+
- '**/react-native.config.js'
16+
- '**/nitro.json'
17+
pull_request:
18+
paths:
19+
- '.github/workflows/android-build.yml'
20+
- 'example/android/**'
21+
- '**/nitrogen/generated/shared/**'
22+
- '**/nitrogen/generated/android/**'
23+
- 'cpp/**'
24+
- 'android/**'
25+
- '**/bun.lock'
26+
- '**/react-native.config.js'
27+
- '**/nitro.json'
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
build_new:
35+
name: Build Android Example App (new architecture)
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: oven-sh/setup-bun@v2
40+
41+
- name: Install npm dependencies (bun)
42+
run: bun install
43+
44+
- name: Setup JDK 17
45+
uses: actions/setup-java@v4
46+
with:
47+
distribution: 'zulu'
48+
java-version: 17
49+
java-package: jdk
50+
cache: gradle
51+
52+
- name: Run Gradle Build for example/android/
53+
working-directory: example/android
54+
run: ./gradlew assembleDebug --no-daemon --build-cache
55+
56+
- name: Stop Gradle Daemon
57+
working-directory: example/android
58+
run: ./gradlew --stop
59+
60+
build_old:
61+
name: Build Android Example App (old architecture)
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: oven-sh/setup-bun@v2
66+
67+
- name: Install npm dependencies (bun)
68+
run: bun install
69+
70+
- name: Disable new architecture in gradle.properties
71+
run: sed -i "s/newArchEnabled=true/newArchEnabled=false/g" example/android/gradle.properties
72+
73+
- name: Setup JDK 17
74+
uses: actions/setup-java@v4
75+
with:
76+
distribution: 'zulu'
77+
java-version: 17
78+
java-package: jdk
79+
cache: gradle
80+
81+
- name: Run Gradle Build for example/android/
82+
working-directory: example/android
83+
run: ./gradlew assembleDebug --no-daemon --build-cache
84+
85+
- name: Stop Gradle Daemon
86+
working-directory: example/android
87+
run: ./gradlew --stop

.github/workflows/ios-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ on:
3737
env:
3838
USE_CCACHE: 1
3939

40+
concurrency:
41+
group: ${{ github.workflow }}-${{ github.ref }}
42+
cancel-in-progress: true
43+
4044
jobs:
4145
build_new:
4246
name: Build iOS Example App (new architecture)

0 commit comments

Comments
 (0)