Skip to content

feat: reuse compiled PHP artifacts for daily images - #256

Draft
Soner (shyim) wants to merge 1 commit into
mainfrom
feat/reuse-compiled-php-artifacts
Draft

Soner (shyim) wants to merge 1 commit into
mainfrom
feat/reuse-compiled-php-artifacts

Conversation

@shyim

Copy link
Copy Markdown
Member

Daily builds currently recompile PHP, FrankenPHP and extensions to refresh OS packages. This separates compilation from daily image assembly: compilation inputs determine reusable artifact tags, while daily images start from fresh Alpine/Debian bases and install current runtime libraries.

  • Publish two artifact variants per PHP version and architecture: FPM and FrankenPHP. Both include gRPC and OpenTelemetry; FPM also includes the dev profilers. Existing public tags and extension activation defaults are preserved.
  • Derive runtime dependencies from compiled binaries, validate distro/PHP/architecture compatibility, and retain the PHP source archive for downstream extension installation.
  • Build only missing artifacts, resolve published artifacts by digest, and reject daily build graphs that still contain compilation targets. Add local build commands and update CI triggers and smoke-test wiring.

Production FPM images now carry disabled profiler binaries and their runtime libraries. Daily package refreshes do not update compiled extensions or embedded/static dependencies; changing compilation inputs or bumping compiledRevision triggers a new artifact build, as documented in the README.

Validation

  • Built and verified all 96 image/platform combinations: PHP 8.2–8.5, all 12 variants, ARM64 and AMD64 (locally emulated).
  • Checked optional extensions are present but disabled by default, OTel activation, all dev profilers, shared-library resolution, PHP functionality, FPM configuration, tools, HTTP serving and media headers.
  • A second daily refresh reused both artifacts without compilation.
  • Build-plan tests, compatibility checks, ShellCheck, actionlint and whitespace 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