Build speed and runners #1132
Replies: 4 comments 6 replies
-
I also noticed that there are a lot of |
Beta Was this translation helpful? Give feedback.
-
Are custom runners able to leverage the GitHub Actions Cache as hosted runners do? If yes, there is no need to introduce shared parent images and the like. The Docker Bake action is able to leverage this cache. I would prefer keeping the Dockerfiles and the build steps as simple as possible. This will help to have reproductible builds (Docker images should be reproductible already, but there is still work to do for static builds). e-dant/watcher compilation and the like are cacheable, so it shouldn't be an issue. What we should do however is patch Static PHP CLI to be able to cache downloads and build artifacts. A lock file for the See also crazywhalecc/static-php-cli#187 |
Beta Was this translation helpful? Give feedback.
-
The ways that static-php-cli has implemented to speed up the build:
However, these steps are not very helpful for reproducible builds at present, and static-php is also related to the compilation environment. For example, the latest musl-toolchain built with musl-libc 1.2.5 and gcc-14 cannot compile PHP normally (see crazywhalecc/static-php-cli#537). It may be feasible to record all system environments and build status into a separate log file. It is not available yet, but it should not be difficult. In addition, regarding the independent |
Beta Was this translation helpful? Give feedback.
-
While we're talking about build speed: Does github offer running actions on ARM hardware? That would massively speed up building the ARM dockers and binary (currently alpine ARM takes 6 hours). |
Beta Was this translation helpful? Give feedback.
-
I took my fork of FrankenPHP and set it up for self-hosted runners. I have a decently big Kubernetes cluster for self-hosted builds on some internal stuff, so it is idle quite a bit. In saying that, I was curious if using the cluster would speed up build times or not.
In essence, it does speed things up somewhat but also slows things down. These servers have somewhat limited bandwidth, and most of the build is spent downloading and building tooling to actually build FrankenPHP. In other words, if we want to speed up the build, it might be a good idea to build some static base images as a separate action that runs nightly (or via workflow trigger), and for the current branch if-and-only-if the branch changes these dockerfiles.
For example:
common
section of the Dockerfilebuild-static.sh
into a "prepare" and "build" script)After refactoring, the dockerfiles should be relatively simple: just building FrankenPHP.
These are the acceptance criteria of what I am thinking:
-pr####
suffix and the docker bake file will automatically pick that up. This makes it easy to edit without having to know how things work (aka, the Prepare step)Since this is a pretty big change to the build infra, I want to run it by everyone before starting on it.
Beta Was this translation helpful? Give feedback.
All reactions