Skip to content

feat: build PIE pre-packaged Linux binaries (glibc/musl) on release - #77

Merged
zeriyoshi merged 1 commit into
mainfrom
feat/pie-linux-binaries
Jul 27, 2026
Merged

feat: build PIE pre-packaged Linux binaries (glibc/musl) on release#77
zeriyoshi merged 1 commit into
mainfrom
feat/pie-linux-binaries

Conversation

@zeriyoshi

Copy link
Copy Markdown
Contributor

Summary

PIE supports pre-packaged-binary release assets for Linux/macOS (not just Windows), and pskel-generated composer.json already declares it in download-url-method. This adds the Linux binary builds using the container infrastructure:

  • Dockerfile: new lightweight builder stage derived directly from ${IMAGE}:${TAG} — installs only $PHPIZE_DEPS + patch + zip and extracts the PHP source (for skeleton fallback init). No LLVM/Valgrind, so it builds in seconds.
  • pskel.sh: new pskel package <release_tag> [output_dir] [extension_name] command — phpize/configure/make against the container PHP, verifies the built .so actually loads (php -m), and packages it with the exact naming convention of php/pie-ext-binary-builder: php_{ext}-{tag}_php{maj.min}-{arch}-{os}-{libc}[-debug][-zts].zip (NTS/nodebug omitted). Extension name resolves from argument → composer.jsonconfig.m4. Also works on macOS hosts (darwin/bsdlibc).
  • release.yaml: new Linux job — ubuntu-24.04/-arm × PHP 8.1–8.5 × cli/zts × trixie/alpine (40 assets: glibc + musl, x86_64 + arm64) uploaded to the release.

Test plan

  • Local E2E (arm64): trixie/cli builder → php_skeleton-v9.9.9-test_php8.5-arm64-linux-glibc.zip (name auto-detected from composer.json via fallback init)
  • Local E2E (arm64): alpine/zts builder → php_skeleton-v9.9.9-test_php8.5-arm64-linux-musl-zts.zip
  • Both archives contain only skeleton.so; load smoke test passed in-container
  • Verify on next tagged release

🤖 Generated with Claude Code

Add a lightweight "builder" Docker stage (PHPIZE_DEPS + patch + zip,
independent of the heavy base stage) and a "pskel package" command that
builds the extension against the container PHP, smoke-tests that the
resulting shared object loads, and packages it using the same naming
convention as php/pie-ext-binary-builder:

  php_{ext}-{tag}_php{maj.min}-{arch}-{os}-{libc}[-debug][-zts].zip

The Release workflow gains a Linux job (x86_64/arm64 x PHP 8.1-8.5 x
cli/zts x trixie/alpine = glibc and musl) uploading the archives as
release assets. Generated composer.json already declares
pre-packaged-binary in download-url-method, so PIE picks these up with
fallback to source builds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zeriyoshi
zeriyoshi merged commit e6fc833 into main Jul 27, 2026
2 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