Skip to content

Commit

Permalink
Enable Github Actions caching
Browse files Browse the repository at this point in the history
  • Loading branch information
max-kammerer committed Oct 27, 2023
1 parent da2abf5 commit 382008e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,28 @@ jobs:
java-version: 11
distribution: corretto

- name: Setup Gradle Cache
uses: gradle/gradle-build-action@v2

- name: Restore Native Libs
id: restore-nativeLibs
uses: actions/cache@v3
with:
path: |
nativeLibs/djvu
nativeLibs/mupdf
nativeLibs/mupdfModule/build
nativeLibs/mupdfModule/.cxx
nativeLibs/djvuModule/build
key: ${{ runner.os }}-native-libs-${{ hashFiles('thirdparty_build.gradle') }}

- name: Prepare thirdparty
run: bash ./gradlew -b thirdparty_build.gradle downloadAndPatchDjvu downloadAndMakeMupdf
if: steps.restore-nativeLibs.outputs.cache-hit != 'true'

- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace -Porion.CIBuild=true

- name: Read value from Properties-file
id: read_version_property
uses: christian-draeger/[email protected]
Expand Down Expand Up @@ -75,8 +93,24 @@ jobs:
java-version: 11
distribution: corretto

- name: Setup Gradle Cache
uses: gradle/gradle-build-action@v2

- name: Restore Native Libs 2
id: restore-nativeLibs
uses: actions/cache@v3
with:
path: |
nativeLibs/djvu
nativeLibs/mupdf
nativeLibs/mupdfModule/build
nativeLibs/mupdfModule/.cxx
nativeLibs/djvuModule/build
key: ${{ runner.os }}-native-libs-${{ hashFiles('thirdparty_build.gradle') }}

- name: Prepare thirdparty
run: bash ./gradlew -b thirdparty_build.gradle downloadAndPatchDjvu downloadAndMakeMupdf
if: steps.restore-nativeLibs.outputs.cache-hit != 'true'

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
Expand Down

0 comments on commit 382008e

Please sign in to comment.