Skip to content

Feat/build static php binaries#58

Merged
munezaclovis merged 4 commits intomainfrom
feat/build-static-php-binaries
Apr 14, 2026
Merged

Feat/build static php binaries#58
munezaclovis merged 4 commits intomainfrom
feat/build-static-php-binaries

Conversation

@munezaclovis
Copy link
Copy Markdown
Contributor

No description provided.

claude and others added 4 commits April 13, 2026 19:57
Set SPC_OPT_BUILD_ARGS="--build-cli" so static-php-cli emits both
the frankenphp and standalone php binaries in one invocation. This
guarantees both share an identical extension set (previously the
CLI came from dl.static-php.dev with a different build).

The CI workflow now packages dist/static-php-cli/buildroot/bin/php
into php-mac-{arch}-php{version}.tar.gz and uploads it to the same
release as the frankenphp assets.

phpCLIURL is rewritten to resolve to our own release using the
existing platformName() helper, unifying naming with the frankenphp
asset. The full-version detect step (only used to build the old
static-php.dev URL) and the now-unused phpOSNames/phpArchNames maps
are removed.
Follow-ups from PR review:

- Gate the release job on refs/heads/main so feature-branch dispatches
  exercise the build matrix without publishing to the release.
- Assert every FrankenPHP binary has a matching PHP CLI tarball before
  upload (nullglob + count + per-pair existence) so partial builds can
  never produce an incomplete release.
- Remove DetectPHPVersion and ParseFrankenPHPPhpVersion; they lost
  their only caller when the PHP CLI moved to the unified release URL.
- Extract platformNameFor(goos, goarch) and add table tests for it,
  plus exact-format tests for phpCLIURL and frankenphpAssetName.
The actions/cache step restores dist/static-php-cli/downloads/, which
creates the parent dist/static-php-cli/ containing only downloads/.
build-static.sh's check for static-php-cli/src then fails, and its
fallback `git clone ... static-php-cli` aborts with exit 128 because
the directory already exists.

Pre-cloning the repo before the cache step ensures src/ is present,
so build-static.sh takes the `cd static-php-cli/ && git pull` branch
regardless of cache hit or miss.
Build and distribute standalone PHP CLI alongside FrankenPHP
@munezaclovis munezaclovis merged commit 26a0a22 into main Apr 14, 2026
1 check failed
@munezaclovis munezaclovis deleted the feat/build-static-php-binaries branch April 14, 2026 04:52
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.

2 participants