Skip to content

Commit c8dd86b

Browse files
committed
ci: build new architecture for mixed templates
1 parent 8edf590 commit c8dd86b

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/workflows/build-templates.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ jobs:
5252
- os: ubuntu-latest
5353
type: library
5454
language: js
55+
- os: ubuntu-latest
56+
type: module-mixed
57+
language: kotlin-objc
58+
arch: new
59+
- os: macos-14
60+
type: module-mixed
61+
language: kotlin-objc
62+
arch: new
63+
- os: ubuntu-latest
64+
type: view-mixed
65+
language: kotlin-objc
66+
arch: new
67+
- os: macos-14
68+
type: view-mixed
69+
language: kotlin-objc
70+
arch: new
5571
- os: ubuntu-latest
5672
type: module-legacy
5773
language: cpp
@@ -72,7 +88,7 @@ jobs:
7288
language: cpp
7389

7490
concurrency:
75-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}
91+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}
7692
cancel-in-progress: true
7793

7894
runs-on: ${{ matrix.os }}
@@ -84,13 +100,20 @@ jobs:
84100
- name: Setup
85101
uses: ./.github/actions/setup
86102

103+
- name: Set environment variables
104+
run: |
105+
if [[ ${{ matrix.arch }} == 'new' ]]; then
106+
echo "RCT_NEW_ARCH_ENABLED=1" >> $GITHUB_ENV
107+
echo "ORG_GRADLE_PROJECT_newArchEnabled=true" >> $GITHUB_ENV
108+
fi
109+
87110
- name: Build package
88111
run: |
89112
yarn workspace create-react-native-library prepare
90113
91114
- name: Get working directory
92115
run: |
93-
echo "work_dir=${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}" >> $GITHUB_ENV
116+
echo "work_dir=${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}" >> $GITHUB_ENV
94117
95118
- name: Create library
96119
run: |
@@ -158,9 +181,9 @@ jobs:
158181
with:
159182
path: |
160183
${{ env.work_dir }}/.turbo
161-
key: ${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}
184+
key: ${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}
162185
restore-keys: |
163-
${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-
186+
${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}-
164187
165188
- name: Check turborepo cache
166189
if: env.android_build == 1 || env.ios_build == 1
@@ -248,13 +271,13 @@ jobs:
248271
${{ runner.os }}-library-cocoapods-
249272
250273
- name: Install cocoapods
274+
env:
275+
NO_FLIPPER: 1
251276
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true'
252277
working-directory: ${{ env.work_dir }}
253278
run: |
254279
cd example/ios
255280
pod install
256-
env:
257-
NO_FLIPPER: 1
258281
259282
- name: Build example (iOS)
260283
if: env.ios_build == 1

packages/create-react-native-library/templates/native-common-example/turbo.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pipeline": {
44
<% if (example !== 'expo') { -%>
55
"build:android": {
6+
"env": ["ORG_GRADLE_PROJECT_newArchEnabled"],
67
"inputs": [
78
"package.json",
89
"android",
@@ -18,6 +19,7 @@
1819
"outputs": []
1920
},
2021
"build:ios": {
22+
"env": ["RCT_NEW_ARCH_ENABLED"],
2123
"inputs": [
2224
"package.json",
2325
"*.podspec",

0 commit comments

Comments
 (0)