-
Notifications
You must be signed in to change notification settings - Fork 2
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
0755586
commit b7bf16c
Showing
4 changed files
with
90 additions
and
47 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 |
---|---|---|
|
@@ -15,14 +15,17 @@ jobs: | |
steps: | ||
- name: Checkout project sources | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Build with Gradle Wrapper | ||
uses: gradle/[email protected] | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Gradle Setup | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-version: wrapper | ||
arguments: build | ||
|
@@ -36,52 +39,87 @@ jobs: | |
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout project source code | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: "temurin" | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Build with Gradle Wrapper | ||
uses: gradle/[email protected] | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Gradle Setup | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
arguments: test --full-stacktrace | ||
|
||
android-tests: | ||
runs-on: macos-latest | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 35 | ||
needs: [ build-gradle, unit-tests ] | ||
strategy: | ||
matrix: | ||
include: | ||
- api-level: 28 | ||
target: default | ||
arch: x86 | ||
- api-level: 33 | ||
target: google_apis # emulator API 33 only exists with Google APIs | ||
arch: x86_64 | ||
api-level: [ 26,33 ] | ||
target: [ google_apis ] | ||
arch: [ x86_64 ] | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: "temurin" | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Gradle Setup | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: AVD cache | ||
uses: actions/cache@v3 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }} | ||
|
||
- 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 }} | ||
target: ${{ matrix.target }} | ||
arch: ${{ matrix.arch }} | ||
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 android tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
target: ${{ matrix.target }} | ||
arch: ${{ matrix.arch }} | ||
script: ./gradlew $GRADLE_OPTS connectedCheck --stacktrace | ||
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 --stacktrace | ||
|
||
publish-to-snapshot: | ||
name: Publish SNAPSHOT to sonatype.org | ||
|
@@ -93,16 +131,21 @@ jobs: | |
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout project sources | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
java-version: 17 | ||
distribution: "temurin" | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Publish with Gradle Wrapper | ||
uses: gradle/gradle-build-action@v3.1.0 | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
arguments: publishAllPublicationsToMavenCentral --full-stacktrace | ||
env: | ||
|
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
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
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