Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
43 changes: 43 additions & 0 deletions .github/actions/prepare-android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Prepare Android environment
description: Prepare Android environment and set up the project

inputs:
free-disk-space:
description: 'Whether to free disk space on the runner'
required: false
default: 'true'

run-yarn-build:
description: 'Whether to run yarn build'
required: false
default: 'true'

runs:
using: composite
steps:
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5

- name: Setup Java
uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5
with:
distribution: 'zulu'
java-version: '17'

- name: Free Disk Space (Ubuntu)
if: inputs.free-disk-space == 'true'
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: false

android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Build packages
if: inputs.run-yarn-build == 'true'
run: yarn build
shell: bash
27 changes: 27 additions & 0 deletions .github/actions/prepare-ios/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Prepare iOS environment
description: Prepare iOS environment and set up the project

inputs:
run-yarn-build:
description: 'Whether to run yarn build'
required: false
default: 'true'

runs:
using: composite
steps:
- name: Use appropriate Xcode version
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: '26'

- name: Setup Ruby
uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build packages
if: inputs.run-yarn-build == 'true'
run: yarn build
shell: bash
17 changes: 12 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Setup
description: Setup Node.js and install dependencies

inputs:
restore-turbo-cache:
description: 'Whether to restore the Turbo cache'
required: false
default: 'true'

runs:
using: composite
steps:
Expand All @@ -10,7 +16,12 @@ runs:
node-version: 'lts/*'
cache: 'yarn'

- name: Restore turbo cache
- name: Install dependencies
run: yarn install
shell: bash

- name: Restore Turbo cache
if: inputs.restore-turbo-cache == 'true'
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
Expand All @@ -20,7 +31,3 @@ runs:
key: ${{ runner.os }}-turbo-${{ hashFiles('.turbo', '**/.turbo') }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Install dependencies
run: yarn install
shell: bash
180 changes: 115 additions & 65 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,74 +30,53 @@ jobs:
- name: Typecheck files
run: yarn typecheck

- name: Test Brownfield CLI
- name: Test Brownfield CLI (version)
run: |
yarn workspace @callstack/react-native-brownfield brownfield --version

android:
name: 'Android: integrated tester & integration workflow with CLI'
name: Android road tests
runs-on: ubuntu-latest
needs: build-lint

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5

- name: Setup Java
uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5
with:
distribution: 'zulu'
java-version: '17'

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: false

android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Setup Node.js
uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5 # v6
with:
node-version: 'lts/*'
cache: 'yarn'

- name: Install dependencies
run: yarn install
- name: Setup
uses: ./.github/actions/setup

- name: Build packages
run: yarn build
- name: Prepare Android environment
uses: ./.github/actions/prepare-android

- name: Restore android build cache
- name: Restore Android build cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
apps/TesterIntegrated/kotlin/build
apps/TesterIntegrated/kotlin/app/.cxx
apps/TesterIntegrated/kotlin/app/build
key: ${{ runner.os }}-tester-android-build-${{ github.sha }}
apps/RNApp/android/build
apps/RNApp/android/app/.cxx
apps/RNApp/android/app/build
apps/AndroidApp/build
apps/AndroidApp/app/build
apps/AndroidApp/app/.cxx
key: ${{ runner.os }}-android-build-road-tests-${{ github.sha }}
restore-keys: |
${{ runner.os }}-tester-android-build-
${{ runner.os }}-android-build-road-tests-

- name: Restore Gradle cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-tester-integrated-android-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
key: ${{ runner.os }}-android-ci-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-tester-integrated-android-gradle-
${{ runner.os }}-android-ci-gradle-

# == IntegratedTester ==
# == TesterIntegrated ==

- name: Generate Brownie stores
run: yarn run brownfield:codegen
Expand Down Expand Up @@ -129,65 +108,131 @@ jobs:
run: |
yarn run build:example:android-consumer

ios:
name: Integrated tester iOS App
runs-on: macos-latest
ios-tester-integrated:
name: iOS road tests (TesterIntegrated)
runs-on: macos-26
needs: build-lint

env: &ios_env
USE_CCACHE: 1
CCACHE_DIR: ${{ github.workspace }}/.ios_ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPRESS: '1'

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Use appropriate Xcode version
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: '16'
- name: Setup
uses: ./.github/actions/setup

- name: Setup Node.js
uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5 # v6
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Prepare iOS environment
uses: ./.github/actions/prepare-ios

- name: Setup Ruby
uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0
with:
ruby-version: '3.2'
bundler-cache: true
- name: Install ccache
run: brew install ccache
Comment thread
thymikee marked this conversation as resolved.

- name: Install dependencies
run: yarn install
- name: Enable ccache
run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH

- name: Build packages
run: yarn build
- name: Restore TesterIntegrated ccache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
.ios_ccache
key: ${{ runner.os }}-tester-integrated-ios-ccache-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-tester-integrated-ios-ccache-

- name: Restore Pods cache
# == TesterIntegrated ==

- name: Restore Pods cache (TesterIntegrated)
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
apps/TesterIntegrated/swift/Pods
key: ${{ runner.os }}-tester-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }}
key: ${{ runner.os }}-tester-integrated-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-tester-ios-pods-
${{ runner.os }}-tester-integrated-ios-pods-

- name: Install pods
- name: Install pods (TesterIntegrated)
run: |
cd apps/TesterIntegrated/swift
pod install

# == IntegratedTester ==
- name: Restore DerivedData cache (TesterIntegrated)
uses: actions/cache@v5
with:
path: apps/TesterIntegrated/swift/build
key: ${{ runner.os }}-ios-tester-integrated-derived-data-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-ios-tester-integrated-derived-data-

- name: Build integrated iOS tester app
run: |
yarn run build:tester-integrated:ios

# ==============

- name: Report ccache usage
run: ccache -s

ios-rnapp-appleapp:
name: iOS road tests (RNApp & AppleApp)
runs-on: macos-26
needs: build-lint

env: *ios_env

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

- name: Setup
uses: ./.github/actions/setup

- name: Prepare iOS environment
uses: ./.github/actions/prepare-ios

- name: Install ccache
run: brew install ccache

- name: Enable ccache
run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH

- name: Restore RNApp & AppleApp ccache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
.ios_ccache
key: ${{ runner.os }}-rnapp-appleapp-ios-ccache-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj', 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-rnapp-appleapp-ios-ccache-

# == RNApp ==

- name: Restore Pods cache (RNApp)
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: |
apps/RNApp/ios/Pods
key: ${{ runner.os }}-rnapp-ios-pods-${{ hashFiles('apps/RNApp/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-rnapp-ios-pods-

- name: Install pods (RNApp)
run: |
cd apps/RNApp/ios
pod install

- name: Restore DerivedData cache (RNApp)
uses: actions/cache@v5
with:
path: apps/RNApp/ios/build
key: ${{ runner.os }}-ios-rnapp-derived-data-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-ios-rnapp-derived-data-

- name: Package iOS framework with the Brownfield CLI
run: |
cd apps/RNApp
Expand All @@ -198,3 +243,8 @@ jobs:
- name: Build Brownfield iOS native app
run: |
yarn run build:example:ios-consumer

# ==============

- name: Report ccache usage
run: ccache -s
7 changes: 1 addition & 6 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled

- name: Setup
uses: ./.github/actions/setup

- name: Setup Pages
uses: actions/configure-pages@d5606572c479bee637007364c6b4800ac4fc8573 # v5

- name: Install dependencies
working-directory: docs
run: yarn install

- name: Build with Rspress
working-directory: docs
run: |
Expand Down
Loading