Skip to content

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

Description

@bug-ops

Description

The test job matrix in .github/workflows/ci.yml intends to run a build-only cross-compile check for both x86_64-unknown-linux-musl and aarch64-unknown-linux-musl (added in #107). In practice, only aarch64-unknown-linux-musl ever runs — x86_64-unknown-linux-musl is silently swallowed and has never appeared as a job in any CI run since #107 merged.

Root cause

strategy:
  matrix:
    os: [ubuntu-latest, macos-latest, windows-latest]
    rust: [stable]
    include:
      - os: ubuntu-latest
        rust: beta
      - os: windows-latest
        rust: stable
        target: aarch64-pc-windows-msvc
        cross: true
      - os: ubuntu-latest
        rust: stable
        target: x86_64-unknown-linux-musl
        cross: true
        use_cross_tool: true
      - os: ubuntu-latest
        rust: stable
        target: aarch64-unknown-linux-musl
        cross: true
        use_cross_tool: true

Both the x86_64-unknown-linux-musl and aarch64-unknown-linux-musl include entries match the same base matrix combination (os: ubuntu-latest, rust: stable) on their shared keys (os, rust). GitHub Actions merges include entries into an existing combination when their matrix-defined keys match one; it does not create a second job. Since both entries match the same single slot, the second one (aarch64-unknown-linux-musl) silently overwrites the target/cross/use_cross_tool values set by the first, and the x86_64-unknown-linux-musl build check is lost entirely.

Evidence

Checked jobs on two separate CI runs — no Test (ubuntu-latest / x86_64-unknown-linux-musl) job exists in either:

  • main (commit 50c9ca1, run 31631860928): Test (macos-latest), Test (ubuntu-latest), Test (windows-latest / aarch64-pc-windows-msvc), Test (ubuntu-latest / aarch64-unknown-linux-musl)
  • PR release: v0.9.5 #108 (run 31633593769): same four jobs, no x86_64-unknown-linux-musl job

Expected vs actual

  • Expected (per CHANGELOG for Add linux-musl release and CI targets #107: "CI gained matching build-only cross-compile checks for both musl targets"): both x86_64-unknown-linux-musl and aarch64-unknown-linux-musl get a dedicated build-only job.
  • Actual: only aarch64-unknown-linux-musl runs. A regression that only breaks the x86_64-unknown-linux-musl build (used for the corresponding release binary) would go undetected by CI.

Suggested fix

Move the musl cross-compile checks (and ideally the Windows aarch64 cross-compile check) out of the test job's os/rust matrix into their own dedicated job with its own matrix axis (e.g. a cross-build job matrixed purely over target), so include entries can't collide by reusing the same (os, rust) slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: suboptimal behavior, minor inconsistencybugSomething isn't workingciCI/CD workflows

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions