diff options
| author | Albin <albin@mullvad.net> | 2022-02-01 08:23:42 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2022-02-01 14:38:28 +0100 |
| commit | 3688065e68967bce5cdb92ae4bfdc7da48183fb7 (patch) | |
| tree | 14851b4edb7f85cd38bfd1893db7e167ed131033 /.github/workflows | |
| parent | ad73cc1018ac3f5422d52931036dae4887cb7e5d (diff) | |
| download | mullvadvpn-3688065e68967bce5cdb92ae4bfdc7da48183fb7.tar.xz mullvadvpn-3688065e68967bce5cdb92ae4bfdc7da48183fb7.zip | |
Change to custom gradle cache action
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/android-app.yml | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 2f4884fd3f..6414d0776e 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -30,12 +30,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Declare commit sha variable - id: vars - shell: bash - run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Configure Rust uses: ATiltedTree/setup-rust@v1.0.4 with: @@ -61,18 +55,6 @@ jobs: with: ndk-version: r20b - - name: Configure cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - ./android/build - ./android/app/build - key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}-${{ steps.vars.outputs.sha_short }} - restore-keys: | - gradle-${{ steps.vars.outputs.sha_short }} - - name: Bind Cargo with NDK run: | cat >> $HOME/.cargo/config << EOF @@ -102,12 +84,31 @@ jobs: cargo run --bin address_cache > dist-assets/api-ip-address.txt $NDK_TOOLCHAIN_STRIP_TOOL --strip-debug --strip-unneeded -o "$STRIPPED_LIB_PATH" "$UNSTRIPPED_LIB_PATH" - - name: Build and run unit tests - run: | - cd android - ./gradlew --console plain assembleDebug - ./gradlew testDebugUnitTest - ./gradlew assembleAndroidTest + - name: Build Android app + uses: burrunan/gradle-cache-action@v1 + with: + job-id: jdk8 + arguments: assembleDebug + gradle-version: wrapper + build-root-directory: android + + - name: Run unit tests + uses: burrunan/gradle-cache-action@v1 + with: + job-id: jdk8 + arguments: testDebugUnitTest + gradle-version: wrapper + build-root-directory: android + execution-only-caches: true + + - name: Assemble instrumented test apk + uses: burrunan/gradle-cache-action@v1 + with: + job-id: jdk8 + arguments: assembleAndroidTest + gradle-version: wrapper + build-root-directory: android + execution-only-caches: true - name: Upload apks uses: actions/upload-artifact@v2 |
