benchmarks #898
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 * * *' | |
workflow_dispatch: | |
env: | |
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
jobs: | |
benchmarks: | |
runs-on: macos-14 | |
if: github.repository == 'apollographql/apollo-kotlin' | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | |
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- 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 | |
- name: Setup gcloud | |
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 #v2.1.0 | |
- run: ./scripts/run-benchmarks.main.kts | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
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 }} |