Add GH action to build library artifacts#188
Add GH action to build library artifacts#188stloyd wants to merge 4 commits intocrazywhalecc:mainfrom
Conversation
|
This is a good idea, but we may not do it at the moment. Because each compiled extension only includes the libraries it must depend on, ignoring optional dependencies. I know we could include all suggested libs, but it will make it impossible to compile without suggesting libs, we lost flexibility. Additionally there are some Also, the current build system is not perfect. Some libraries or extensions using the C++ language can only be compiled under Alpine. At least now, we cannot directly use the |
I think we need to start somewhere ;) |
|
2bdfcff to
0476ec3
Compare
419fe4b to
71b64e6
Compare
|
Reworked the action & it now uses pre-generated binary 😮💨 Tested on my repo: https://github.com/stloyd/static-php-build/actions/runs/6208292912 (workflow is a little bit different cause it needed to access external repository) |
|
I have the following questions to figure out. For Actions, what is the scope of its cache? Assuming others use Because there are too many libraries now with optional dependencies. Optional dependencies for compilation are always dynamic and can be combined in too many ways. Also, I think it would be better to set up a separate
|
Generated artifacts can be downloaded & re-used instead of built locally.
Example of
curllibrary pre-build for osx: https://github.com/stloyd/static-php-build/actions/runs/6198320093Extracted locally to
buildrootdir:stloyd@MacBook-Pro-2 static-php-cli % bin/spc build curl --build-micro _ _ _ _ ___| |_ __ _| |_(_) ___ _ __ | |__ _ __ / __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \ \__ \ || (_| | |_| | (_|_____| |_) | | | | |_) | |___/\__\__,_|\__|_|\___| | .__/|_| |_| .__/ v2.0-rc6 |_| |_| [13:30:27] [INFO] [EXEC] sysctl -n hw.ncpu [13:30:27] [INFO] Build target: micro [13:30:27] [INFO] Enabled extensions: curl [13:30:27] [INFO] Required libraries: zlib, openssl, curl [13:30:29] [NOTI] lib [zlib] already built [13:30:29] [NOTI] lib [openssl] already built [13:30:29] [NOTI] lib [curl] already built [13:30:29] [INFO] patching before-configure for curl checks [13:30:29] [INFO] Extension [curl] patched before buildconf [13:30:29] [INFO] Entering dir: /Users/stloyd/Documents/static-php-cli/source/php-src [13:30:29] [INFO] [EXEC] ./buildconf --force [13:30:35] [INFO] Extension [curl] patched before configure [13:30:35] [INFO] Entering dir: /Users/stloyd/Documents/static-php-cli/source/php-src [13:30:35] [INFO] Using configure: --with-curl (...)