Skip to content

ci: install the Rust toolchain through soldr rustup in build-project.yaml (#962) - #2650

Merged
zackees merged 2 commits into
masterfrom
infra/962-rust-001-soldr-rustup
Oct 27, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/962-rust-001-soldr-rustup

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Refs #962 (ci-lint burn-down).

build-project.yaml's macos-build and windows-build jobs install the
toolchain rust-toolchain.toml pins and add a cross-target standard library
with bare rustup:

rustup toolchain install
if [[ '${{ matrix.target }}' == x86_64 ]] rustup target add x86_64-apple-darwin   # macos-build
rustup toolchain install
if ( '${{ matrix.architecture }}' -eq 'arm64' ) { rustup target add aarch64-pc-windows-msvc }  # windows-build

That bypasses Soldr's Rust toolchain wrapper, so the pinned toolchain, its
cache and the Dylint wiring do not apply. ci-lint reports it twice per site —
RUST-001 and TOOL-001 — for four findings against origin/master.

Fix

Wrap each call in soldr rustup …, the sanctionised form release-rust.yaml
already uses for the same cross-target installs (soldr rustup target add …).

RED / GREEN

RED (on origin/master, db777d5fc):

$ uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint precheck
[RUST-001] VIOLATION .github/workflows/build-project.yaml   (jobs.macos-build.steps[6]: bare 'rustup')
[RUST-001] VIOLATION .github/workflows/build-project.yaml   (jobs.windows-build.steps[5]: bare 'rustup')
[TOOL-001] VIOLATION .github/workflows/build-project.yaml   (jobs.macos-build.steps[6]: bare 'rustup' invoked directly)
[TOOL-001] VIOLATION .github/workflows/build-project.yaml   (jobs.windows-build.steps[5]: bare 'rustup' invoked directly)
ci-lint precheck: 15 violation(s), 554 approved exception(s), 11 needs_review

GREEN (this branch):

$ uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint precheck
(no RUST-001 or TOOL-001 findings; both rule sections disappear)
ci-lint precheck: 11 violation(s), 554 approved exception(s), 11 needs_review

The RED commit (7b9a9316c) adds ci/test_soldr_rustup.py, which scans
build-project.yaml for a bare rustup token and for the two soldr rustup … installs; it fails on master's workflow and the GREEN commit (22840fd08)
makes it pass.

Local checks on this branch (all green):

uv run python -m unittest ci/test_soldr_rustup.py ci/test_soldr_toolchain_cache.py ci/test_ci_toml.py ci/test_uv_run.py
# Ran 29 tests ... OK

No docs/features.md line: this is a CI/wiring change with no user-visible
behaviour. No plugins/obs-websocket pointer change (git diff origin/master --stat
touches only the workflow and the new test).

… (RED) (#962)

The macos-build and windows-build jobs install the toolchain and cross-target
std libs with bare `rustup`, which bypasses Soldr's Rust toolchain wrapper
(ci-lint RUST-001/TOOL-001). This test scans the workflow for a bare `rustup`
token and fails on master.
…yaml (#962)

The macos-build and windows-build jobs ran bare `rustup toolchain install`
and `rustup target add` for the cross-target standard library. That bypasses
Soldr's Rust toolchain wrapper, so the pinned toolchain, its cache and the
Dylint wiring do not apply (ci-lint RUST-001/TOOL-001). Wrap each call in
`soldr rustup …`, the form release-rust.yaml already uses.
@zackees
zackees enabled auto-merge October 27, 2026 15:07
@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit 79f0642 Oct 27, 2026
32 checks passed
@zackees
zackees deleted the infra/962-rust-001-soldr-rustup branch October 27, 2026 15:28
MCPVOT pushed a commit to MCPVOT/obs-studio that referenced this pull request Oct 30, 2026
…bs-rust#2701)

* ci: Pin that build-project installs soldr before any job calls it (obs-rust#2699)

`test_soldr_rustup` only pinned the text of the `soldr rustup` commands, so
obs-rust#2650 could move the toolchain step to soldr in `macos-build` and
`windows-build` without those jobs having a soldr to call: both app builds
then failed with `command not found: soldr` / `The term 'soldr' is not
recognized`.

The new case walks the workflow job by job and fails any job that invokes a
`soldr` subcommand without a `zackees/setup-soldr` step earlier in the same
job, and pins that setup-soldr (which provisions the pinned toolchain) is the
only place the toolchain is installed. `test_rust_cache_policy`'s consumer
count goes 8 -> 10 for the two setup-soldr steps the fix adds.

Fails on master at macos-build and windows-build.

* ci: Set Up soldr in the macOS and Windows app builds (obs-rust#2699)

Both jobs ran `soldr rustup toolchain install` with no soldr on PATH
(RUST-001/TOOL-001 rewrite in obs-rust#2650), so the release-gating OBS app builds
died at that step and the DMG/zip were never built. Mirror release-rust.yaml's
app-build job: `zackees/setup-soldr` provisions the rust-toolchain.toml
toolchain (and cooks the workspace deps the app build compiles anyway), then
only the matrix-guarded cross-target `soldr rustup target add` remains.

Local: ./lint ok, ci/test_soldr_rustup.py + ci/test_rust_cache_policy.py ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant