Skip to content

Kotlin 1.9.23 update #581

Kotlin 1.9.23 update

Kotlin 1.9.23 update #581

Workflow file for this run

name: Android Emulator tests
on:
pull_request:
workflow_dispatch:
inputs:
project:
description: 'Project (Gradle module) to run tests for'
required: false
type: string
video:
description: 'Record video'
required: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=\"-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false\" -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.daemon.jvm.options=-Xmx8G,-XX:MaxMetaspaceSize=512m,-Dorg.gradle.daemon=false,-Dkotlin.incremental=false"
JAVA_OPTS: "-Xmx8G -XX:MaxMetaspaceSize=512m -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 120
jobs:
build:
uses: ./.github/workflows/setup_macos.yaml
with:
gradleTask: bundleLibRuntimeToJarDebug
project: ${{ inputs.project }}
projectBlacklist: hud
test:
needs: build
runs-on: macos-13
strategy:
fail-fast: false
matrix:
api-level: [23, 34]
project: ${{ fromJSON(needs.build.outputs.projects) }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup tools and cache for workspace
uses: ./.github/workflows/setup_tools_macos/
with:
kotlinVersion: ${{ needs.build.outputs.kotlinVersion }}
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd.v11-${{ 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 }}
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
disk-size: 3G
ram-size: 3G
heap-size: 1500M
profile: 3.4in WQVGA
channel: canary
cores: 6
script: ./script/check_emulator.sh
- name: install ffmpeg
if: inputs.video
uses: FedericoCarboni/setup-ffmpeg@v2
- name: pregenerate test package
if: inputs.video
run: ./gradlew :${{ matrix.project }}:packageDebugAndroidTest
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot-save -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
disk-size: 3G
ram-size: 3G
heap-size: 1500M
profile: 3.4in WQVGA
channel: canary
cores: 6
script: |
./script/check_emulator.sh
./gradlew ${{ inputs.video && 'recordAndroid' }} :${{ matrix.project }}:connectedDebugAndroidTest
- name: rename video
if: always() && inputs.video
run: mv build/video.mp4 recording-${{ matrix.project }}-${{ matrix.api-level }}.mp4
- name: upload video
if: always() && inputs.video
continue-on-error: true
uses: actions/upload-artifact@master
with:
name: recording-${{ matrix.project }}-${{ matrix.api-level }}
path: recording-${{ matrix.project }}-${{ matrix.api-level }}.mp4