rickub/ci-benchpublic Fork 0
8421335df28fbd4614c026374c4bd3896cd5f184
Commits
Clone
git clone https://git.rickub.com/rickub/ci-bench.git
git clone ssh://git@rickub.com/rickub/ci-bench.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

bench.yml · 97 lines · 3.6 KBYAML Blame HistoryRaw
ci-bench: cross-platform CI race scaffold (rickub CI vs GitHub Actions) 0baf736 Olivier Girardot yesterday1name: bench
2
3# THE RICKUB side of the CI race. Runs only on rickub's own CI: once
4# .rickub/workflows/ exists, rickub reads it as the SOLE workflow source and
5# ignores .github/workflows/ entirely (web/ci_dispatch.go walkWorkflows), so
6# this file and the GitHub copy never double-fire on one platform. Keep the
7# STEP ORDER identical to .github/workflows/bench.yml — that is the point of
8# the benchmark.
9#
10# runs-on: large (4 vCPU / 8 GiB / 32 GiB scratch, Docker-in-Docker guest
11# rootfs-docker-glibc.ext4) to roughly match github.com's ubuntu-latest
12# (4 vCPU / 16 GiB). The vCPU count matches; RAM does not — documented in the
13# README as a known asymmetry and a user decision (ubuntu-latest on rickub is
14# 2 vCPU / 4 GiB, cheaper and arguably the fairer "as-consumed" comparison).
15#
16# Deliberately NO `concurrency:` block: queue depth is part of what we
17# measure.
18
19on:
20 push:
21 branches: [main]
22 workflow_dispatch:
23
24permissions:
25 contents: read
26
27defaults:
28 run:
29 shell: bash
30
31env:
32 BENCH_PLATFORM: rickub
33
34jobs:
35 bench:
36 runs-on: large
37 timeout-minutes: 30
38 steps:
39 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
40
41 - name: mark job-start
42 run: |
43 rid="${GITHUB_RUN_ID:-0}-${GITHUB_RUN_ATTEMPT:-1}-$(git rev-parse --short HEAD)"
44 echo "BENCH_RUN_ID=$rid" >> "$GITHUB_ENV"
45 source "${GITHUB_WORKSPACE:-$PWD}/scripts/emit_timing.sh"
46 BENCH_RUN_ID="$rid" bench_mark job-start
47
48 # COLD build: every rickub job boots a fresh Firecracker microVM with a
49 # read-only rootfs and a fresh scratch disk, so this cargo run fetches
50 # every crate and compiles the full tree — exactly the GitHub twin's
51 # cold path. `rm -rf target` is belt and braces. No cache action on
52 # purpose.
53 - name: rust cold build
54 run: |
55 set -euo pipefail
56 source "${GITHUB_WORKSPACE:-$PWD}/scripts/emit_timing.sh"
57 bench_step rust-cold-build bash -ec \
58 'rm -rf workloads/rust-build/target && cargo build --manifest-path workloads/rust-build/Cargo.toml'
59
60 # WARM build: same job, same VM, target/ populated — the incremental
61 # no-op rebuild path.
62 - name: rust warm build
63 run: |
64 set -euo pipefail
65 source "${GITHUB_WORKSPACE:-$PWD}/scripts/emit_timing.sh"
66 bench_step rust-warm-build cargo build --manifest-path workloads/rust-build/Cargo.toml
67
68 - name: rust test
69 run: |
70 set -euo pipefail
71 source "${GITHUB_WORKSPACE:-$PWD}/scripts/emit_timing.sh"
72 bench_step rust-test cargo test --manifest-path workloads/rust-build/Cargo.toml
73
74 # The large class runs Docker-in-Docker (dockerd in the guest), so this
75 # exercises the guest's dockerd + registry pull path. Still guarded: a
76 # runner without docker records "skipped" instead of failing the job.
77 - name: docker build
78 run: |
79 set -euo pipefail
80 source "${GITHUB_WORKSPACE:-$PWD}/scripts/emit_timing.sh"
81 if command -v docker >/dev/null 2>&1; then
82 bench_step docker-build bash -ec \
83 'docker build -t ci-bench:docker workloads/docker-build && docker run --rm ci-bench:docker'
84 else
85 bench_skip docker-build "docker not available on runner"
86 fi
87
88 - name: probe runner
89 run: bash workloads/probe/probe.sh
90
91 - name: show results
92 run: cat "${GITHUB_WORKSPACE:-$PWD}/results.jsonl"
93
94 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
95 with:
96 name: bench-results
97 path: results.jsonl