Skip to content

fix(ci): parallelize per-arch builds, cross-compile natively; strip UI - #9

Merged
vishwateja-angirekula merged 3 commits into
mainfrom
fix/parallel-arch-ci-strip-ui
Jul 9, 2026
Merged

fix(ci): parallelize per-arch builds, cross-compile natively; strip UI#9
vishwateja-angirekula merged 3 commits into
mainfrom
fix/parallel-arch-ci-strip-ui

Conversation

@muralidhar-challa

Copy link
Copy Markdown
Collaborator

Summary

  • CI hang fix: the multi-platform buildx job forced arm64 to build entirely under QEMU (including compiling cargo-chef/cargo-zigbuild from source), turning a 5-10min build into a 2+ hour hang. Split into a per-arch matrix (amd64/arm64 build in parallel) + a manifest job that merges them into multi-arch tags, and pinned the Dockerfile's builder stages to --platform=$BUILDPLATFORM so zig cross-compiles natively regardless of target arch.
  • Builder base: switched rust:latestrust:alpine for a lighter/faster pull (final image is already FROM scratch, so image size is unchanged).
  • Test/lint gate: added a test job (cargo fmt --check, clippy -D warnings, cargo test --workspace) that runs on PRs and gates the docker build on push to main. Cleared the pre-existing debt needed to make that gate pass clean (formatting drift in 6 files, a method shadowing FromStr::from_str, a manual Default impl, &PathBuf&Path, a few too_many_arguments allows on 1-arg-per-field constructors, and scoped dead_code allow on the shared test-helpers module).
  • Removed ui/: the React frontend was self-contained (own Dockerfile, no CI job built/pushed it) — deleted it and its 3 mentions in README.md.

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings passes with zero warnings
  • cargo test --workspace passes (all suites green)
  • cargo build --workspace succeeds after ui/ removal
  • CI run on this branch builds amd64+arm64 in parallel without QEMU hang (watch the Actions run once opened)

The single multi-platform buildx job forced the entire arm64 stage to
run under QEMU emulation (including compiling cargo-chef/cargo-zigbuild
from source), turning a 5-10min build into a 2+ hour hang. Split into
a per-arch matrix build (amd64/arm64 in parallel) plus a manifest job
that merges them, and pin the Dockerfile's builder stages to
--platform=$BUILDPLATFORM so zig cross-compiles from the native amd64
runner instead of emulating the target arch. Also switches the builder
base from rust:latest to rust:alpine for a lighter/faster pull (final
image is already FROM scratch, so this doesn't change image size).
New CI test job runs `cargo fmt --check` and `clippy -D warnings`, so
the pre-existing debt needed clearing first: reformat 6 drifted files,
rename SecurableType::from_str -> parse (shadowed std::str::FromStr),
&PathBuf -> &Path in uc-server main.rs, derive Default instead of
hand-writing it, allow too_many_arguments on three 1-arg-per-field
constructors, and scope #![allow(dead_code)] on the shared test-helpers
module (each integration test file compiles it as a separate binary,
so helpers unused by one binary but used by another were false
positives).
Dropping ui/ (React/TS frontend, proxy → server on :8080). It was
self-contained — no CI job built or pushed it, and nothing else in
the repo referenced it besides three mentions in README.md, now
removed.
@vishwateja-angirekula
vishwateja-angirekula merged commit 896fbb9 into main Jul 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants