-
Notifications
You must be signed in to change notification settings - Fork 324
feat(release): add automated VFS builds for releases #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add VFS (SQLite loadable extension) builds to the release workflow for: - linux/amd64 (native) - linux/arm64 (cross-compiled) - darwin/amd64 (native Intel) - darwin/arm64 (native M1) The VFS jobs run after GoReleaser completes and upload artifacts to the same release. This makes VFS extensions available to users without requiring manual compilation. Closes #863 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Use ubuntu-20.04 for Linux builds (glibc 2.31) for broader compatibility - Add smoke tests to verify .so/.dylib can be loaded by SQLite - Fix release notes to use GoReleaser templating for version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Generate SHA256 checksums for all VFS artifacts (.sha256 files) - Add readelf validation for cross-compiled arm64 Linux builds - Upload checksums alongside tarballs to release 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Set MACOSX_MIN_VERSION=11.0 to ensure VFS dylibs are compatible with macOS Big Sur and later, rather than being locked to the CI runner's macOS version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Local Testing InstructionsTo verify the VFS builds locally, you can build all 4 platforms: macOS Builds (native)# Build macOS Intel (x86_64)
make vfs-darwin-amd64
# Build macOS Apple Silicon (arm64)
make vfs-darwin-arm64Linux Builds (via Docker)# Build both Linux architectures in Docker
docker run --rm --platform linux/amd64 -v $(pwd):/src -w /src golang:1.25rc1 bash -c "
apt-get update && apt-get install -y gcc-aarch64-linux-gnu &&
make vfs-linux-amd64 &&
make vfs-linux-arm64
"
Verify Build Artifacts# Check all built artifacts
ls -la dist/litestream-vfs-*
file dist/litestream-vfs-*.so dist/litestream-vfs-*.dylibExpected output:
|
benbjohnson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That all looks good. The one change I'd make is to name the file in the tarball as litestream-vfs.so regardless of what platform it's built for.
Also, I think we should probably rename litestream-vfs.so to just litestream.so since the VFS is registered as "litestream" but we can do that in a separate PR.
Rename files inside tarballs to litestream-vfs.so (Linux) and litestream-vfs.dylib (macOS) regardless of build architecture. This provides a consistent filename for users regardless of platform. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Summary
Changes
Makefile
Added platform-specific VFS build targets:
vfs-linux-amd64- Native build on Linux x86_64vfs-linux-arm64- Cross-compile usinggcc-aarch64-linux-gnuvfs-darwin-amd64- Native build on macOS Intelvfs-darwin-arm64- Native build on macOS Apple Silicon.github/workflows/release.yml
Added two new jobs that run after GoReleaser:
vfs-build-linux- Matrix build for Linux (amd64, arm64)vfs-build-darwin- Matrix build for macOS (amd64 on macos-13, arm64 on macos-14)Both jobs:
goreleaserjob to completegh release upload --clobber.goreleaser.yml
Updated release notes header to document VFS extension availability.
Artifact Naming
Contents:
litestream-vfs-linux-{arch}.solitestream-vfs-darwin-{arch}.dylibTest Plan
make vfs-darwin-arm64locally - builds successfullymake vfs-darwin-amd64locally - cross-compile worksCloses #863