fix(ci): split cross-compile checks into a dedicated matrix job - #112
Merged
Conversation
Fixes #109. The test job's matrix used os/rust as the matching keys for 'include' entries. Two include entries (x86_64-unknown-linux-musl and aarch64-unknown-linux-musl) both matched the same base (ubuntu-latest, stable) combination, so the second silently overwrote the first instead of creating a separate job — x86_64-unknown-linux-musl was never actually checked in CI despite the changelog claiming otherwise. Move the three build-only cross-compile checks (both musl targets plus aarch64-pc-windows-msvc) into a new cross-check job whose matrix is defined purely via include with no base os/rust axis to match against, so every entry unconditionally becomes its own job. This also lets the test job drop the now-unneeded cross/target conditionals it only carried to support the cross-compile entries. Also clarify the beta job's display name (Test (ubuntu-latest / beta) instead of the ambiguous Test (ubuntu-latest)).
bug-ops
enabled auto-merge (squash)
August 12, 2026 20:44
Fixing the CI matrix collision (previous commit) exposed that native Windows test runs had never actually executed before: the windows-latest/stable slot was always absorbed by the aarch64-pc-windows-msvc cross-compile include entry, which only builds, never runs cargo nextest. With native Windows tests now genuinely running, 247 tests failed across nearly every crate. All failures share one root cause: test fixtures build Uri values from Unix-style absolute path literals (e.g. "/home/user/project/test.toml") via Uri::from_file_path(...).unwrap(). Such a path has no drive letter, so it is not recognized as absolute on Windows, and from_file_path returns None, panicking the unwrap. Add deps_core::test_util::test_uri, a small helper that prefixes a synthetic C: drive on Windows before constructing the Uri and leaves the path untouched elsewhere. It is gated behind cfg(any(test, feature = "test-util")) and exposed to every other workspace crate via a test-util Cargo feature enabled in their dev-dependencies, so it's usable from their own test code without adding test-only surface to deps-core's normal public API. Switched every executed call site (unit tests, the deps-lsp integration test, and the one non-no_run doctest) to the helper. Non-executed occurrences — no_run doctests and benches/, which are only ever built, not run, in CI — were intentionally left alone.
The previous commit missed a few cases my sed transform's literal-string
regex couldn't match:
- deps-gradle/src/parser/mod.rs and deps-gradle/tests/integration_tests.rs
each have a local make_uri(path: &str) helper that takes the Unix-style
literal from the caller rather than containing it inline; point both at
the shared test_uri helper instead of building the Uri themselves.
- deps-go/src/lockfile.rs held the literal in a named variable one line
above the from_file_path call, so the string-literal regex didn't match
the call site itself.
- deps-lsp/tests/lsp_integration.rs's cold-start tests build a URI by
hand via format!("file://{}", temp_file.path().display()), which is
wrong on Windows: backslash-separated paths and a bare drive letter are
not valid in a file:// URI, so the server failed to resolve the file
and the affected requests errored out. Uri::from_file_path already
handles this correctly, so use it instead of manual string formatting.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #109.
Summary
testjob's matrix usedos/rustas the keys GitHub Actions matchesincludeentries against. Twoincludeentries —x86_64-unknown-linux-muslandaarch64-unknown-linux-musl— both matched the same base(ubuntu-latest, stable)combination, so the second silently overwrote the first instead of producing a separate job.x86_64-unknown-linux-muslhas never actually been checked in CI, despite the CHANGELOG for Add linux-musl release and CI targets #107 claiming both musl targets got build checks.x86_64-unknown-linux-musl,aarch64-unknown-linux-musl,aarch64-pc-windows-msvc) into a newcross-checkjob whose matrix is defined purely viaincludewith no base axis — since there's nothing to match against, every entry unconditionally becomes its own job. This is the standard fix for this class ofincludecollision.testno longer needs thecross/target/use_cross_toolconditionals it only carried to support the cross-compile entries — simplified back to a plain stable/beta test matrix.Test (ubuntu-latest / beta)instead of the ambiguousTest (ubuntu-latest), which caused confusion earlier today when it failed and looked like the plain stable job).cross-checkintoci-success's required job list, matching howtestwas gating before.Test plan
actionlint .github/workflows/ci.yml— no new findings (one pre-existing, unrelated shellcheck note in themsrvjob)Test (...)jobs (ubuntu/macos/windows stable + ubuntu beta) and three independentCross-compile Check (...)jobs (aarch64-pc-windows-msvc, x86_64-unknown-linux-musl, aarch64-unknown-linux-musl) — confirming the collision is gone