Cross-compile PHP extensions and publish amd64/arm64 images - #58
Closed
jeremypoulter wants to merge 5 commits into
Closed
jeremypoulter wants to merge 5 commits into
jeremypoulter wants to merge 5 commits into
Conversation
Contributor
Author
|
Closing for now; this work is continuing on the fork (jeremypoulter#3) while it's iterated on. I'll bring it back upstream once it has settled. |
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.
Summary
linux/amd64+linux/arm64image.aarch64-linux-gnutoolchain against headers taken from the targetphp:<version>-apacheimage, so no compiler runs under QEMU..sofiles and installslibmosquitto1instead oflibmosquitto-dev.install_redis.sh,install_mosquitto.shanddocker-php-ext-installare removed.df4fab2) and Mosquitto-PHP (426a08a).php:<version>-apache-trixie, set byDEBIAN_SUITE) rather than whatever the untaggedapachetag points to. It is resolved to a digest once, and every job uses that digest so the headers and ABI match.openenergymonitor/emoncms:latest/:<version>when Docker Hub credentials exist). Pull requests build both platforms but do not push.masternow build and publish (previously publishing was manual-only viaworkflow_dispatch, which still works). Publishing runs are serialised so an older build cannot overwrite a newer:latest; superseded PR builds are cancelled.QEMU is used only to assemble the arm64 image and run its load checks.
Workflow
metadata: resolves the PHP image digest, checks for Docker Hub credentials and sets the tags.extensions(amd64/arm64 matrix): extracts the PHP SDK, builds the extensions and uploads them as artifacts. The build checks the ELF machine type, theget_modulesymbol, the absence of an RPATH and the libmosquitto soname.build-and-push: downloads both artifact sets, checks that all 8.sofiles are present, then runs Buildx for both platforms.Local builds
Local
docker build/docker compose buildnow needs the extension artifacts to be built first.web/README.mddocuments the steps.Testing
lddfinds no missing libraries, anduname -mreturns x86_64 and aarch64.docker buildx buildsucceeds.shellcheck ci/*.sh,actionlintandgit diff --checkpass.