Skip to content

ci: cross-compile all six binaries in one ubuntu job with CGO_ENABLED=0 - #495

Merged
gmegidish merged 1 commit into
mainfrom
ci/single-ubuntu-build
Oct 4, 2026
Merged

gmegidish merged 1 commit into
mainfrom
ci/single-ubuntu-build

Conversation

@gmegidish

@gmegidish gmegidish commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replaces build_on_macos, build_on_linux and build_on_windows with a single build job on ubuntu-latest that cross-compiles all six binaries (darwin, linux, windows × arm64, amd64).
  • Every binary is now built with CGO_ENABLED=0, matching the Makefile. Previously only the linux builds set it. The repo has no cgo code, so nothing needs the target OS toolchain.
  • Artifact names (macos-build, linux-build, windows-build) and file names are unchanged, so e2e_test and publish only change their needs:.
  • Drops the unused goimports / golangci-lint installs from the old build jobs.
  • The windows artifact now has retention-days: 1 like the others.

The iOS agent dylib is still built on macos-latest (build_ios_agents).

Test plan

  • All six targets cross-compile locally with CGO_ENABLED=0 (from macOS)
  • build job passes on ubuntu
  • e2e_test passes on the self-hosted Mac, which runs the ubuntu-built mobilecli-darwin-arm64
  • linux arm64, darwin amd64 and both windows binaries are not executed anywhere in CI yet

Summary by CodeRabbit

  • New Features
    • Release builds now provide separate binaries for macOS, Linux, and Windows on both ARM64 and AMD64.
  • Improvements
    • Release publishing now waits for the cross-platform build to complete, helping ensure the platform binaries are ready before publication.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: mobile-next/mobilecli/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 17df3eee-d5b4-40ad-8c11-59b9b8a402d1
📥 Commits

Reviewing files that changed from the base of the PR and between d3f4653 and acb4efd.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The workflow replaces separate macOS, Linux, and Windows build jobs with one Ubuntu job. It cross-compiles binaries for Darwin, Linux, and Windows on arm64 and amd64, uploads platform artifacts, and updates the build dependencies for e2e testing and publishing.

Changes

Cross-platform build workflow

Layer / File(s) Summary
Unified cross-platform build
.github/workflows/build.yml
The Ubuntu job validates tag versions, sets the version with Linux-compatible sed, and cross-compiles for Darwin, Linux, and Windows on arm64 and amd64. It checks the Linux amd64 binary version.
Artifact uploads and job dependencies
.github/workflows/build.yml
The unified job uploads platform artifacts. e2e_test and publish depend on the unified build job. publish retains its dependencies on tests, lint, and security.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to acb4e

The unified build completed successfully with time to spare. No identified issue prevents merging after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: cross-compiling all six binaries in one Ubuntu job with CGO disabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@gmegidish
gmegidish merged commit b9ed380 into main Oct 4, 2026
15 checks 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.

1 participant