Repository navigation
Publish self-contained turbo binaries as the PIE release assets - #6707
Merged
Merged
Conversation
PIE installs a pre-packaged binary by copying the one extension file into the extension directory (phpstan_turbo.so on Unix; on Windows the DLL named like the asset, other DLLs go next to php.exe), so the thin per-version extensions phpstan/phpstan ships since the shared core, which load phpstan_turbo_core from their own directory, cannot be PIE assets: `pie install phpstan/turbo` would install an extension that fails to load. - the turbo-compile, turbo-compile-musl-arm64 and turbo-compile-windows jobs gain a `pie` variant, built only for release tags (and on pull requests labelled turbo-pie): the same version self-contained, with a plain `make pgo` (configure --enable-phpstan-turbo on Windows), uploaded as phpstan_turbo_pie-<target>-php<minor>[-zts] - the new turbo-pie-release job packages them by PIE's asset naming (.github/scripts/turbo-pie-assets.sh) and publishes the phpstan/turbo-ext release of the tag, which the dist release.yml did from the thin binaries until now - the Windows assets carry the Visual Studio generation the leg built against, so PHP 8.6 is published as vs18 (it was named vs17, which PIE on the official vs18 builds of 8.6 never matched) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSeeJXEA18Ma6X4qyx1xMx
|
|
||
| # see the same steps in turbo-compile-core: the training run of | ||
| # `make pgo` runs bin/phpstan on the checkout | ||
| - uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # v4.0.0 |
This was referenced Oct 8, 2026
Member
Author
|
Dist counterpart, to merge together with this one before the next 2.3.x tag: phpstan/phpstan#15436 (removes the dist's turbo-release job). The 2.2.x vs18 naming fix is phpstan/phpstan#15437. Verified from this PR's labelled run: all 44 |
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.
Since the shared core (#6703), phpstan/phpstan ships thin per-version extensions that load
phpstan_turbo_corefrom their own directory. Theturbo-releasejob in phpstan/phpstan's release.yml zips those same files as the PIE release assets. But PIE installs a pre-packaged binary by copying one file:UnixBuild::prePackagedBinary+UnixInstallcopy onlyphpstan_turbo.sointo the extension directory;WindowsInstallcopies the DLL named like the asset into the extension directory, and puts any other DLL next tophp.exeinstead.So from the next 2.3.x release on,
pie install phpstan/turbowould install an extension whose core is missing. PIE needs self-contained binaries.Building them.
turbo-compile,turbo-compile-musl-arm64andturbo-compile-windowsgain avariantmatrix dimension.splitbuilds what the dist ships, as now.piebuilds the same version self-contained, the way every leg did before the split: a plainmake pgo, orconfigure --enable-phpstan-turboon Windows. Its artifact isphpstan_turbo_pie-<target>-php<minor>[-zts], which none of the dist-side jobs pick up (they all matchphpstan_turbo-*). Thepielegs only run for release tags, and on pull requests labelledturbo-pielike this one, so pushes and other PRs cost nothing extra. Tag runs take as long as they did before the split.Publishing them. The new
turbo-pie-releasejob packages the artifacts by PIE's asset naming, using.github/scripts/turbo-pie-assets.sh. The names were checked against PIE'sPrePackagedBinaryAssetNameandWindowsExtensionAssetName. On tags the job publishes the phpstan/turbo-ext release, with the same draft/upload/publish logic the dist job used. On labelled PRs it only uploads the zips as theturbo-pie-assetsartifact.Also fixed: PHP 8.6 on Windows. The dist job named every non-8.3 Windows asset
vs17, but 8.6 is built against the vs18 dev pack, and PIE on the official 8.6 builds asks for…-8.6-{nts,ts}-vs18-x86_64.zip. This affects 2.2.17 and 2.3.0 too. The Windowspielegs now record the compiler they built with, and the asset is named after it.Packaging fake artifacts for every leg gives the 2.3.0 asset set exactly, plus the 12 Linux ZTS assets from #6706 and with
vs18for 8.6. Every malformed input fails (missing file, unknown target or compiler, no artifacts).Needs a dist change before the next 2.3.x tag: the
turbo-releasejob must be removed from phpstan/phpstan's 2.3.x release.yml. Releases in the org are immutable, and that job runs as soon as the dist tag lands, so it would publish the thin binaries before this one finishes. PR to follow in phpstan/phpstan. On 2.2.x the dist keeps packaging, since its binaries are still self-contained. Only its 8.6 Windowsvs17names need the same correction there.🤖 Generated with Claude Code
https://claude.ai/code/session_01LSeeJXEA18Ma6X4qyx1xMx