Skip to content

chore: kotlin 2.0-RC1 #205

chore: kotlin 2.0-RC1

chore: kotlin 2.0-RC1 #205

Workflow file for this run

name: build and publish a snapshot
on:
push:
branches:
- master
- 'snapshot/*'
- 'kotlin-*'
paths-ignore:
- '**.md'
- '**.adoc'
- '**/.gitignore'
- './github/**'
- '!./github/workflow/snapshot.yml'
jobs:
build-upload:
runs-on: macOS-latest
strategy:
matrix:
api-level: [33]
target: [google_apis]
arch: [x86_64]
env:
SONATYPE_USERNAME: ${{ secrets.sonatype_username }}
SONATYPE_PASSWORD: ${{ secrets.sonatype_password }}
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
# - name: Check with Android
# uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main
- name: Gradle cache
uses: gradle/gradle-build-action@v3
- name: Enable KVM group perms
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
ls /dev/kvm
- 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 }}
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: true
disk-size: 6000M
heap-size: 600M
script: echo "Generated AVD snapshot for caching."
- name: Run tests
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-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedAndroidTest
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true
shell: bash