diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index edb76d028..a05e18c6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,8 +27,34 @@ jobs: - name: Prepare thirdparty run: bash ./gradlew -b thirdparty_build.gradle downloadAndPatchDjvu downloadAndMakeMupdf + + - name: Restore Native Libs + id: restore-nativeLibs + uses: actions/cache@v3 + with: + path: | + orion-viewer/nativeLibs/djvu + orion-viewer/nativeLibs/mupdf + key: ${{ runner.os }}-native-${{ hashFiles('thirdparty_build.gradle') }} + restore-keys: | + ${{ runner.OS }}-native- + - name: Build debug APK run: bash ./gradlew assembleDebug --stacktrace -Porion.CIBuild=true + if: steps.restore-nativeLibs.outputs.cache-hit != 'true' + +# - name: Save Native Libs +# id: save-nativeLibs +# uses: actions/cache/store@v3 +# if: steps.restore-nativeLibs.outputs.cache-hit != 'true' +# with: +# path: | +# orion-viewer/nativeLibs/djvu +# orion-viewer/nativeLibs/mupdf +# key: ${{ runner.os }}-native-${{ hashFiles('thirdparty_build.gradle') }} +# restore-keys: | +# ${{ runner.OS }}-native- + - name: Read value from Properties-file id: read_version_property uses: christian-draeger/read-properties@1.0.1 @@ -75,6 +101,18 @@ jobs: java-version: 11 distribution: corretto + - name: Restore Native Libs + id: restore-nativeLibs + uses: actions/cache@v3 + with: + path: | + orion-viewer/nativeLibs/djvu + orion-viewer/nativeLibs/mupdf + key: ${{ runner.os }}-native-${{ hashFiles('thirdparty_build.gradle') }} + restore-keys: | + ${{ runner.OS }}-native- + + - name: Prepare thirdparty run: bash ./gradlew -b thirdparty_build.gradle downloadAndPatchDjvu downloadAndMakeMupdf