From f8151742333e305cb8044c3d36c91d7234da6842 Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Sat, 9 Dec 2023 22:07:42 -0400 Subject: [PATCH] CI API 24 cache --- .github/workflows/instrumented.yml | 16 ++++++++-------- package-lock.json | 21 ++++++++++++++++++++- package.json | 5 +++-- templates/workflows/instrumented.ejs | 16 ++++++++-------- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/.github/workflows/instrumented.yml b/.github/workflows/instrumented.yml index 56e9003..c0d8f25 100644 --- a/.github/workflows/instrumented.yml +++ b/.github/workflows/instrumented.yml @@ -38,14 +38,14 @@ jobs: - 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." + 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: diff --git a/package-lock.json b/package-lock.json index 8cef9ad..7797861 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "1.0.0", "license": "Apache-2.0", "devDependencies": { - "ejs": "^3.1.9" + "ejs": "^3.1.9", + "js-yaml": "^4.1.0" } }, "node_modules/ansi-styles": { @@ -27,6 +28,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.totalpave.com:48731/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/async": { "version": "3.2.5", "resolved": "https://registry.totalpave.com:48731/async/-/async-3.2.5.tgz", @@ -161,6 +168,18 @@ "node": ">=10" } }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.totalpave.com:48731/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.totalpave.com:48731/minimatch/-/minimatch-3.1.2.tgz", diff --git a/package.json b/package.json index 05cda9c..e648954 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,12 @@ "private": true, "version": "1.0.0", "scripts": { - "compile-workflows": "ejs -f ./templates/workflows/data.json -o ./.github/workflows/instrumented.yml ./templates/workflows/instrumented.ejs" + "compile-workflows": "ejs -f ./templates/workflows/data.json -o ./.github/workflows/instrumented.yml ./templates/workflows/instrumented.ejs && js-yaml -t ./.github/workflows/instrumented.yml > /dev/null" }, "author": "Breautek", "license": "Apache-2.0", "devDependencies": { - "ejs": "^3.1.9" + "ejs": "^3.1.9", + "js-yaml": "^4.1.0" } } diff --git a/templates/workflows/instrumented.ejs b/templates/workflows/instrumented.ejs index 7352b64..888e7af 100644 --- a/templates/workflows/instrumented.ejs +++ b/templates/workflows/instrumented.ejs @@ -38,14 +38,14 @@ jobs: - 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." + 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: