Skip to content

Commit 610c1ee

Browse files
committed
Added baseline and startup profile generation and push in NightlyBaselineProfiles.yaml
1 parent d378b2b commit 610c1ee

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

.github/workflows/NightlyBaselineProfiles.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,33 @@ jobs:
5252
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
5353
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
5454

55-
- name: Build all build type and flavor permutations including baseline profiles
56-
run: ./gradlew :app:assemble
57-
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile
58-
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
59-
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
55+
# This generates both baseline and startup profile and adds them into the generated folder
56+
- name: Generate Baseline Profile
57+
run: ./gradlew :app:generateReleaseBaselineProfile
58+
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile
59+
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
60+
--stacktrace
61+
62+
- name: Config Git
63+
run: |
64+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
65+
git config --global user.name "github-actions[bot]"
66+
67+
# This checks if baseline and startup profile are available, then proceed.
68+
- name: Commit and Push Changes
69+
run: |
70+
if [ -d "app/src/main/baseline-prof.txt" ] || [ -d "app/build/baselineProfiles" ]; then
71+
echo "Found baseline profile changes"
72+
git add app/src/main/baseline-prof.txt || true
73+
git add app/build/baselineProfiles/release/baseline-prof.txt || true
74+
git commit -m "Update baseline profiles [automated]"
75+
git push
76+
else
77+
echo "No baseline profile changes found"
78+
echo "Checked locations:"
79+
echo "- app/src/main/baseline-prof.txt"
80+
echo "- app/build/baselineProfiles/release/baseline-prof.txt"
81+
ls -la app/src/main || echo "Main directory not found"
82+
ls -la app/build/baselineProfiles/release || echo "Release profiles directory not found"
83+
exit 1
84+
fi

0 commit comments

Comments
 (0)