Update dependency com.vanniktech.maven.publish to v0.27.0 (#1104) #161
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: CI | |
on: | |
# Only run push on main | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
concurrency: | |
group: 'ci-${{ github.event.merge_group.head_ref || github.head_ref }}-${{ github.workflow }}' | |
cancel-in-progress: true | |
jobs: | |
benchmarks: | |
runs-on: macOS-latest | |
# Don't run on merge_group events | |
if: github.event_name != 'merge_group' | |
env: | |
# Test on API 30 because that's the first version with ATDs | |
API_LEVEL: '30' | |
AVD_TARGET: 'aosp_atd' | |
AVD_ARCH: 'x86' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Check LFS files | |
uses: actionsdesk/[email protected] | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '20' | |
- name: Build benchmark | |
id: gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: ':samples:star:apk:assembleBenchmarkRelease :samples:star:benchmark:compileBenchmarkReleaseSources' | |
gradle-home-cache-cleanup: true | |
cache-read-only: false | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ env.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: ${{ env.API_LEVEL }} | |
target: ${{ env.AVD_TARGET }} | |
arch: ${{ env.AVD_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 benchmarks | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ env.API_LEVEL }} | |
target: ${{ env.AVD_TARGET }} | |
arch: ${{ env.AVD_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 :samples:star:benchmark:connectedBenchmarkReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.slack.circuit.sample.star.benchmark.NestedContentListBenchmark | |
- name: Upload build reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports-benchmark | |
path: | | |
**/build/reports/** |