Skip to content

fix(ci): split cross-compile checks into a dedicated matrix job - #112

Merged
bug-ops merged 3 commits into
mainfrom
fix/109-ci-musl-matrix-collision
Aug 12, 2026
Merged

fix(ci): split cross-compile checks into a dedicated matrix job#112
bug-ops merged 3 commits into
mainfrom
fix/109-ci-musl-matrix-collision

Conversation

@bug-ops

@bug-ops bug-ops commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Fixes #109.

Summary

  • The test job's matrix used os/rust as the keys GitHub Actions matches include entries against. 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 producing a separate job. x86_64-unknown-linux-musl has 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.
  • Moved the three build-only cross-compile checks (x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, aarch64-pc-windows-msvc) into a new cross-check job whose matrix is defined purely via include with 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 of include collision.
  • test no longer needs the cross/target/use_cross_tool conditionals it only carried to support the cross-compile entries — simplified back to a plain stable/beta test matrix.
  • Bonus: clarified the beta job's display name (Test (ubuntu-latest / beta) instead of the ambiguous Test (ubuntu-latest), which caused confusion earlier today when it failed and looked like the plain stable job).
  • Wired cross-check into ci-success's required job list, matching how test was gating before.

Test plan

  • actionlint .github/workflows/ci.yml — no new findings (one pre-existing, unrelated shellcheck note in the msrv job)
  • CI on this PR shows four independent Test (...) jobs (ubuntu/macos/windows stable + ubuntu beta) and three independent Cross-compile Check (...) jobs (aarch64-pc-windows-msvc, x86_64-unknown-linux-musl, aarch64-unknown-linux-musl) — confirming the collision is gone

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)).
@github-actions github-actions Bot added needs-review Needs review ci CI/CD workflows size: M 50-200 lines changed labels Aug 12, 2026
@bug-ops
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.
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes lsp Language Server Protocol parser Parser changes tests Test changes size: L 200-500 lines changed and removed size: M 50-200 lines changed labels Aug 12, 2026
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.
@bug-ops
bug-ops merged commit 0151551 into main Aug 12, 2026
23 checks passed
@bug-ops
bug-ops deleted the fix/109-ci-musl-matrix-collision branch August 12, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows documentation Improvements or additions to documentation lsp Language Server Protocol needs-review Needs review parser Parser changes rust Rust code changes size: L 200-500 lines changed tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: x86_64-unknown-linux-musl cross-compile check never runs (matrix include collision)

1 participant