chore: use matrix to build variants on android #167
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: Android build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/android.yml' | |
| - 'android/**' | |
| - 'common/**' | |
| - 'example/android/**' | |
| pull_request: | |
| paths: | |
| - '.github/workflows/android.yml' | |
| - 'android/**' | |
| - 'common/**' | |
| - 'example/android/**' | |
| jobs: | |
| android-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| newArch: [true, false] | |
| buildType: [Debug, Release] | |
| name: Build (newArch=${{ matrix.newArch }}, buildType=${{ matrix.buildType }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Restore yarn workspaces | |
| id: yarn-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| */*/node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Install example app dependencies | |
| run: yarn install | |
| working-directory: example | |
| - name: Build Android example app | |
| run: ./gradlew assemble${{ matrix.buildType }} -PnewArchEnabled=${{ matrix.newArch }} | |
| working-directory: example/android |