Skip to content

Add single-header amalgamation as a release asset - #41

Merged
gistrec merged 3 commits into
masterfrom
feature/single-header
Jul 2, 2026
Merged

gistrec merged 3 commits into
masterfrom
feature/single-header

Conversation

@gistrec

@gistrec gistrec commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

  • tools/amalgamate.py — deterministic generator: headers concatenated in dependency order, per-file banners / #pragma once / local includes stripped, system includes deduplicated and hoisted, one combined Apache-2.0 + android-maps-utils attribution banner on top (~1 270 lines for v1.2.0).
  • release-assets.yml — on every published release: generate from the tag, smoke-test (build + run examples/gps_track.cpp against the amalgam with -Wall -Wextra -Wpedantic -Werror), upload geo.hpp to the release. Tag name flows through an env var (no shell interpolation of event fields).
  • ci.yml: single-header-smoke job — the same generate+smoke on every PR, so amalgamation breakage surfaces before a release is public.
  • README (Manual install) mentions the asset; RELEASING.md gains a verify-the-asset step.

Verification

  • The end-to-end example builds and runs against the amalgam under strict warnings; double-include compiles (guard works).
  • Full test suite against the amalgam: shimmed the multi-header layout to the single file and ran ctest — 76/76 pass, zero warnings.
  • I'll backfill the v1.2.0 release asset manually once this merges (the workflow only fires on future releases).

gistrec added 3 commits July 2, 2026 09:04
tools/amalgamate.py concatenates the headers in dependency order into
one self-contained geo.hpp: per-file banners, pragma once, and local
includes dropped; system includes deduplicated and hoisted; one
combined license/attribution banner on top. Deterministic output.

The new release-assets.yml workflow generates the file from the
release tag, smoke-tests it by building and running the end-to-end
example against it, and uploads it to the GitHub release. A matching
smoke job in ci.yml catches amalgamation breakage at PR time rather
than after a release is public.

Verified beyond the smoke: the full 76-test ctest suite passes when
the multi-header layout is shimmed to the amalgamation.
This repository has immutable releases enabled: assets cannot be
attached after publishing (the v1.2.0 backfill got HTTP 422). The
workflow now triggers on release 'created' (which fires for drafts),
and RELEASING.md publishes via draft -> attach -> undraft. README
points at releases after v1.2.0 for the single-header download.
@gistrec
gistrec merged commit 5b4cc50 into master Jul 2, 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.

1 participant