Skip to content

Pilot: cross-compile the phase1 build from Linux to free Windows/macOS runners #130

Closed

Description

@zackees

What

Pilot moving the compile phase of the CI build off the scarce Windows/macOS runners by cross-compiling from Linux, so those runners are reserved for the native run / verify phase.

Why

ci.yml's phase1-native job (the six-phase "no-gaps gate" build) runs on four native runners today:

  • ubuntu-24.04 (linux-gnu)
  • windows-2022 ×2 (windows-gnu, windows-msvc)
  • macos-14 (macos-arm64)

Three of those four runners spend most of their wall-clock compiling and linking — work that does not need to run on the target OS. That is exactly the scarce, expensive capacity we are trying to spend only on what cannot be done elsewhere: native execution and consumer acceptance.

What already exists

cross-ship.yml (reld#59) already proves the pattern: it cross-builds the release product on ubuntu via the blessed soldr front door (soldr build --target <triple>, which provisions compiler + linker + SDK + sysroot with zero tools installed on the runner), then ships the finished binary to the native runner, which only runs against it.

Blessed cross-from-Linux targets per soldr/ci/canonical-targets.json:

target provenance
x86_64-pc-windows-msvc xwin + auto CC_/CXX_/AR_ injection
aarch64-apple-darwin zig + catalogue Apple SDK

x86_64-pc-windows-gnu is intentionally NOT cross-built from Linux — soldr blesses MSVC on Windows, and windows-gnu builds on a Windows host with the MinGW bundle.

The pilot

Extend the cross-from-Linux pattern from release product to test/acceptance build:

  1. Split phase1-native into compile and run. Compile the phase-1 test artifacts on ubuntu via soldr build --target, for windows-msvc and macos-arm64 first (the two blessed targets).
  2. Ship only the artifacts to the native runner, which downloads and executes them (native run, consumer acceptance, upstream-diff checks) — no product compilation on-target.
  3. Leave windows-gnu on its Windows host for this pilot (not cross-buildable), and leave the linux leg as-is.

Out of scope / risks

  • windows-gnu stays native — it is compile-only today (no consumer lane) and not a soldr-blessed cross target.
  • Native execution still requires a native runner, so this reduces, not eliminates, Windows/macOS runner minutes. The win is taking the compile/link phase off them.
  • cross-ship.yml is still DRAFT; its own header notes it must be validated against a live CI run before the ci.yml cross legs are migrated onto it. This pilot is the next concrete step toward that migration, scoped to the phase-1 build.

Success criteria

  • Phase-1 test binaries for windows-msvc + macos-arm64 compile on ubuntu runners.
  • The Windows/macOS legs of phase1-native no longer compile; they only fetch + run.
  • CI stays green and the native run gates (execution, upstream diff) still pass.

Acceptance

PR that implements the compile/run split for the two blessed targets, validated and merged; this issue closed.

Activity

  1. zackees commented on Sep 16, 2026

    @zackees
    CollaboratorAuthor

    Refinement after discussion: cross-compiling doesn't eliminate the need for the target compilers — it just moves where they run. The Linux leg still needs the real Windows/macOS toolchains (MSVC CRT + C compiler via xwin, Apple SDK + clang via zig), which soldr build --target provisions from the toolchain catalogue. So the win is runner minutes on the scarce native runners, not dropping the toolchains.

    One gap this surfaces: windows-gnu has no blessed cross-from-Linux toolchain (soldr provisions MSVC via xwin, and windows-gnu expects the MinGW bundle on a Windows host). If we want windows-gnu to cross-compile too, that's a soldr toolchain-catalogue addition (MinGW cross) — worth a separate soldr issue rather than blocking this pilot.

  2. zackees commented on Sep 17, 2026

    @zackees
    CollaboratorAuthor

    Status from the #153 burn-down, so this issue is not read as untouched work.

    The mechanism this pilot proposes now exists and is proven in production: release.yml cross-builds all four Windows/macOS targets through soldr for real (#148), and cross-ship.yml demonstrates the build → ship → run split end to end. Neither of those is the pilot, though: both ship the release product, while this issue is about the test/acceptance build, which is the harder half — the artifacts are test binaries plus fixtures, not one executable.

    cross-ship.yml's own header still says it is a draft that must be validated against a live run before ci.yml's cross legs migrate onto it, so that validation is the gating step for both this and #59. I dispatched one against main.

    Recommendation, for the owner to decide rather than me: keep #59 as the umbrella and close this into it. They are one mechanism applied to two payloads, and carrying two issues means the "decide, then migrate" work gets planned twice. Whoever takes it should start from the two blessed cross-from-Linux targets (x86_64-pc-windows-msvc, aarch64-apple-darwin) and leave windows-gnu on its Windows host, exactly as written above.

  3. zackees commented on Sep 18, 2026

    @zackees
    CollaboratorAuthor

    This issue is now the single home for the remaining cross-build work from #59. The release product, the benchmark drivers, and cross-ship's promotion and metrics are all migrated and verified green on main (#167, #168, #169, #173). What remains is this issue's scope: moving the phase1-native compile phase off the native runners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions