Kotlin bindings, tests, swift/kotlin CI validation and release script #2
Workflow file for this run
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
name: Validate Kotlin | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
# Enrich gradle.properties for CI/CD | |
env: | |
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 4 --no-daemon | |
ARCH: x86_64 | |
DEVICE: Nexus 5X | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
api-level: [31] | |
concurrency: | |
# When running on main, use the sha to allow all runs of this workflow to run concurrently. | |
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs. | |
group: ${{ github.workflow }} | |
cancel-in-progress: ${{ github.ref_name != 'main' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- 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: | |
working-directory: platforms/android | |
api-level: ${{ matrix.api-level }} | |
profile: ${{ env.DEVICE }} | |
arch: ${{ env.ARCH }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
enable-hw-keyboard: true | |
script: echo "Generated AVD snapshot for caching." | |
- uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
working-directory: platforms/android | |
api-level: ${{ matrix.api-level }} | |
arch: ${{ env.ARCH }} | |
profile: ${{ env.DEVICE }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
enable-hw-keyboard: true | |
script: | | |
./gradlew :library:connectedDebugAndroidTest ${{ env.CI_GRADLE_ARG_PROPERTIES }} |