Skip to content

feat(publish): add build-c and build-go workflows for Go SDK publishing#380

Merged
DorianZheng merged 2 commits intomainfrom
feat/go-sdk-publish
Mar 14, 2026
Merged

feat(publish): add build-c and build-go workflows for Go SDK publishing#380
DorianZheng merged 2 commits intomainfrom
feat/go-sdk-publish

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • Add build-c.yml workflow: builds C SDK archives (libboxlite.a, .dylib/.so, boxlite.h) per platform and uploads to GitHub Releases
  • Add build-go.yml workflow: tests Go SDK with prebuilt library path, creates Go module tag (sdks/go/vX.Y.Z) on release
  • Split CGO directives into build-tagged files: prebuilt is the default (no -tags needed), local dev requires -tags boxlite_dev
  • Add go generate download tool to fetch prebuilt libraries from GitHub Releases

After this, end users can install via:

go get github.com/boxlite-ai/boxlite/sdks/[email protected]
go generate github.com/boxlite-ai/boxlite/sdks/go/pkg/boxlite
go build ./...

Test plan

  • Trigger build-c.yml via workflow_dispatch — verify archives contain lib/libboxlite.a, lib/libboxlite.{dylib,so}, include/boxlite.h
  • Trigger build-go.yml via workflow_dispatch — verify Go tests pass on both platforms
  • On a test release: verify C SDK archives uploaded to GitHub Release and sdks/go/vX.Y.Z tag created
  • Verify make dev:go and make test:unit:go work locally with -tags boxlite_dev

Add CI workflows and tooling to publish the Go SDK via standard
`go get` + `go generate` + `go build` workflow:

- build-c.yml: builds C SDK (libboxlite.a, .dylib/.so, boxlite.h),
  packages per-platform archives, uploads to GitHub Releases
- build-go.yml: tests Go SDK with prebuilt library path, creates
  Go module tag (sdks/go/vX.Y.Z) on release for `go get`
- Split CGO directives into build-tagged files: prebuilt is the
  default (no tags needed), dev requires -tags boxlite_dev
- Add download tool (go generate) to fetch prebuilt libraries
  from GitHub Releases for end users
The default CGO directives (bridge_cgo_prebuilt.go) look for
lib/include/boxlite.h which only exists after go generate.
CI lint needs -tags boxlite_dev to use the repo header path,
matching what make lint:go already does locally.
@DorianZheng DorianZheng merged commit 057063b into main Mar 14, 2026
17 checks passed
@DorianZheng DorianZheng deleted the feat/go-sdk-publish branch March 14, 2026 00:41
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