Repository navigation
58 lines (53 loc) · 2.42 KB
/
Copy pathbenchmarks.yml
File metadata and controls
58 lines (53 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: benchmarks
on:
# pull_request:
# branches: [ '*' ]
schedule:
- cron: '0 3 * * *'
jobs:
benchmarks:
runs-on: macos-11
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3
- uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3
with:
distribution: 'temurin'
java-version: '11'
- uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee #v2.1.4
- run: |
ulimit -c unlimited
# Workaround an issue where kotlinNpmInstall outputs
# 'Resolving NPM dependencies using yarn' returns 137
./gradlew compileKotlinJsIr compileKotlinJsLegacy
./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@877d4953d2c70a0ba7ef3290ae968eb24af233bb #v0.6.0
- 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 }}