Add CI and tagged releases, and build a shared library - #1
Merged
Conversation
A vX.Y.Z tag builds macOS, Linux and Windows on arm64 and x86_64, then attaches an archive per target to a GitHub release. Linux also gets a Debian package. CI runs the same targets on every push and pull request. Each archive holds the C header, the static library and the shared library. `zig build shared` writes libcharttable.so, the .dylib, or charttable.dll with its import library. The soname comes from the version in build.zig.zon. The release builds the two linkages into separate prefixes, because Windows gives the static archive and the import library the same name. The Vulkan loader now sits on the test module, not the library module. Only the test binary has to name it. Before this, every artifact carried -lvulkan, and no cross target could find one. -Dcodec-source now works on any target, not just Windows and Android. The system headers of a build machine describe that machine, so a cross build cannot take the codecs from the platform. Every release build passes the option, so the libraries carry their own libwebp and libpng. Run zig fmt over map_object.zig and codecs.zig, so the format check passes.
beetlebugorg
force-pushed
the
feat/ci-cd-releases
branch
from
August 24, 2026 20:32
851e383 to
2b1f704
Compare
`brew install beetlebugorg/tap/charttable` now installs the header, the static library and the shared library. A tag writes Formula/charttable.rb into beetlebugorg/homebrew-tap, with the sha256 of each archive the release just published. A prerelease tag leaves the tap alone. The formula names the installed path as the dylib id. Zig writes a bare file name there, and dyld does not search the Homebrew prefix, so a program that links -lcharttable would not find the library at run time. The tap update needs HOMEBREW_TAP_TOKEN. Without it the job warns and the release still stands.
`-Dversion` sets what the library reports. The release passes the tag, so nobody edits a version in a file to match one. build.zig.zon holds the default for every other build. The build refuses a version that is not semantic. The version reaches two places. `charttable_version()` returns it, which is new: a host can now ask the library what it is. The shared library stamps it into its soname, as before. This drops the release step that checked the tag against build.zig.zon. The tag drives the build now, so there is nothing left to disagree with.
The manifest now holds 0.0.0-dev and stays there. Nothing reads it except the default for -Dversion, and the Zig package manager resolves by URL and hash rather than by this string, so a stale number misled more than it told. Cutting a release is one step again: push the tag. A build from a source checkout reports 0.0.0-dev, which is what it is.
Leads with `brew install` and a short C example, so a reader sees how the library is taken and how it is called before anything else. States the goal plainly: what MapLibre draws from a style, charttable should draw from the same style. Names the layer and source types that work today, what comes next, and the conformance number behind the claim. The performance bullets said what the code does. "Tiles lay out into resident GPU buckets" and "zoom gates bake into per-vertex visibility windows" mean nothing without the source in front of you. Each bullet now leads with the effect and gives the mechanism as support. Drops SDL from the backend list. gpu_sdl.zig is in the DESIGN.md module map and is not written yet, so the README promised a fourth backend that does not exist. One line per paragraph and per bullet. The renderer decides where lines break.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A vX.Y.Z tag builds macOS, Linux and Windows on arm64 and x86_64, then attaches an archive per target to a GitHub release. Linux also gets a Debian package. CI runs the same targets on every push and pull request.
Each archive holds the C header, the static library and the shared library.
zig build sharedwrites libcharttable.so, the .dylib, or charttable.dll with its import library. The soname comes from the version in build.zig.zon. The release builds the two linkages into separate prefixes, because Windows gives the static archive and the import library the same name.The Vulkan loader now sits on the test module, not the library module. Only the test binary has to name it. Before this, every artifact carried -lvulkan, and no cross target could find one.
-Dcodec-source now works on any target, not just Windows and Android. The system headers of a build machine describe that machine, so a cross build cannot take the codecs from the platform. Every release build passes the option, so the libraries carry their own libwebp and libpng.
Run zig fmt over map_object.zig and codecs.zig, so the format check passes.