-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build php 5.3 using docker #1
Conversation
This is a dirty changeset to show how it could be done. Ideally, the build flow should be optimized so that individual steps could be cached and executed in parallel. For example building PHP extensions do not need to be sequential but could be parallel build. A parallel build is offered by docker buildkit if stages have no dependencies. |
By default, the build output is too long:
The log could be directed to a file, or limit disabled: |
I had put this together in the little time I had yesterday, so the scripts surely can be polished. For docker I think you can use this action in a separate workflow in the CI to test the Dockerfile. It supports buildx and caching the layers. |
If needing actions, I think this action is fancier: but currently, there's no such need, the |
Looks like GHA having temporary issues?
this can't be my doing, as it fails before my jobs are executed, right? |
or the failure is due to missing eglibc? && curl -o /tmp/libc.deb -sL http://archive.ubuntu.com/ubuntu/pool/main/e/eglibc/libc6_2.19-0ubuntu6_amd64.deb \
&& dpkg -i /tmp/libc.deb \ |
Nodejs build used in GitHub Action needs
|
Argh, dropped the nodejs patching (5cb51df), it's no longer needed, it builds now: can check after 20m, unless it fails sooner ;) |
8ef2d81
to
cdcfacf
Compare
PLEASE do not force push, especially if PR is in WIP. I can't even figure out what your changes were to preserve them. |
Noticed flaw in the current process: the built php53.tar is uploaded to the final filename before it's tested in CI. |
@shivammathur here's build that passed (17m 23s): it has no docker build optimization, everything is built serialized as before. parallelization I planned to submit as separate PR after this is merged to keep the changes small and reviewable. |
Sorry for the trouble, I have merged PR #2. |
So they could be invoked individually
Example: $ docker build . -f php-5.3/Dockerfile -t php-5.3
build result:
removing WIP so you may merge if you wish. |
@glensc Thanks for improving this. Great work! |
IMHO this project should:
this would provide a consistent process for all versions, currently, the workflow is really weird, really hard to grasp. some files committed to repo, some files built, some files downloaded. also, there's some weird tar+unpack+tar+unpack in the process which could be eliminated if things are straight forward. also, multiple compression formats for no apparent reasons. also build process does install steps (like enabling fpm service), sudo in places not needed, probably tons of leftovers from whatever the build was copied from. I'm sure you're all aware of this and it takes time and efforts to improve this. |
I have thought about your suggestions and I agree that we also should build PHP 5.4 and PHP 5.5. Then we can incorporate patches for known bugs as well. As for other PHP versions, I maintain php-builder. Currently it builds PHP 8.0 and master. May be I can add PHP 7.x builds there and PHP 5.6 build here once required (ppa:ondrej drops support for them). Building already available libraries packages will add to maintenance and build time. So, better would be to keep shared libs and ship them with builds, and change the prefix of PHP to I would be able to give this time only next month or after. Before that, If you have time to implement this for PHP 5.4 and 5.5. I would be happy to test and merge. |
@shivammathur I have been setting up the build for 5.5, I'll create WIP PR then for you to see. but I'm in the middle of splitting the job, so not everything is getting rebuilt if I change one file. |
@shivammathur also, I think you should change your setup process from installing packages to enabling configs, i.e first the whole phpXY.tar is downloaded and unpacked, and then ini files are created or copied to enable extensions. As I've noticed that versions that install .deb packages, are 3+ minutes long, but versions that use prebuilt php, take just seconds. build time of base php images would not matter, as it's done only when there are fixes. and the docker cache layers will improve time if you want to develop things. for GHA docker image layers caching to work there's --cache-from option, but this requires publishing build result to docker registry, not sure this is wanted here. See my similar project where all options are installed, but only enabling extensions with a simple script: |
Implements the idea of moving build process to docker image:
this way can develop this locally without needing an appropriate VM. and not even Linux (macOS).
The build can be performed locally with:
refs: