Take internal working notes and bench details out of the public repo
AGENTS.md, HANDOFF.md, code-review-report.md, the implementation plan and the aftermarket parity roadmap described the internal bench, its addresses and in-house firmware; they now live in the private miner-firmware workspace and are git-ignored here. The remaining docs and the fixture header no longer point at them or at local infrastructure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
name: public-benchmark-pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: [build-test-release]
|
|
||||||
types: [completed]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: alkane-toolkit-public-benchmark-pages
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: alkane-verify
|
|
||||||
container:
|
|
||||||
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install SSH client
|
|
||||||
run: bash ci/ensure-build-deps.sh ssh
|
|
||||||
- name: Render measured benchmark history
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
run: python3 ci/bench_history.py render
|
|
||||||
- name: Publish public benchmark page
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
BENCH_PAGES_DEPLOY_KEY: ${{ secrets.BENCH_PAGES_DEPLOY_KEY }}
|
|
||||||
run: python3 ci/publish-bench-pages.py toolkit
|
|
||||||
- name: Clean generated page
|
|
||||||
if: always()
|
|
||||||
run: python3 ci/cleanup-generated.py
|
|
||||||
@@ -2,3 +2,8 @@
|
|||||||
**/target
|
**/target
|
||||||
.claude/
|
.claude/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
# Internal working notes live outside this public repository.
|
||||||
|
/AGENTS.md
|
||||||
|
/HANDOFF.md
|
||||||
|
/CLAUDE.md
|
||||||
|
code-review-report*.md
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
# Alkane Toolkit
|
# Alkane Toolkit
|
||||||
|
|
||||||
[](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions)
|
[](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/#coverage)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||||

|
[](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/)
|
||||||

|
[](LICENSE)
|
||||||
|
|
||||||
The code quality grade reports GUI Clippy and first-party Rust formatting checks
|
The badges link to the [project site](https://blueflare.gitea.bluefla.re/alkane-toolkit/): the [manual](https://blueflare.gitea.bluefla.re/alkane-toolkit/manual/),
|
||||||
from the last successful main build. Test coverage has a separate badge.
|
the [code-quality dashboard](https://blueflare.gitea.bluefla.re/alkane-toolkit/quality/) (how the grade is set, coverage by
|
||||||
|
crate and file) and the [benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/).
|
||||||
|
|
||||||
Desktop miner discovery and monitoring. The Rust GUI uses wxWidgets through
|
Desktop miner discovery and monitoring. The Rust GUI uses wxWidgets through
|
||||||
a patched [wx-rs bridge](thirdparty/wx-rs). In-app image flashing is disabled
|
a patched [wx-rs bridge](thirdparty/wx-rs). In-app image flashing is disabled
|
||||||
@@ -42,8 +43,7 @@ macOS is not built.
|
|||||||
aftermarket firmware to stock.
|
aftermarket firmware to stock.
|
||||||
|
|
||||||
Discovery is read-only. Control and restore actions change miners. Check the
|
Discovery is read-only. Control and restore actions change miners. Check the
|
||||||
selected devices before applying them. See the [implementation plan](docs/IMPLEMENTATION-PLAN.md)
|
selected devices before applying them.
|
||||||
and [firmware matrix](docs/aftermarket-parity-roadmap.md) for planned coverage.
|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ WX_RS_WXCONFIG="$HOME/.cache/wx-3.3.3-linux/bin/wx-config" \
|
|||||||
|
|
||||||
Keep build output off the source share. `main` runs full CI and publishes
|
Keep build output off the source share. `main` runs full CI and publishes
|
||||||
qualifying releases; `next` builds `-rc` candidates. Badges measure host
|
qualifying releases; `next` builds `-rc` candidates. Badges measure host
|
||||||
code, not installation support. See the public
|
code, not installation support. See the
|
||||||
[benchmark history](https://blueflare.gitea.bluefla.re/alkane-benchmarks/toolkit/).
|
[benchmark history](https://blueflare.gitea.bluefla.re/alkane-toolkit/bench/).
|
||||||
|
|
||||||
## Firmware safety
|
## Firmware safety
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ vendor/*|thirdparty/asic-rs/*)
|
|||||||
# resources, embedded assets). ui.rs/fixtures.rs/bin
|
# resources, embedded assets). ui.rs/fixtures.rs/bin
|
||||||
# match the UI arm above first, so they still bump Z, not Y.
|
# match the UI arm above first, so they still bump Z, not Y.
|
||||||
backend=true ;;
|
backend=true ;;
|
||||||
*) : ;; # docs, HANDOFF, README, thirdparty/wxwidgets tree: no bump
|
*) : ;; # docs, README, thirdparty/wxwidgets tree: no bump
|
||||||
esac
|
esac
|
||||||
done <<< "$changed"
|
done <<< "$changed"
|
||||||
|
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
"""Publish a measured benchmark page to the public, data-only Pages repo."""
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
from pathlib import Path
|
|
||||||
import shlex
|
|
||||||
import subprocess
|
|
||||||
import tempfile
|
|
||||||
from urllib.request import Request, urlopen
|
|
||||||
|
|
||||||
PAGES_REPO = "ssh://git@gitea.bluefla.re:2222/blueflare/alkane-benchmarks.git"
|
|
||||||
GUARD_REPO = "https://gitea.bluefla.re/blueflare/alkane-benchmarks.git"
|
|
||||||
GUARD_COMMIT = "ea160545c49bc419a245692deda8dd7db7a611eb"
|
|
||||||
PAGES_HOST = "gitea.bluefla.re"
|
|
||||||
PAGES_HOST_FINGERPRINT = "SHA256:lqB5cmC9E5HNeg/lkzdOwQ++I8A70Wx7lnNs6liN24g"
|
|
||||||
PAGES_HOST_KEY = "[gitea.bluefla.re]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1II6NkmRW+QAd+Wj+7qbNrA8Oo+/N/WRog4hELskn/"
|
|
||||||
|
|
||||||
|
|
||||||
def run(*args: str, env: dict[str, str] | None = None,
|
|
||||||
cwd: Path | None = None) -> subprocess.CompletedProcess[str]:
|
|
||||||
return subprocess.run(args, env=env, cwd=cwd, text=True,
|
|
||||||
capture_output=True, check=True)
|
|
||||||
|
|
||||||
|
|
||||||
def current_main_sha() -> str:
|
|
||||||
api = os.environ["GITHUB_API_URL"].rstrip("/")
|
|
||||||
repo = os.environ["GITHUB_REPOSITORY"]
|
|
||||||
token = os.environ["GITEA_TOKEN"]
|
|
||||||
request = Request(f"{api}/repos/{repo}/branches/main",
|
|
||||||
headers={"Authorization": f"token {token}"})
|
|
||||||
with urlopen(request, timeout=20) as response:
|
|
||||||
branch = json.load(response)
|
|
||||||
return branch["commit"]["id"]
|
|
||||||
|
|
||||||
|
|
||||||
def publish(site: str) -> None:
|
|
||||||
if os.environ.get("GITHUB_REF") != "refs/heads/main":
|
|
||||||
raise ValueError("benchmark Pages publication requires main")
|
|
||||||
sha = os.environ["GITHUB_SHA"]
|
|
||||||
if current_main_sha() != sha:
|
|
||||||
print("Skipping benchmark page from a superseded main commit")
|
|
||||||
return
|
|
||||||
page = Path("bench-site/index.html").read_bytes()
|
|
||||||
if not page.startswith(b"<!doctype html>") or len(page) > 1_048_576:
|
|
||||||
raise ValueError("invalid benchmark page")
|
|
||||||
with tempfile.TemporaryDirectory(prefix="alkane-pages-") as directory:
|
|
||||||
temporary = Path(directory)
|
|
||||||
guard_checkout = temporary / "guard"
|
|
||||||
run("git", "clone", "--quiet", "--single-branch", "--branch", "next",
|
|
||||||
GUARD_REPO, str(guard_checkout))
|
|
||||||
guard_source = run("git", "show", f"{GUARD_COMMIT}:ci/validate_site.py",
|
|
||||||
cwd=guard_checkout).stdout
|
|
||||||
guard_script = temporary / "validate_site.py"
|
|
||||||
guard_script.write_text(guard_source)
|
|
||||||
run("python3", str(guard_script), "--page", site,
|
|
||||||
str(Path("bench-site/index.html").resolve()))
|
|
||||||
key = os.environ["BENCH_PAGES_DEPLOY_KEY"]
|
|
||||||
if not key.startswith("-----BEGIN OPENSSH PRIVATE KEY-----"):
|
|
||||||
raise ValueError("missing benchmark Pages deploy key")
|
|
||||||
key_path = temporary / "deploy_key"
|
|
||||||
key_path.write_text(key.rstrip("\n") + "\n")
|
|
||||||
key_path.chmod(0o600)
|
|
||||||
known_hosts = temporary / "known_hosts"
|
|
||||||
known_hosts.write_text(PAGES_HOST_KEY + "\n")
|
|
||||||
fingerprint = run("ssh-keygen", "-lf", str(known_hosts)).stdout.split()[1]
|
|
||||||
if fingerprint != PAGES_HOST_FINGERPRINT:
|
|
||||||
raise ValueError("benchmark Pages SSH host key changed")
|
|
||||||
git_env = os.environ.copy()
|
|
||||||
ssh_command = (f"ssh -i {shlex.quote(str(key_path))} -o IdentitiesOnly=yes "
|
|
||||||
f"-o UserKnownHostsFile={shlex.quote(str(known_hosts))} "
|
|
||||||
"-o StrictHostKeyChecking=yes -o ConnectTimeout=10")
|
|
||||||
git_env["GIT_SSH_COMMAND"] = ssh_command
|
|
||||||
git_env["GIT_TERMINAL_PROMPT"] = "0"
|
|
||||||
checkout = temporary / "site"
|
|
||||||
run("git", "clone", "--quiet", "--single-branch", "--branch", "gh-pages",
|
|
||||||
PAGES_REPO, str(checkout), env=git_env)
|
|
||||||
run("git", "config", "user.name", "Alkane CI", cwd=checkout)
|
|
||||||
run("git", "config", "user.email", "ci@bluefla.re", cwd=checkout)
|
|
||||||
for attempt in range(3):
|
|
||||||
if current_main_sha() != sha:
|
|
||||||
print("Skipping benchmark page from a superseded main commit")
|
|
||||||
return
|
|
||||||
run("git", "fetch", "--quiet", "origin", "gh-pages", env=git_env,
|
|
||||||
cwd=checkout)
|
|
||||||
run("git", "checkout", "-q", "-B", "bench-publish", "origin/gh-pages",
|
|
||||||
cwd=checkout)
|
|
||||||
destination = checkout / site / "index.html"
|
|
||||||
destination.parent.mkdir(exist_ok=True)
|
|
||||||
destination.write_bytes(page)
|
|
||||||
run("git", "add", f"{site}/index.html", cwd=checkout)
|
|
||||||
changed = subprocess.run(("git", "diff", "--cached", "--quiet"),
|
|
||||||
cwd=checkout, check=False)
|
|
||||||
if changed.returncode == 0:
|
|
||||||
print(f"{site} benchmark page is already current")
|
|
||||||
return
|
|
||||||
if changed.returncode != 1:
|
|
||||||
raise RuntimeError("cannot compare benchmark page")
|
|
||||||
run("git", "commit", "-q", "-m",
|
|
||||||
f"Update {site} benchmarks for {sha[:10]} [skip ci]", cwd=checkout)
|
|
||||||
pushed = subprocess.run(("git", "push", "--quiet", "origin",
|
|
||||||
"HEAD:gh-pages"), env=git_env, cwd=checkout,
|
|
||||||
text=True, capture_output=True, check=False)
|
|
||||||
if pushed.returncode == 0:
|
|
||||||
print(f"Published {site} benchmark page for {sha[:10]}")
|
|
||||||
return
|
|
||||||
if attempt == 2:
|
|
||||||
raise RuntimeError(f"benchmark Pages push failed: {pushed.stderr.strip()}")
|
|
||||||
raise RuntimeError("benchmark Pages publication did not complete")
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("site", choices=("sdk", "os", "toolkit"))
|
|
||||||
publish(parser.parse_args().site)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
//! Bench-fleet fixtures: the expected hardware output of the 9 boards on
|
//! Fixture fleet: the expected hardware output of nine representative miners
|
||||||
//! 10.255.1.0/24 (see ../../../HANDOFF.md section 7 and the parent project's
|
//! (one per control-board family / firmware). These are the reference values
|
||||||
//! [removed]). These are the reference values the workflow tests compare
|
//! the workflow tests compare
|
||||||
//! the application's actual output against, and the rows the offline
|
//! the application's actual output against, and the rows the offline
|
||||||
//! `ALKANE_FAKE_SCAN` demo mode renders. Only miners that respond become rows,
|
//! `ALKANE_FAKE_SCAN` demo mode renders. Only miners that respond become rows,
|
||||||
//! so there is no synthetic "offline" fixture.
|
//! so there is no synthetic "offline" fixture.
|
||||||
|
|||||||
+1
-2
@@ -99,8 +99,7 @@ AZURE_SIGNING_TOKEN=$(az account get-access-token --resource https://codesigning
|
|||||||
## Native Windows runner
|
## Native Windows runner
|
||||||
|
|
||||||
`windows-native.yml` runs on the self-hosted runner `win11-test-vm`
|
`windows-native.yml` runs on the self-hosted runner `win11-test-vm`
|
||||||
(label `alkane-windows`, host mode) inside the Windows 11 test VM
|
(label `alkane-windows`, host mode) inside a Windows 11 test VM. It downloads the
|
||||||
(a local test VM). It downloads the
|
|
||||||
`alkane-toolkit-windows-tests` artifact of the triggering main run, runs every
|
`alkane-toolkit-windows-tests` artifact of the triggering main run, runs every
|
||||||
test executable and the UI self-test natively, and never blocks a release:
|
test executable and the UI self-test natively, and never blocks a release:
|
||||||
while the VM is off, the job waits for the runner.
|
while the VM is off, the job waits for the runner.
|
||||||
|
|||||||
Reference in New Issue
Block a user