feat: brownie packaging as XCFramework #356
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-lint: | |
| name: Build & static code analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build packages | |
| run: yarn build | |
| - name: Lint files | |
| run: yarn lint | |
| - name: Typecheck files | |
| run: yarn typecheck | |
| - name: Test Brownfield CLI | |
| run: | | |
| yarn workspace @callstack/react-native-brownfield brownfield --version | |
| android: | |
| name: 'Android: integrated tester & integration workflow with CLI' | |
| 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: Build packages | |
| run: yarn build | |
| - 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 }} | |
| restore-keys: | | |
| ${{ runner.os }}-tester-android-build- | |
| - 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') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tester-integrated-android-gradle- | |
| # == IntegratedTester == | |
| - name: Generate Brownie stores | |
| run: yarn run brownfield:codegen | |
| - name: Build integrated Android tester app | |
| run: yarn run build:tester-integrated:android | |
| # == RNApp == | |
| - name: Package AAR with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:package:android | |
| - name: Publish AAR artifact to Maven Local | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:publish:android | |
| - name: Verify debug AAR exists in Maven Local | |
| run: stat ~/.m2/repository/com/rnapp/brownfieldlib/0.0.1-local/brownfieldlib-0.0.1-local-debug.aar | |
| - name: Verify release AAR exists in Maven Local | |
| run: stat ~/.m2/repository/com/rnapp/brownfieldlib/0.0.1-local/brownfieldlib-0.0.1-local-release.aar | |
| # == AndroidApp == | |
| - name: Build native Android Brownfield app | |
| run: | | |
| yarn run build:example:android-consumer | |
| ios: | |
| name: Integrated tester iOS App | |
| runs-on: macos-latest | |
| needs: build-lint | |
| 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 Node.js | |
| uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5 # v6 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'yarn' | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build packages | |
| run: yarn build | |
| - name: Restore Pods cache | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 | |
| with: | |
| path: | | |
| apps/TesterIntegrated/swift/Pods | |
| key: ${{ runner.os }}-tester-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-tester-ios-pods- | |
| - name: Install pods | |
| run: | | |
| cd apps/TesterIntegrated/swift | |
| pod install | |
| # == IntegratedTester == | |
| - name: Build integrated iOS tester app | |
| run: | | |
| yarn run build:tester-integrated:ios | |
| # == RNApp == | |
| - name: Install pods (RNApp) | |
| run: | | |
| cd apps/RNApp/ios | |
| pod install | |
| - name: Package iOS framework with the Brownfield CLI | |
| run: | | |
| cd apps/RNApp | |
| yarn run brownfield:package:ios | |
| # == AppleApp == | |
| - name: Build Brownfield iOS native app | |
| run: | | |
| yarn run build:example:ios-consumer |