frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

ci: build rpm, dev and apk packages

Open alexandre-daubois opened this issue 5 months ago • 8 comments

Fix #1739

alexandre-daubois avatar Jul 18 '25 14:07 alexandre-daubois

Oh this is great. I have full support for building for alpine at spc-packages by using bin/spp all --target="native-native-musl -dynamic". But I don't have any logic to create debian or apk packages due to the three different layouts.

henderkes avatar Jul 18 '25 14:07 henderkes

FYI, fpm also supports .apk images, so you wouldn't have to go the manual way. It's a bit simpler to use fpm for all three, rather than fpm for two but native abuild for the last.

henderkes avatar Jul 18 '25 14:07 henderkes

Oh that's good to know, I'll have a look at it. Thanks for the hint!

alexandre-daubois avatar Jul 18 '25 14:07 alexandre-daubois

Should be ready for review now. Here is what the artifact from the CI contains:

Capture d’écran 2025-07-21 à 16 01 28

alexandre-daubois avatar Jul 21 '25 14:07 alexandre-daubois

I believe the musl version we release in a package should be dynamically linked against libc, so users can install extensions.

The zig branch @ static-php-cli implements this with zig cc. It should be merged within the week.

henderkes avatar Jul 21 '25 14:07 henderkes

For the record: https://github.com/crazywhalecc/static-php-cli/pull/806

alexandre-daubois avatar Jul 31 '25 08:07 alexandre-daubois

Yeah, it's ready, but I unfortunately discovered a performance degradation of clang (and in turn zig) over gcc, because of missing global register support.

This makes for ~25% performance and is quite noticeable. I unfortunately do not have any plans to add -dynamic support to the musl toolchain, so I think the only way this could be achieved is compiling on alpine with CC="gcc -dynamic" (or a wrapper script for that, because many libraries don't like when CC has a space).

henderkes avatar Jul 31 '25 09:07 henderkes

@alexandre-daubois could you change this PR to only add the files under package/alpine, but leave the rest as is? I'm using the package definitions and uninstall scripts from the frankenphp code.

henderkes avatar Nov 20 '25 10:11 henderkes