Skip to content

Daily Benchmarks

Daily Benchmarks #24

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Daily Benchmarks
on:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
actions: read
jobs:
# Find the most recent successful run of this workflow so we can download
# its benchmark artifacts as a baseline for day-over-day comparison.
find-baseline:
runs-on: ubuntu-latest
outputs:
run-id: ${{ steps.find-run.outputs.run_id }}
steps:
- name: Find latest successful run
id: find-run
# gh run list returns runs sorted by creation date descending (implicit).
# On the first-ever run, this outputs empty and dep_benchmarks.yml
# will skip the baseline download (continue-on-error).
run: |
run_id=$(gh run list --repo "${{ github.repository }}" --workflow DailyBenchmarks.yml --status success --limit 1 --json databaseId --jq '.[0].databaseId // empty')
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build release guest binaries needed by the benchmark suite.
build-guests:
uses: ./.github/workflows/dep_build_guests.yml
secrets: inherit
with:
config: release
# Run benchmarks across all hypervisor/cpu combos, comparing against
# the previous day's results. Artifacts are retained for 90 days.
benchmarks:
needs: [build-guests, find-baseline]
strategy:
fail-fast: true
matrix:
hypervisor: ['hyperv-ws2025', mshv3, kvm]
cpu: [amd, intel]
uses: ./.github/workflows/dep_benchmarks.yml
secrets: inherit
with:
hypervisor: ${{ matrix.hypervisor }}
cpu: ${{ matrix.cpu }}
baseline_run_id: ${{ needs.find-baseline.outputs.run-id }}
retention_days: 90
# File a GitHub issue if any job fails.
notify-failure:
runs-on: ubuntu-latest
needs: [build-guests, benchmarks]
if: always() && (needs.build-guests.result == 'failure' || needs.benchmarks.result == 'failure')
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Notify Benchmark Failure
run: ./dev/notify-ci-failure.sh --title="Benchmark Failure - ${{ github.run_number }}" --labels="area/benchmarks,area/testing,lifecycle/needs-review,release-blocker"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}