Usage as non navigation map #847
This file contains 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 CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: macos-13 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-android-build | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: android | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Touch local.properties (required for cargo-ndk) | |
run: touch local.properties | |
working-directory: android | |
- name: Build with Gradle | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew build | |
working-directory: android | |
check-ktfmt: | |
runs-on: macos-13 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-android-ktfmt | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: android | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Touch local.properties (required for cargo-ndk) | |
run: touch local.properties | |
working-directory: android | |
- name: Verify Kotlin formatting | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew ktfmtCheck | |
working-directory: android | |
test: | |
runs-on: macos-13 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-android-test | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: android | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Touch local.properties (required for cargo-ndk) | |
run: touch local.properties | |
working-directory: android | |
- name: Unit test | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew test | |
working-directory: android | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test-reports | |
path: | | |
android/**/build/reports | |
retention-days: 5 | |
verify-snapshots: | |
runs-on: macos-13 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-android-snapshots | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: android | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Touch local.properties (required for cargo-ndk) | |
run: touch local.properties | |
working-directory: android | |
- name: Verify snapshots | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew verifyPaparazziDebug | |
working-directory: android | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: snapshot-reports | |
path: | | |
android/**/build/reports | |
android/**/build/paparazzi | |
retention-days: 5 | |
connected-check: | |
runs-on: macos-13 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-android-connected-check | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
working-directory: android | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Touch local.properties (required for cargo-ndk) | |
run: touch local.properties | |
working-directory: android | |
- name: Run Connected Checks | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 30 | |
avd-name: macOS-13-x86-aosp-atd-30 | |
arch: x86 | |
target: aosp_atd | |
script: ./gradlew connectedCheck | |
working-directory: android | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: connected-reports | |
path: | | |
android/**/build/reports | |
retention-days: 5 |