Skip to content

Set CGO_ENABLED=0 in CI and release workflows for portable binaries - #155

Merged
xiwenc merged 1 commit into
mainfrom
cursor/cgo-disabled-workflows-9a80
Sep 10, 2026
Merged

Set CGO_ENABLED=0 in CI and release workflows for portable binaries#155
xiwenc merged 1 commit into
mainfrom
cursor/cgo-disabled-workflows-9a80

Conversation

@xiwenc

@xiwenc xiwenc commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

Adds a workflow-level CGO_ENABLED: 0 env var to both ci.yml and release.yml so every go build and go test step produces (and tests against) statically-linked, fully portable binaries.

  • CI: the build_cli job's binary (used by the export/lint/test-rules jobs) no longer links against the runner's glibc.
  • Release: covers the wangyoucao577/go-release-action builds (Docker container actions inherit workflow env) and the manual Windows build/test steps.

Verified locally that CGO_ENABLED=0 go build . succeeds and produces a statically linked ELF binary — the project already uses the pure-Go modernc.org/sqlite driver, so nothing depends on cgo.

Open in Web Open in Cursor 

Co-authored-by: Xiwen Cheng <xiwenc@users.noreply.github.com>
@xiwenc
xiwenc marked this pull request as ready for review September 10, 2026 20:38
@xiwenc
xiwenc merged commit a6de9cf into main Sep 10, 2026
11 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.

2 participants