update rust deps #184
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
| # https://github.com/ReVanced/revanced-manager-compose/blob/dev/.github/workflows/release.yml | |
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.workflow }}-ci | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build-Debug | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| lfs: true | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: gradle | |
| - name: Read versions from files | |
| id: versions | |
| run: | | |
| echo "rust=$(cat app/src/main/rust/RUST_VERSION)" >> $GITHUB_OUTPUT | |
| echo "ndk=$(cat app/src/main/rust/NDK_VERSION)" >> $GITHUB_OUTPUT | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ steps.versions.outputs.rust }} | |
| targets: aarch64-linux-android, x86_64-linux-android | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "./app/src/main/rust/" | |
| - name: Compile Rust lib | |
| run: | | |
| wget -q "https://dl.google.com/android/repository/android-ndk-${{ steps.versions.outputs.ndk }}-linux.zip" | |
| unzip -q "./android-ndk-${{ steps.versions.outputs.ndk }}-linux.zip" | |
| make NDK_PATH="$(pwd)/android-ndk-${{ steps.versions.outputs.ndk }}/toolchains/llvm/prebuilt/linux-x86_64/bin" -C app/src/main/rust build_install | |
| - name: Build App and run unit tests | |
| run: | | |
| ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace | |
| tests: | |
| name: Rust tests | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - run: rustup update | |
| - uses: taiki-e/install-action@just | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "./app/src/main/rust/" | |
| - name: Run tests | |
| working-directory: "./app/src/main/rust/" | |
| run: cargo test --verbose |