Added baseline and startup profile generation and push in NightlyBaselineProfiles.yaml

pull/1752/head
Mohsen Rzna 9 months ago
parent d378b2bdad
commit aef1bcfb28

@ -52,8 +52,33 @@ jobs:
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
- name: Build all build type and flavor permutations including baseline profiles
run: ./gradlew :app:assemble
# This generates both baseline and startup profile and adds them into the generated folder
- name: Generate Baseline Profile
run: ./gradlew :app:generateReleaseBaselineProfile
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
--stacktrace
- name: Config Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# This checks if baseline and startup profile are available, then proceed.
- name: Commit and Push Changes
run: |
if [ -d "app/src/main/baseline-prof.txt" ] || [ -d "app/build/baselineProfiles" ]; then
echo "Found baseline profile changes"
git add app/src/main/baseline-prof.txt || true
git add app/build/baselineProfiles/release/baseline-prof.txt || true
git commit -m "Update baseline profiles [automated]"
git push
else
echo "No baseline profile changes found"
echo "Checked locations:"
echo "- app/src/main/baseline-prof.txt"
echo "- app/build/baselineProfiles/release/baseline-prof.txt"
ls -la app/src/main || echo "Main directory not found"
ls -la app/build/baselineProfiles/release || echo "Release profiles directory not found"
exit 1
fi

Loading…
Cancel
Save