-
-
Notifications
You must be signed in to change notification settings - Fork 478
Expand file tree
/
Copy pathintegration-tests-macrobenchmark.yml
More file actions
65 lines (55 loc) · 2.52 KB
/
Copy pathintegration-tests-macrobenchmark.yml
File metadata and controls
65 lines (55 loc) · 2.52 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
59
60
61
62
63
64
65
name: 'Integration Tests - Macrobenchmark'
# Runs the sentry-uitest-android-macrobenchmark cold-start benchmark on a Sauce Labs real
# device and recovers timeToInitialDisplay from the device log.
#
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
macrobenchmark:
name: Macrobenchmark
runs-on: ubuntu-latest
# we copy the secret to the env variable in order to access it in the workflow
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
steps:
- name: Git checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 'Set up Java: 17'
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- name: Assemble target app and Macrobenchmark apk
if: env.SAUCE_USERNAME != null
run: ./gradlew :sentry-samples:sentry-samples-android:assembleRelease :sentry-android-integration-tests:sentry-uitest-android-macrobenchmark:assembleBenchmark
- name: Run Macrobenchmark in SauceLab
uses: saucelabs/saucectl-run-action@283660aa934c02723c497efa151d582a3acc5801 # pin@v3
if: env.SAUCE_USERNAME != null
env:
GITHUB_TOKEN: ${{ github.token }}
with:
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-macrobenchmark.yml
# Runs even when the suite fails: a failed benchmark still logs whatever it managed to
# measure, and the parser's own error explains what was missing.
- name: Recover benchmark results from the device log
if: ${{ !cancelled() && env.SAUCE_USERNAME != null }}
run: |
# Without pipefail the step passes on `tee`'s exit code, so a failed recovery
# would report success while silently producing no results.
set -o pipefail
python3 scripts/parse-macrobenchmark-log.py ./artifacts \
--json-out ./artifacts/benchmarkData.json | tee -a "$GITHUB_STEP_SUMMARY"
- name: Upload Sauce artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ !cancelled() }}
with:
name: macrobenchmark-results
path: ./artifacts/
if-no-files-found: warn