Skip to content

run-benchmarks

run-benchmarks #49

name: run-benchmarks
on:
# pull_request:
# branches: [ '*' ]
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
jobs:
benchmarks:
runs-on: macos-15
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda #v3.4.2
with:
gradle-home-cache-cleanup: true
- run: |
# Build the benchmark apks
./gradlew -p benchmark :app:assembleRelease :microbenchmark:assembleReleaseAndroidTest
# Step can be removed if/when gcloud is added to the macos image - See https://github.com/actions/virtual-environments/issues/4639
- uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 #v2.1.0
- run: ./scripts/run-benchmarks.main.kts
env:
GOOGLE_SERVICES_JSON: ${{ secrets.APOLLO_KOTLIN_GOOGLE_SERVICES_JSON }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
GITHUB_TOKEN: ${{ github.token }}
- 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 }}