-
Notifications
You must be signed in to change notification settings - Fork 324
Open
Description
Summary
Add automated VFS (SQLite loadable extension) builds to Litestream releases for:
- linux/amd64
- linux/arm64
- darwin/amd64
- darwin/arm64
Background
The VFS extension allows read-only access to Litestream replicas directly from SQLite. Currently, users must build it manually. Adding automated release builds will make this feature more accessible.
Why GoReleaser Won't Work
The VFS build requires a two-stage process:
- Go builds a C archive (
-buildmode=c-archive) - GCC/clang links the archive into a shared library (
.so/.dylib)
GoReleaser cannot orchestrate this multi-step build, and cross-compiling CGO for macOS from Linux requires the macOS SDK which isn't available.
Proposed Approach
Add a new vfs-build job to release.yml using a matrix strategy:
| Platform | Runner | Strategy |
|---|---|---|
| linux/amd64 | ubuntu-latest |
Native |
| linux/arm64 | ubuntu-latest |
Cross-compile with gcc-aarch64-linux-gnu |
| darwin/amd64 | macos-13 |
Native Intel |
| darwin/arm64 | macos-14 |
Native M1 |
The VFS jobs will:
- Wait for GoReleaser to complete (
needs: goreleaser) - Build VFS extensions using Makefile targets
- Upload artifacts to the existing release via
gh release upload
Artifact Naming
litestream-vfs-{version}-{os}-{arch}.tar.gz
Contents:
- Linux:
litestream-vfs-linux-{arch}.so - macOS:
litestream-vfs-darwin-{arch}.dylib
Files to Modify
- Makefile - Add VFS build targets for each platform
- .github/workflows/release.yml - Add
vfs-build-linuxandvfs-build-darwinjobs - .goreleaser.yml - Update release notes template
Release Result
Single release containing all artifacts:
v0.x.x Release
├── litestream-v0.x.x-linux-amd64.tar.gz (GoReleaser)
├── litestream-v0.x.x-darwin-arm64.tar.gz (GoReleaser)
├── litestream_0.x.x_amd64.deb (GoReleaser)
├── checksums.txt (GoReleaser)
├── litestream-vfs-v0.x.x-linux-amd64.tar.gz (VFS job)
├── litestream-vfs-v0.x.x-linux-arm64.tar.gz (VFS job)
├── litestream-vfs-v0.x.x-darwin-amd64.tar.gz (VFS job)
└── litestream-vfs-v0.x.x-darwin-arm64.tar.gz (VFS job)
References
Metadata
Metadata
Assignees
Labels
No labels