Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
CI API 24 cache
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Dec 10, 2023
1 parent 964dd71 commit 4d428d3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/instrumented.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -25,6 +27,25 @@ jobs:
run: gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-24
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
arch: x86_64
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions templates/workflows/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"config": {
"actionCheckoutVersion": "v4",
"actionSetupJavaVersion": "v3",
"actionGradleBuildActionVersion": "v2",
"actionAndroidEmulatorRunnerVersion": "v2",
"actionCacheVersion": "v3",
"javaVersion": 17,
"javaDistribution": "temurin"
},
Expand Down
21 changes: 21 additions & 0 deletions templates/workflows/instrumented.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@<%= config.actionCheckoutVersion %>
- name: Gradle cache
uses: gradle/gradle-build-action@<%= config.actionGradleBuildActionVersion %>
- name: set up JDK <%= config.javaVersion %>
uses: actions/setup-java@<%= config.actionSetupJavaVersion %>
with:
Expand All @@ -25,6 +27,25 @@ jobs:
run: gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: AVD cache
uses: actions/cache@<%= config.actionCacheVersion %>
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-<%= job.api %>
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@<%= config.actionAndroidEmulatorRunnerVersion %>
with:
api-level: <%= job.api %>
arch: <%= job.arch %>
target: <%= job.target %>
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: run tests
uses: reactivecircus/android-emulator-runner@<%= config.actionAndroidEmulatorRunnerVersion %>
with:
Expand Down

0 comments on commit 4d428d3

Please sign in to comment.