@@ -130,6 +130,17 @@ variables:
130130 - apt-get install -y -qq --no-install-recommends
131131 protobuf-compiler pkg-config libssl-dev ca-certificates curl git
132132
133+ # Fetch the PREBUILT cargo-binstall (a single static binary) into
134+ # $CARGO_HOME/bin, so tool installs (`cargo binstall <tool>`) download a
135+ # prebuilt release instead of compiling the tool from source every pipeline.
136+ # Best-effort (`|| true`): if the fetch is unreachable, the per-tool install
137+ # lines fall back to `cargo install` (source), so binstall is a pure
138+ # accelerator and never a hard dependency of a gate. Requires curl on PATH.
139+ .install-binstall : &install-binstall
140+ - curl -L --proto '=https' --tlsv1.2 -sSf
141+ https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh
142+ | bash || true
143+
133144# Conditional internal-PKI CA trust. Two trust-store flavours: RHEL-family
134145# (the buildah image) and Debian/Alpine (rust:slim, alpine/helm). Both are
135146# no-ops when PLATFORM_CA_PATH is unset or the file is absent, so a public-CA
@@ -335,7 +346,9 @@ test:coverage:
335346 - *platform-ca-deb
336347 - *hort-auth-steps
337348 - rustup component add llvm-tools-preview
338- - cargo install --locked cargo-llvm-cov || true
349+ - *install-binstall
350+ - cargo binstall --no-confirm --locked cargo-llvm-cov
351+ || cargo install --locked cargo-llvm-cov || true
339352 script :
340353 - cargo llvm-cov --workspace --lib
341354 --lcov --output-path lcov.info
@@ -405,13 +418,16 @@ test:integration:
405418security:cargo-audit :
406419 stage : security
407420 image : ${RUST_IMAGE}
408- needs :
409- - job : test:unit
410- artifacts : false
421+ # No workspace compile — `cargo audit` reads Cargo.lock and the tool is a
422+ # prebuilt binstall download — so this runs from pipeline start rather than
423+ # queuing behind the serialized test-compile chain.
424+ needs : []
411425 before_script :
412426 - apt-get update -qq
413- - apt-get install -y -qq --no-install-recommends ca-certificates git pkg-config libssl-dev
414- - cargo install --locked cargo-audit || true
427+ - apt-get install -y -qq --no-install-recommends ca-certificates git pkg-config libssl-dev curl
428+ - *install-binstall
429+ - cargo binstall --no-confirm --locked cargo-audit
430+ || cargo install --locked cargo-audit || true
415431 script :
416432 # Diagnostic JSON artefact captured first; failure-tolerant (||
417433 # true) so a non-zero exit still produces the upload below.
@@ -489,13 +505,16 @@ quality:no-plans-on-default-branch:
489505security:cargo-deny :
490506 stage : security
491507 image : ${RUST_IMAGE}
492- needs :
493- - job : test:unit
494- artifacts : false
508+ # No workspace compile — `cargo deny check` reads `cargo metadata` and the
509+ # tool is a prebuilt binstall download — so this runs from pipeline start
510+ # rather than queuing behind the serialized test-compile chain.
511+ needs : []
495512 before_script :
496513 - apt-get update -qq
497- - apt-get install -y -qq --no-install-recommends ca-certificates git pkg-config libssl-dev
498- - cargo install --locked cargo-deny || true
514+ - apt-get install -y -qq --no-install-recommends ca-certificates git pkg-config libssl-dev curl
515+ - *install-binstall
516+ - cargo binstall --no-confirm --locked cargo-deny
517+ || cargo install --locked cargo-deny || true
499518 script :
500519 - cargo deny --workspace check
501520
@@ -986,7 +1005,9 @@ release:sbom:
9861005 # already pulls curl + ca-certificates; add jq explicitly so the
9871006 # Vault-token + key fetch in cosign-setup.sh succeeds.
9881007 - apt-get install -y -qq --no-install-recommends jq
989- - cargo install --locked cargo-cyclonedx || true
1008+ - *install-binstall
1009+ - cargo binstall --no-confirm --locked cargo-cyclonedx
1010+ || cargo install --locked cargo-cyclonedx || true
9901011 # Trust the platform CA (internal PKI) BEFORE cosign-setup.sh runs: in
9911012 # vault-key mode its HTTPS call to ${VAULT_ADDR} (OpenBao) must verify
9921013 # against an internal CA not in the public bundle. No-op when
0 commit comments