Build Benchmark - Nightly #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| 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@v4 | |
| with: | |
| 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 | |
| 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 |