-
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (66 loc) · 2.88 KB
/
weekly.yml
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
66
67
68
69
70
71
name: Weekly workflow
on:
schedule:
- cron: "0 0 * * 6" # At 00:00 on Saturday.
workflow_dispatch:
jobs:
update-gradle-wrapper:
name: Update Gradle Wrapper
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Update Gradle Wrapper
uses: gradle-update/[email protected]
with:
labels: Change type > dependencies
repo-token: ${{ secrets.PAT_GITHUB }}
baseline-profiles:
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: 17
- name: Build app and benchmark
run: ./gradlew :benchmark-macro:assembleBenchmark
- name: Clear unused Gradle Managed Devices
run: ./gradlew cleanManagedDevices --unused-only
- name: Run benchmark on Gradle Managed Device
# --info used to add a repro to https://issuetracker.google.com/issues/193118030
# config cache is disabled due to https://issuetracker.google.com/issues/262270582
run: |
./gradlew api31BenchmarkAndroidTest \
-Dorg.gradle.workers.max=1 \
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile \
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" \
--no-configuration-cache
# If we're on main branch, copy over the baseline profile and commit it to the repository
- name: Commit baseline profile into main
if: github.ref == 'refs/heads/main'
run: |
# Pull down any changes which may have been committed while this workflow has been running
git pull
# Copy the baseline profile to :app
cp benchmark/build/outputs/managed_device_android_test_additional_output/api31/BaselineProfileGenerator_generateBaselineProfile-baseline-prof.txt app/src/main/baseline-prof.txt
# If the baseline profile has changed, commit it
if [[ $(git diff --stat app/src/main/baseline-prof.txt) != '' ]]; then
git config user.name github-actions
git config user.email [email protected]
git add app/src/main/baseline-prof.txt
git commit -m "Update app baseline profile" && git push --no-verify
fi
- name: Upload baseline profile
uses: actions/upload-artifact@v3
with:
name: baseline-profile-output
path: benchmark/build/outputs/managed_device_android_test_additional_output
- name: Upload test results Artifact
uses: actions/[email protected]
if: always()
with:
name: baseline-profile-test-report-avd-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }}
path: |
**/build/reports/*
if-no-files-found: warn