ref(macrobenchmark): Trim comments and drop the cache encryption key #15
This file contains hidden or 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: '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: | |
| # Temporary scaffolding: workflow_dispatch cannot target a workflow that does not exist on | |
| # the default branch yet, so trigger on pushes to this branch while we validate the flow. | |
| # Remove before merge. | |
| push: | |
| branches: | |
| - no/macrobenchmark-sauce-results | |
| 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@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| 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: always() && 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: macrobenchmark-results | |
| path: ./artifacts/ | |
| if-no-files-found: warn |