ci(blacksmith): add blacksmith-testbox workflow for codex-rs#407
Merged
Conversation
Adds .github/workflows/blacksmith-testbox.yml so `blacksmith testbox warmup`
can dispatch a warm Blacksmith box for this repo.
Mirrors the working pattern from hasnastudio/platform-alumia-legacy-3:
workflow_dispatch with a testbox_id input, useblacksmith/checkout ->
useblacksmith/begin-testbox -> setup -> useblacksmith/run-testbox last.
Rust-specific: 16 vCPU / 60 GB runner, pinned 1.95.0 toolchain matching
rust-ci.yml, just + cargo-nextest preinstalled, and the toolchain env
persisted to ~/.bashrc / ~/.profile / /usr/local/bin so testbox login
shells (which do not inherit job env) can run cargo/just directly.
Registry is prefetched and the workspace optionally pre-checked so an
attached box is usable immediately instead of cold-compiling.
Usage:
blacksmith testbox warmup .github/workflows/blacksmith-testbox.yml \
--job light-checks-testbox --idle-timeout 30
blacksmith testbox run --id <id> "just clippy"
Run the prime/fetch/check steps from `codex-rs` so rustup picks up the repo's rust-toolchain.toml override (rustup resolves overrides from the current directory, not from --manifest-path). Warming from the repo root used the bootstrap toolchain, so every testbox command — which runs under codex-rs — would have recompiled the workspace anyway. Also drop the job-level `RUSTFLAGS: -D warnings`: it is not part of the persisted testbox env, so it changed the cargo fingerprint between the warm-up build and an interactive shell (another full rebuild), and repo CI does not set it either.
`rustup show active-toolchain` does not install a missing toolchain on rustup >= 1.28, so probe rustc/cargo first — the proxies install the version named by codex-rs/rust-toolchain.toml, which is the same path rust-ci.yml already depends on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/workflows/blacksmith-testbox.ymlso Blacksmith Testboxes can be warmed for this repo.Today
blacksmith testbox warmupfails on codewith with "does not contain a testbox step" — no workflow here declares theuseblacksmith/*-testboxactions. This adds one, modelled on the working pattern inhasnastudio/platform-alumia-legacy-3.What it does
workflow_dispatchwith atestbox_idinput (howwarmupattaches to the run)useblacksmith/checkout→useblacksmith/begin-testbox→ setup →useblacksmith/run-testboxlast (holds the box open)blacksmith-16vcpu-ubuntu-2404(60 GB) — codex-rs needs the RAM/diskrust-ci.yml, plusjust+cargo-nextest~/.bashrc/~/.profile//usr/local/bin— testbox login shells do not inherit job env, so without thiscargo/justare not on PATHcargo checks the workspace, so an attached box is usable immediately instead of cold-compiling for 10+ minutesVerification
light-checks-testbox), 9 steps,runs-on: blacksmith-16vcpu-ubuntu-2404dtolnay/rust-toolchain+taiki-e/install-actionSHAs copied from this repo'srust-ci.ymlhasnaorg and an API token scoped to that org (current CLI token ishasnastudio-bound). Once both exist:Notes
just check-fast/just test-fast-targetreferenced in some older docs do not exist in this repo's justfile — the real recipes arejust clippy,just test,just fmt-check.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.