forked from hyperlight-dev/hyperlight
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.43 KB
/
DailyBenchmarks.yml
File metadata and controls
71 lines (63 loc) · 2.43 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
# 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 }}