ci(perf): add the fixed Woodpecker G4 workflow
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
ci/woodpecker/manual/performance Pipeline failed
ci/woodpecker/push/main Pipeline was successful

Move the push/PR pipeline to .woodpecker/main.yml so the repository can use
Woodpecker's multi-workflow directory. Add .woodpecker/performance.yml: manual
only, master only, on the single fixed Woodpecker agent (platform_id
woodpecker-agent-1). It builds one release binary, pins the first CPU in the
container cpuset, runs 5 warmups + 20 samples with --approved-node, and prints
the full marqdo.perf.v2 report plus a compact G4 summary for extraction.

No PR code is executed on the performance agent; the workflow is manual.
This commit is contained in:
cflmy committed 2026-11-21 19:51:09 +08:00
1 parent a9cc1729e1
commit a3f3ecf9d0
7 files changed
+66 -7

No files matched your search

File renamed without changes.
+52
View File
@@ -0,0 +1,52 @@
# G4 fixed performance node.
#
# Manual only: this workflow never runs on push or pull_request and therefore
# never executes untrusted PR code on the designated performance agent. The
# repository currently has one Woodpecker agent (agent_id 1), so it is the
# fixed node; the CPU affinity and hardware/toolchain manifest are recorded in
# every report. Do not compare its timings with another machine or with
# QEMU/TCG.
when:
event: [manual]
branch: [master]
steps:
measure:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends python3 util-linux ca-certificates
- cargo build --release --locked -p marqdo-cli
- |
set -euo pipefail
allowed="$(awk '/^Cpus_allowed_list:/ {print $2}' /proc/self/status)"
cpu_list="${MARQDO_PERF_CPU_LIST:-$(printf '%s' "$allowed" | cut -d, -f1 | cut -d- -f1)}"
echo "G4_NODE host=$(uname -n) kernel=$(uname -r) arch=$(uname -m) allowed_cpus=$allowed pin=$cpu_list"
echo "G4_CPU $(awk -F: '/model name/ {print $2; exit}' /proc/cpuinfo | xargs)"
echo "G4_GOVERNOR $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null || echo unavailable)"
python3 tools/perf/runner.py --no-build --warmups 5 --samples 20 \
--approved-node --platform-id woodpecker-agent-1 \
--cpu-list "$cpu_list" --out perf.json
python3 - <<'PY'
import json
with open("perf.json", encoding="utf-8") as handle:
report = json.load(handle)
print(
"G4_STATUS "
f"{report['status']} correctness={report['correctness']} "
f"platform={report['platform_id']} "
f"binary={report['binary']['sha256']}"
)
for workload in report["workloads"]:
print(
"G4_WORKLOAD "
f"{workload['name']} {workload['status']} "
f"p50={workload.get('median_ms')} "
f"p95={workload.get('p95_ms')} "
f"rss={workload.get('max_rss_kb_median')}"
)
PY
echo "G4_REPORT_BEGIN"
cat perf.json
echo "G4_REPORT_END"
+1 -1
View File
@@ -43,7 +43,7 @@ plugin ABI v2 are not claimed to work here.
> (historical baseline; refresh before use).
CI: the private remote [git.cflmy.cn/cflmy/marqdo-cli](https://git.cflmy.cn/cflmy/marqdo-cli)
uses Woodpecker at [ci.cflmy.cn](https://ci.cflmy.cn); [`.woodpecker.yml`](.woodpecker.yml)
uses Woodpecker at [ci.cflmy.cn](https://ci.cflmy.cn); [`.woodpecker/main.yml`](.woodpecker/main.yml)
runs fmt, clippy, workspace tests and a release build. The strict OS-isolation
lane still requires the disposable VM described in [docs/ci.md](docs/ci.md).
+1 -1
View File
@@ -152,7 +152,7 @@ The remote SHA must be refreshed from CI after a push; do not read `c9f01aa8`
as the current tree.
This checkout's private remote is `https://git.cflmy.cn/cflmy/marqdo-cli` with
Woodpecker CI at `https://ci.cflmy.cn` (`.woodpecker.yml`). The Linux Docker
Woodpecker CI at `https://ci.cflmy.cn` (`.woodpecker/main.yml`). The Linux Docker
pipeline runs fmt/clippy/test/release-build; the docs-consistency gate runs in
`cargo test --workspace`. The GitHub-hosted native matrix is now green at
`5fcc111` ([run 30](https://github.com/cflmy/marqdo-cli/actions/runs/44896671929)).
+1 -1
View File
@@ -4,7 +4,7 @@
- Git remote: `https://git.cflmy.cn/cflmy/marqdo-cli.git`
- Woodpecker: `https://ci.cflmy.cn`
- Pipeline definition: [`.woodpecker.yml`](../.woodpecker.yml)
- Pipeline definition: [`.woodpecker/main.yml`](../.woodpecker/main.yml)
- Current hardening plan/RFC:
[`MARQDO_CI_SECURITY_PLATFORM_PERFORMANCE_RFC_20261121.md`](MARQDO_CI_SECURITY_PLATFORM_PERFORMANCE_RFC_20261121.md)
- Credentials are local-only and ignored; see
+2 -2
View File
@@ -41,12 +41,12 @@ curl -fsS -H "Authorization: Bearer $MARQDO_WOODPECKER_TOKEN" \
"$MARQDO_WOODPECKER_URL/api/user/repos"
```
CI itself is defined in `.woodpecker.yml`; the token is only for local API
CI itself is defined in `.woodpecker/main.yml`; the token is only for local API
queries/triggering, not for the pipeline. Configure any privileged secrets in
the Woodpecker repository settings, never in this repository.
## What is tracked
- `.woodpecker.yml` — public CI pipeline definition.
- `.woodpecker/main.yml` — public CI pipeline definition.
- this document — names/usage only, no values.
- `.secrets/` and `.env.local` — ignored local files.
+9 -2
View File
@@ -36,5 +36,12 @@ Rules enforced by the tool:
* Development-container smoke run (2026-11-21, `--warmups 1 --samples 3
--allow-smoke`): all nine workloads `VERIFIED`/`SMOKE`, no correctness
failures. Stored as a smoke artifact, **not** a release baseline.
* Remote G4: **UNVERIFIED** until a fixed self-hosted node runs
`.github/workflows/performance-linux.yml` with a fixed `--cpu-list`.
* Remote Woodpecker G4: the repository now has a manual
[`.woodpecker/performance.yml`](../.woodpecker/performance.yml) workflow on
the designated fixed agent (`platform_id: woodpecker-agent-1`). It runs
5 warmups / 20 samples, pins the first CPU in the container's
`Cpus_allowed_list`, and records the hardware/toolchain manifest. Trigger it
with the Woodpecker API using `"workflow": "performance"`; do not run it on
PR code. Its report is the G4 baseline for this node.
* GitHub G4: `.github/workflows/performance-linux.yml` remains available for a
physically separate node.