-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab3dbe8
commit 1c532aa
Showing
2 changed files
with
54 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,10 @@ on: | |
jobs: | ||
build_and_upload_artifacts: | ||
name: Generate APK | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '2.7' | ||
|
||
- uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: set up JDK 11 | ||
|
@@ -33,7 +28,7 @@ jobs: | |
- name: Prepare thirdparty | ||
run: bash ./gradlew -b thirdparty_build.gradle downloadAndPatchDjvu downloadAndMakeMupdf | ||
- name: Build debug APK | ||
run: bash ./gradlew assembleDev --stacktrace -Porion.CIBuild=true | ||
run: bash ./gradlew assembleDebug --stacktrace -Porion.CIBuild=true | ||
- name: Read value from Properties-file | ||
id: read_version_property | ||
uses: christian-draeger/[email protected] | ||
|
@@ -42,22 +37,62 @@ jobs: | |
property: 'orion.version.name' | ||
|
||
- name: Upload arm7 APK | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: orion-viewer-dev-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-arm7.zip | ||
path: orion-viewer/build/outputs/apk/arm7/dev/*.apk | ||
name: orion-viewer-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-arm7-debug.zip | ||
path: orion-viewer/build/outputs/apk/arm7/debug/orion-viewer-${{steps.read_version_property.outputs.value}}-arm7-debug.apk | ||
- name: Upload arm64 APK | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: orion-viewer-dev-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-arm64.zip | ||
path: orion-viewer/build/outputs/apk/arm64/dev/*.apk | ||
name: orion-viewer-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-arm64-debug.zip | ||
path: orion-viewer/build/outputs/apk/arm64/debug/orion-viewer-${{steps.read_version_property.outputs.value}}-arm64-debug.apk | ||
- name: Upload x86 APK | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: orion-viewer-dev-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-x86.zip | ||
path: orion-viewer/build/outputs/apk/x86/dev/*.apk | ||
name: orion-viewer-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-x86-debug.zip | ||
path: orion-viewer/build/outputs/apk/x86/debug/orion-viewer-${{steps.read_version_property.outputs.value}}-x86-debug.apk | ||
- name: Upload x86_64 APK | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: orion-viewer-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-x86_64-debug.zip | ||
path: orion-viewer/build/outputs/apk/x86_64/debug/orion-viewer-${{steps.read_version_property.outputs.value}}-x86_64-debug.apk | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
api-level: [29] | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: AVD cache | ||
uses: actions/cache@v3 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ matrix.api-level }} | ||
|
||
- 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: ${{ matrix.api-level }} | ||
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: | ||
name: orion-viewer-dev-${{steps.read_version_property.outputs.value}}-${{github.run_number}}-x86_64.zip | ||
path: orion-viewer/build/outputs/apk/x86_64/dev/*.apk | ||
api-level: ${{ matrix.api-level }} | ||
force-avd-creation: false | ||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: true | ||
script: ./gradlew connectedCheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters