benchmarks #529
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: benchmarks | |
on: | |
# pull_request: | |
# branches: [ '*' ] | |
schedule: | |
- cron: '0 3 * * *' | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
jobs: | |
benchmarks: | |
runs-on: macos-11 | |
if: github.repository == 'apollographql/apollo-kotlin' | |
steps: | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 | |
- uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b #v3.9.0 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef #v2.3.3 | |
with: | |
gradle-home-cache-cleanup: true | |
- run: | | |
ulimit -c unlimited | |
# Workaround an issue where kotlinNpmInstall outputs | |
# 'Resolving NPM dependencies using yarn' returns 137 | |
./gradlew compileKotlinJs | |
./gradlew --stop | |
- run: | | |
# Build the libs | |
./gradlew publishAllPublicationsToPluginTestRepository -x dokkaHtml | |
- run: | | |
# Build the benchmark apks | |
./gradlew -p benchmark assembleRelease assembleReleaseAndroidTest | |
# Step can be removed if/when gcloud is added to the macos image - See https://github.com/actions/virtual-environments/issues/4639 | |
- name: Setup gcloud | |
uses: google-github-actions/setup-gcloud@d51b5346f85640ec2aa2fa057354d2b82c2fcbce #v1.0.1 | |
- name: microbenchmarks | |
uses: martinbonnin/run-benchmarks@ef9043b9a646a109f7381a4bf20f82ead5cbd382 #main | |
with: | |
google_services_json: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
app_apk: 'benchmark/app/build/outputs/apk/release/app-release.apk' | |
test_apk: 'benchmark/microbenchmark/build/outputs/apk/androidTest/release/microbenchmark-release-androidTest.apk' | |
device_model: 'redfin,locale=en,orientation=portrait' | |
directories_to_pull: '/sdcard/Download' | |
environment_variables: 'clearPackageData=true,additionalTestOutputDir=/sdcard/Download,no-isolated-storage=true' | |
dd_api_key: ${{ secrets.DD_API_KEY }} | |
dd_metric_prefix: 'apollo.kotlin' | |
dd_dashboard_url: 'https://p.datadoghq.com/sb/d11002689-48ff7001681977d5a09c3a0775632cfa' | |
github_token: ${{ github.token }} | |
- name: nativebenchmarks | |
run: | | |
# Run the native benchmarks | |
./gradlew -p tests :native-benchmarks:allTests | |
# Upload the results to DataDog | |
./scripts/upload-native-benchmarks.main.kts | |
env: | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} |