Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build new architecture for mixed templates #614

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions .github/workflows/build-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
language:
- kotlin-objc
- kotlin-swift
arch:
- auto
exclude:
- type: module-new
language: kotlin-swift
Expand All @@ -52,27 +54,50 @@ jobs:
- os: ubuntu-latest
type: library
language: js
arch: auto
- os: ubuntu-latest
type: module-mixed
language: kotlin-objc
arch: new
- os: macos-14
type: module-mixed
language: kotlin-objc
arch: new
- os: ubuntu-latest
type: view-mixed
language: kotlin-objc
arch: new
- os: macos-14
type: view-mixed
language: kotlin-objc
arch: new
- os: ubuntu-latest
type: module-legacy
language: cpp
arch: auto
- os: ubuntu-latest
type: module-mixed
language: cpp
arch: auto
- os: ubuntu-latest
type: module-new
language: cpp
arch: auto
- os: macos-14
type: module-legacy
language: cpp
arch: auto
- os: macos-14
type: module-mixed
language: cpp
arch: auto
- os: macos-14
type: module-new
language: cpp
arch: auto

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}
cancel-in-progress: true

runs-on: ${{ matrix.os }}
Expand All @@ -84,13 +109,20 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Set environment variables
run: |
if [[ "${{ matrix.arch }}" == "new" ]]; then
echo "RCT_NEW_ARCH_ENABLED=1" >> $GITHUB_ENV
echo "ORG_GRADLE_PROJECT_newArchEnabled=true" >> $GITHUB_ENV
fi

- name: Build package
run: |
yarn workspace create-react-native-library prepare

- name: Get working directory
run: |
echo "work_dir=${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}" >> $GITHUB_ENV
echo "work_dir=${{ matrix.os }}-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Create library
run: |
Expand Down Expand Up @@ -158,9 +190,9 @@ jobs:
with:
path: |
${{ env.work_dir }}/.turbo
key: ${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}
key: ${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}-${{ hashFiles(format('{0}/yarn.lock', env.work_dir)) }}
restore-keys: |
${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-
${{ runner.os }}-library-turborepo-${{ matrix.type }}-${{ matrix.language }}-${{ matrix.arch }}-

- name: Check turborepo cache
if: env.android_build == 1 || env.ios_build == 1
Expand Down Expand Up @@ -248,13 +280,13 @@ jobs:
${{ runner.os }}-library-cocoapods-

- name: Install cocoapods
env:
NO_FLIPPER: 1
if: env.ios_build == 1 && env.turbo_cache_hit_ios != 1 && steps.library-cocoapods-cache.outputs.cache-hit != 'true'
working-directory: ${{ env.work_dir }}
run: |
cd example/ios
pod install
env:
NO_FLIPPER: 1

- name: Build example (iOS)
if: env.ios_build == 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"pipeline": {
<% if (example !== 'expo') { -%>
"build:android": {
"env": ["ORG_GRADLE_PROJECT_newArchEnabled"],
"inputs": [
"package.json",
"android",
Expand All @@ -18,6 +19,7 @@
"outputs": []
},
"build:ios": {
"env": ["RCT_NEW_ARCH_ENABLED"],
"inputs": [
"package.json",
"*.podspec",
Expand Down
Loading