-
Notifications
You must be signed in to change notification settings - Fork 1.3k
72 lines (62 loc) · 2.17 KB
/
build-benchmark-nightly.yml
File metadata and controls
72 lines (62 loc) · 2.17 KB
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
72
name: Build Benchmark - Nightly
on:
schedule:
# Run nightly at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
# Allow manual triggering
jobs:
build-benchmark:
name: Run Benchmark
runs-on: android-large-runner
timeout-minutes: 120
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- name: Determine branch
id: determine-branch
run: |
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
else
echo "branch=develop" >> "$GITHUB_OUTPUT"
fi
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ steps.determine-branch.outputs.branch }}
submodules: recursive
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version-file: .github/.java-version
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
cache-read-only: true
- name: Install SDKMAN
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version
- name: Install Gradle Profiler
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradleprofiler 0.23.0
gradle-profiler --version
- name: Run Build Benchmarks and Process Results
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
python3 build-benchmarks/run-benchmark.py \
--gradle-user-home "$HOME/.gradle" \
--github-action-run-id "${{ github.run_id }}" \
--git-commit-sha "${{ github.sha }}" \
${{ github.event_name == 'schedule' && '--report-pixel' || '' }}
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: build-benchmark-results-${{ github.run_number }}
path: build-benchmarks/results/**/*.csv
retention-days: 30