diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 5e784b5d6904..da5139a1208a 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -155,15 +155,19 @@ jobs: - arch: "x86_64" abi: "x86_64" target: "x86_64-linux-android" + task: "cargoBuildX86_64" - arch: "i686" abi: "x86" target: "i686-linux-android" + task: "cargoBuildX86" - arch: "aarch64" abi: "arm64-v8a" target: "aarch64-linux-android" + task: "cargoBuildArm64" - arch: "armv7" abi: "armeabi-v7a" target: "armv7-linux-androideabi" + task: "cargoBuildArm" steps: # Fix for HOME path overridden by GH runners when building in containers, see: # https://github.com/actions/runner/issues/863 @@ -197,27 +201,28 @@ jobs: env: cache_hash: ${{ steps.native-lib-cache-hash.outputs.native_lib_hash }} with: - path: ./android/app/build/extraJni + path: ./android/app/build/rustJniLibs/android key: android-native-libs-${{ runner.os }}-${{ matrix.abi }}-${{ env.cache_hash }} - name: Build native libraries if: steps.cache-native-libs.outputs.cache-hit != 'true' - env: - RUSTFLAGS: --deny warnings - BUILD_TYPE: debug - run: | - ARCHITECTURES="${{ matrix.abi }}" - UNSTRIPPED_LIB_PATH="$CARGO_TARGET_DIR/${{ matrix.target }}/$BUILD_TYPE/libmullvad_jni.so" - STRIPPED_LIB_PATH="./android/app/build/extraJni/${{ matrix.abi }}/libmullvad_jni.so" - NDK_TOOLCHAIN_STRIP_TOOL="$NDK_TOOLCHAIN_DIR/llvm-strip" - cargo build --target ${{ matrix.target }} --verbose --package mullvad-jni --features api-override - $NDK_TOOLCHAIN_STRIP_TOOL --strip-debug --strip-unneeded -o "$STRIPPED_LIB_PATH" "$UNSTRIPPED_LIB_PATH" + uses: burrunan/gradle-cache-action@v1 + with: + job-id: jdk17 + arguments: ${{ matrix.task }} + gradle-version: wrapper + build-root-directory: android + execution-only-caches: false + # Disable if logs are hard to follow. + concurrent: true + read-only: ${{ github.ref != 'refs/heads/main' }} + - name: Upload native libs uses: actions/upload-artifact@v4 with: name: native-libs-${{ matrix.arch }} - path: android/app/build/extraJni + path: android/app/build/rustJniLibs/android if-no-files-found: error retention-days: 7 @@ -290,7 +295,9 @@ jobs: uses: burrunan/gradle-cache-action@v1 with: job-id: jdk17 - arguments: compileOssProdDebugKotlin + arguments: | + compileOssProdDebugKotlin + -x cargoBuild gradle-version: wrapper build-root-directory: android execution-only-caches: false @@ -316,7 +323,7 @@ jobs: - uses: actions/download-artifact@v4 with: pattern: native-libs-* - path: android/app/build/extraJni + path: android/app/build/rustJniLibs/android merge-multiple: true - uses: actions/download-artifact@v4 @@ -328,7 +335,9 @@ jobs: uses: burrunan/gradle-cache-action@v1 with: job-id: jdk17 - arguments: assembleOssProdDebug + arguments: | + assembleOssProdDebug + -x cargoBuild gradle-version: wrapper build-root-directory: android execution-only-caches: true @@ -341,7 +350,9 @@ jobs: if: github.event.inputs.run_firebase_tests == 'true' with: job-id: jdk17 - arguments: assemblePlayStagemoleDebug + arguments: | + assemblePlayStagemoleDebug + -x cargoBuild gradle-version: wrapper build-root-directory: android execution-only-caches: true @@ -396,7 +407,10 @@ jobs: uses: burrunan/gradle-cache-action@v1 with: job-id: jdk17 - arguments: ${{ matrix.assemble-command }} + arguments: | + ${{ matrix.assemble-command }} + -x cargoBuild + -x generateRelayList gradle-version: wrapper build-root-directory: android execution-only-caches: false diff --git a/.github/workflows/daemon.yml b/.github/workflows/daemon.yml index 2b6241d76f3f..2727d6697b54 100644 --- a/.github/workflows/daemon.yml +++ b/.github/workflows/daemon.yml @@ -10,7 +10,6 @@ on: - '!.github/CODEOWNERS' - '!android/**' - '!audits/**' - - '!build-apk.sh' - '!build.sh' - '!ci/**' - 'ci/check-rust.sh' diff --git a/.github/workflows/testframework.yml b/.github/workflows/testframework.yml index f8d729d27156..288aee4273f3 100644 --- a/.github/workflows/testframework.yml +++ b/.github/workflows/testframework.yml @@ -10,7 +10,6 @@ on: - '.github/workflows/daemon.yml' - '!android/**' - '!audits/**' - - '!build-apk.sh' - '!build.sh' - '!ci/**' - '!clippy.toml'