8000 fix: usable archives on every platform; consumer-test every build by adityamukho · Pull Request #5 · project-minigraf/minigraf-c · GitHub
[go: up one dir, main page]

Skip to content

fix: usable archives on every platform; consumer-test every build - #5

Merged
adityamukho merged 2 commits into
mainfrom
ci/consumer-tests
Oct 20, 2026
Merged

adityamukho merged 2 commits into
mainfrom
ci/consumer-tests

Conversation

@adityamukho
@adityamukho adityamukho commented Oct 20, 2026 •
Copy link
Copy Markdown
Contributor

Plan step 2 of the core binding consumer-test spec (docs/superpowers/specs/2026-10-20-binding-consumer-tests-design.md).

Fixed: four bugs in the published archives (2.0.8 and earlier)

  • macOS: the dylib's install name was the CI runner's build path (/Users/runner/work/.../deps/libminigraf.dylib), so any program linked against it failed to start with dyld: Library not loaded. The new macOS consumer test found this. It's now @rpath/libminigraf.dylib, and the build checks it.
  • Windows: the zip had no minigraf.dll.lib, so MSVC could not link. The header was also at the zip root instead of under include/.
  • All platforms: no archive shipped the license files.
  • Linux: the libraries needed the build runner's glibc (2.34). They're now built with cargo zigbuild at glibc 2.17, with a floor check, as Java does.

Added

  • package.yml: builds the 4 archives with one layout: the library, minigraf.dll.lib on Windows, include/minigraf.h, and the licenses. It checks both universal2 slices.

  • consumer-test/: run.sh local|registry unpacks this platform's archive and compiles the README quick start and contract.c exactly as a user would: the README's cc line, or cl with the import library on Windows. Then it runs them. contract.c covers:

    • in memory;
    • file-backed across a checkpoint, close and reopen;
    • invalid Datalog returns NULL and sets minigraf_last_error.

    readme_sync.py checks the README quick start against quickstart.c.

  • ci.yml: package, a consumer test on all 4 platforms, and readme-sync.

  • release.yml:

    • The test job builds and consumer-tests the archives at the release version.
    • publish uploads exactly those 4 files.
    • verify-published downloads them from the release, runs the consumer test on all 4 platforms, and opens a release-broken issue if it fails.
  • README: archive contents, the glibc floor, and the MSVC compile line.

Verified

CI is green:

  • the consumer test passes on Linux x64, Linux arm64, macOS and Windows (MSVC);
  • glibc 2.17;
  • install name @rpath/libminigraf.dylib;
  • archs: x86_64 arm64.

Locally, run.sh registry 2.0.8 fails with archive has no LICENSE-MIT. After merge I'll dispatch verify-published -f version=2.0.8. It should open a release-broken issue for the four bugs above.

Codex review found no issues.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz

adityamukho and others added 2 commits October 20, 2026 22:28
…st every build

The Windows zip had no minigraf.dll.lib, so MSVC could not link against
it; no archive shipped the license files; the header sat at the root of
the Windows zip but under include/ elsewhere; Linux libraries needed the
build runner's glibc (2.34).

- package.yml builds the four release archives with one layout (library,
  minigraf.dll.lib on Windows, include/minigraf.h, licenses); Linux via
  cargo-zigbuild at glibc 2.17 with a floor check; macOS checks both
  universal2 slices.
- consumer-test/: run.sh unpacks this platform's archive, compiles the
  README quick start and contract.c (in memory, file-backed reopen,
  NULL plus minigraf_last_error for invalid Datalog) with cc, or cl and
  the import library on Windows, and runs them; local|registry.
  readme_sync.py checks the README quick start against quickstart.c.
- ci.yml: package, consumer test on the four platforms, readme-sync.
- release.yml: the test job builds and consumer-tests the archives at
  the release version; publish uploads exactly those files;
  verify-published downloads them from the release and opens a
  release-broken issue on failure.
- README: archive contents, glibc floor, the MSVC compile line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
rustc recorded the build directory as LC_ID_DYLIB, so every program
linked against the released dylib looked for it on the CI runner and
failed to start. Found by the macOS consumer test; 2.0.8 is affected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
@adityamukho adityamukho changed the title fix: Windows import library and licenses in the archives; consumer-test every build fix: usable archives on every platform; consumer-test every build Oct 20, 2026
@adityamukho
adityamukho marked this pull request as ready for review October 20, 2026 17:07
@adityamukho
adityamukho merged commit be63d78 into main Oct 20, 2026
14 checks passed
@adityamukho
adityamukho deleted the ci/consumer-tests branch October 20, 2026 17:24
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

0