@@ -63,51 +63,14 @@ jobs:
63
63
- name : Clean GMD
64
64
run : ./gradlew cleanManagedDevices --unused-only
65
65
66
- # Runs all Baseline Profiles generators on Gradle Managed Device
67
- # If the module contains both benchmarks and generators, we need to filter just the generators,
68
- # because benchmarks should be run on a physical device and thus would fail by default.
69
- - name : Run generator with GMD
70
- uses : nick-fields/retry@v2
71
- with :
72
- max_attempts : 2
73
- command : >
74
- ./gradlew :app:generateBaselineProfile
75
- -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
76
- -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
77
-
78
- - name : Upload Logcat logs
79
- uses : actions/upload-artifact@v3
80
- if : always()
81
- with :
82
- name : " Logcat"
83
- path : MacrobenchmarkSample/baselineProfile/build/outputs/androidTest-results/managedDevice/pixel6Api31/logcat-*.txt
84
-
85
- # Upload all the generated profiles to artifacts
86
- - name : Upload generated profiles
87
- uses : actions/upload-artifact@v3
88
- with :
89
- name : " Baseline Profiles"
90
- path : MacrobenchmarkSample/app/src/release/generated/baselineProfiles/*.txt
91
-
92
- # Create a PR with the generated Baseline Profiles
93
- - name : Create PR with generated profiles
94
- uses : peter-evans/create-pull-request@v5
95
- with :
96
- token : ${{ secrets.ANDROID_DEVREL_BOT_TOKEN }}
97
- commit-message : ' [Generated] Baseline Profiles'
98
- committer :
BP Bot <[email protected] >
99
- author :
BP Bot <[email protected] >
100
- title : ' [Generated] Baseline Profiles'
101
- body : ' Updates baseline profiles'
102
- reviewers : ${{ github.actor }}
103
- branch : bot/update-baseline-profiles
104
-
105
- # If you generate the rules before producing your production app, you need to build it here with the profile.
106
- # We use benchmark variant, because release variant is not specified,
107
- # but generally this is where you want to generate your production version of your app
66
+ # With the baseline profile Gradle plugin, release variants generate baseline profiles.
108
67
- name : Build production app
109
- run : >
110
- ./gradlew assembleRelease
68
+ run : ./gradlew assembleRelease
69
+ -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
70
+ -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
71
+ -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
72
+ -Pandroid.experimental.androidTest.numManagedDeviceShards=1
73
+ -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
111
74
112
75
- name : Upload app with Baseline Profile
113
76
uses : actions/upload-artifact@v3
0 commit comments