Can FrankenPHP Release version with matrix PHP supported?
Describe you feature request
Is your feature request related to a problem? Please describe.
In my case, i cant build with docker for now in server. We want custom PHP version (ex: 8.3) using static binary as documented curl https://frankenphp.dev/install.sh | sh but binary using PHP 8.4. Can FrankenPHP release with matrix PHP supported version?
Describe the solution you'd like using matrix PHP version in github action, i already changes in local repo https://github.com/ddevsr/frankenphp/commit/54787391a718b1362d1e939f35717f6b507056cb is right or wrong?
Build Type Static Binaries (Ubuntu 22.04.5 LTS)
Worker Mode No/Yes
Operating System GNU/Linux
CPU Architecture x86_64
First time see compile progress PHP with PHP_VERSION=8.3 ./build-static.sh on https://frankenphp.dev/docs/embed/#creating-a-binary-for-other-oses. Many warning in my machine, while the process is taking place. I'm not used to compiling it myself, although the bash script will automatically ask for certain libraries to be installed, such as cmake.
As documented binary result will be stored in dist/ directory. No appear file named frankenphp-<os>-<arch>.
root@xxx:/home/xxx/frankenphp# ls -l dist/
total 8
-rw-r--r-- 1 root root 476 Dec 31 13:45 cache_key
drwxr-xr-x 14 root root 4096 Dec 31 13:54 static-php-cli
root@xxx:/home/xxx/frankenphp# ls -l dist/static-php-cli/
total 400
drwxr-xr-x 2 root root 4096 Dec 31 13:45 bin
-rw-r--r-- 1 root root 338 Dec 31 13:45 box.json
drwxr-xr-x 15 root root 4096 Dec 31 14:15 buildroot
-rw-r--r-- 1 root root 1202 Dec 31 13:45 captainhook.json
-rw-r--r-- 1 root root 1886 Dec 31 13:45 composer.json
-rw-r--r-- 1 root root 251696 Dec 31 13:45 composer.lock
drwxr-xr-x 2 root root 4096 Dec 31 13:45 config
drwxr-xr-x 6 root root 4096 Dec 31 13:45 docs
drwxr-xr-x 7 root root 4096 Dec 31 13:54 downloads
-rw-r--r-- 1 root root 92 Dec 31 13:45 ext-support.md
-rw-r--r-- 1 root root 1070 Dec 31 13:45 LICENSE
-rw-r--r-- 1 root root 230 Dec 31 13:45 package.json
-rw-r--r-- 1 root root 513 Dec 31 13:45 phpstan.neon
-rw-r--r-- 1 root root 101 Dec 31 13:45 phpunit.xml.dist
drwxr-xr-x 2 root root 4096 Dec 31 13:47 pkgroot
-rwxr-xr-x 1 root root 75 Dec 31 13:45 README-en.md
-rwxr-xr-x 1 root root 17390 Dec 31 13:45 README.md
-rwxr-xr-x 1 root root 15836 Dec 31 13:45 README-zh.md
drwxr-xr-x 18 root root 4096 Dec 31 14:14 source
drwxr-xr-x 4 root root 4096 Dec 31 13:45 src
drwxr-xr-x 5 root root 4096 Dec 31 13:45 tests
drwxr-xr-x 8 root root 4096 Dec 31 13:45 vendor
-rw-r--r-- 1 root root 40873 Dec 31 13:45 yarn.lock
root@xxx:/home/xxx/frankenphp# ls -l dist/static-php-cli/bin/
total 24
-rwxr-xr-x 1 root root 2213 Dec 31 13:45 setup-runtime
-rw-r--r-- 1 root root 4468 Dec 31 13:45 setup-runtime.ps1
-rwxr-xr-x 1 root root 731 Dec 31 13:45 spc
-rwxr-xr-x 1 root root 3304 Dec 31 13:45 spc-alpine-docker
-rw-r--r-- 1 root root 419 Dec 31 13:45 spc.ps1
Unfortunately that will take too long on GitHub Actions. To do so we'll likely have to rent and maintain our own build machines. That's not planned yetW
However, Docker images are built for all supported PHP versions, and I'm working on adding support for all supported PHP versions on Homebrew too.
In the long term, I plan to strongly recommend installing using Homebrew (even on Linux) instead of using the static binaries, because these build are faster and more stable (they don't rely on musl).
Regarding your issue, is there any error in the logs? Don't hesitate to copy the full output.
Only warning appear, no stop during compile. But stop in xcaddy
+ xcaddy build --output ../dist/frankenphp-linux-x86_64 --with github.com/dunglas/caddy-cbrotli --with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/frankenphp=.. --with github.com/dunglas/frankenphp/caddy=.
./build-static.sh: line 296: xcaddy: command not found
I think build-static.sh can support automatically install like cmake is better for go and xcaddy commands. Golang install manually in https://go.dev/doc/install
That's weird, xcaddy should install automatically. Can you try again after having run go install xcaddy?
When running go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest nothing appear warning
root@xxx:/home/xxx/frankenphp# go install xcaddy
package xcaddy is not in std (/usr/local/go/src/xcaddy)
root@xxx:/home/xxx/frankenphp# ls -l /usr/local/go
total 72
drwxr-xr-x 2 root root 4096 Nov 28 03:27 api
drwxr-xr-x 2 root root 4096 Nov 28 03:27 bin
-rw-r--r-- 1 root root 52 Nov 28 03:27 codereview.cfg
-rw-r--r-- 1 root root 1337 Nov 28 03:27 CONTRIBUTING.md
drwxr-xr-x 3 root root 4096 Nov 28 03:27 doc
-rw-r--r-- 1 root root 505 Nov 28 03:27 go.env
drwxr-xr-x 3 root root 4096 Nov 28 03:27 lib
-rw-r--r-- 1 root root 1479 Nov 28 03:27 LICENSE
drwxr-xr-x 8 root root 4096 Nov 28 03:27 misc
-rw-r--r-- 1 root root 1303 Nov 28 03:27 PATENTS
drwxr-xr-x 4 root root 4096 Nov 28 03:27 pkg
-rw-r--r-- 1 root root 1454 Nov 28 03:27 README.md
-rw-r--r-- 1 root root 426 Nov 28 03:27 SECURITY.md
drwxr-xr-x 55 root root 4096 Nov 28 03:27 src
drwxr-xr-x 27 root root 12288 Nov 28 03:27 test
-rw-r--r-- 1 root root 35 Nov 28 03:27 VERSION
Opps my bad :( It turns out that I haven't run the user-download folder PATH set for the Golang package
echo "export PATH=\$PATH:$(go env GOPATH)/bin" >> ~/.bashrc
Actually, we should go that if necessary in the script. PR welcome and thanks for the feedback.
Send PR #1298
In theory, except for php-src and extensions, the compilation of libraries takes up most of the time. For different PHP versions but the same combination, we can reuse the library results.
@ddevsr take a look at https://rpms.henderkes.com
@dunglas I susoect this can be closed (by the open PR)