fix: export sasayaki audio when Android API < 31 #229
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: Android CI | |
| "on": | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-and-lint: | |
| name: Test and lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| env: | |
| CMAKE_VERSION: "3.22.1" | |
| NDK_VERSION: "29.0.14206865" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Initialize required submodules | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git submodule update --init --recursive third_party/hoshidicts-kotlin-bridge | |
| git submodule status --recursive | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android build tools | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| sdkmanager \ | |
| "platforms;android-36.1" \ | |
| "build-tools;36.0.0" \ | |
| "cmake;${CMAKE_VERSION}" \ | |
| "ndk;${NDK_VERSION}" | |
| ndk_home="${ANDROID_HOME}/ndk/${NDK_VERSION}" | |
| echo "ANDROID_NDK_HOME=${ndk_home}" >> "${GITHUB_ENV}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,x86_64-linux-android | |
| - name: Restore Cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: app/src/main/rust/hoshiepub | |
| - name: Install cargo-ndk | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if ! command -v cargo-ndk >/dev/null 2>&1; then | |
| cargo install cargo-ndk --locked | |
| fi | |
| - name: Restore Gradle cache | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Test, lint, and assemble debug APK | |
| shell: bash | |
| run: ./gradlew --no-daemon test lint assembleDebug |