Build Android example apps #6
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: Build Android example apps | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: '[Optional] Commit SHA1, branch or tag to build. The latest SHA1 on a given branch is used if no value is provided.' | |
| required: false | |
| type: string | |
| workflow_call: | |
| inputs: | |
| sha: | |
| description: '[Optional] Commit SHA1, branch or tag to build. The latest SHA1 on a given branch is used if no value is provided.' | |
| required: false | |
| type: string | |
| jobs: | |
| print_arguments: | |
| name: Print arguments | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Print entered "sha" | |
| run: echo "$SHA" | |
| env: | |
| SHA: ${{ inputs.sha }} | |
| build: | |
| name: Build & upload | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project sources | |
| uses: actions/checkout@v4 | |
| - name: Install JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| cache: gradle | |
| - name: Install Rust target | |
| run: rustup update && rustup target add aarch64-linux-android && rustup target add x86_64-linux-android | |
| - name: Build Android example app | |
| run: ./ci/prepare_example_apps_android.sh | |
| env: | |
| SKIP_PROTO_GEN: 1 | |
| - name: Upload Android example apps | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Android Example Apps | |
| path: ./dist/example-apps.android.zip | |
| if-no-files-found: error |