Daily benchmark #91
This file contains 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: Daily benchmark | |
on: | |
# Run daily at midnight. | |
schedule: | |
- cron: 0 0 * * * | |
# Allow running manually. | |
workflow_dispatch: | |
jobs: | |
run-bench-suite: | |
name: Run benchmark suite | |
uses: ./.github/workflows/bench-suite.yml | |
with: | |
self-hosted-runner: true | |
upload-to-bencher: | |
name: Upload results to Bencher | |
runs-on: ubuntu-latest | |
needs: run-bench-suite | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Bencher | |
uses: bencherdev/bencher@main | |
- name: Download benchmark results | |
uses: actions/download-artifact@v4 | |
with: | |
name: benchmark-results | |
- name: Download file size binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: file-size | |
path: file-size | |
- name: Find Bevy hash | |
id: bevy-hash | |
uses: ./.github/actions/extract-hash | |
with: | |
metadata: ${{ needs.run-bench-suite.outputs.bevy-metadata }} | |
- name: Upload benchmarks to Bencher | |
env: | |
BENCHER_PROJECT: bevy | |
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
BENCHER_TESTBED: grapefruit | |
run: | | |
bencher run \ | |
--adapter rust_criterion \ | |
--hash ${{ steps.bevy-hash.outputs.hash }} \ | |
--file results.txt | |
- name: Upload file sizes to Bencher | |
env: | |
BENCHER_PROJECT: bevy | |
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
BENCHER_TESTBED: github-actions | |
run: | | |
bencher run \ | |
--adapter json \ | |
--hash ${{ steps.bevy-hash.outputs.hash }} \ | |
--file-size file-size/default \ | |
--file-size file-size/minimal \ | |
--file-size file-size/empty | |
deploy-criterion-report: | |
name: Deploy Criterion report | |
runs-on: ubuntu-latest | |
needs: run-bench-suite | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
steps: | |
- name: Download Crtierion report | |
uses: actions/download-artifact@v4 | |
with: | |
name: criterion-report | |
- name: Create redirect page | |
run: echo '<meta http-equiv="refresh" content="0; url=report/index.html">' > index.html | |
- name: Upload site artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./ | |
- name: Deploy to Github Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |