Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ jobs:
"${BINARY}" list-modules | grep http.handlers.mercure
"${BINARY}" list-modules | grep http.handlers.vulcain
"${BINARY}" php-cli -r "echo 'Sanity check passed';"
"${BINARY}" php-cli -d ffi.enable=1 -r 'exit(FFI::cdef("int abs(int);", "libc.so.6")->abs(-42) === 42 ? 0 : 1);'
env:
BINARY: ./gh-output/frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}-gnu

Expand Down
10 changes: 8 additions & 2 deletions build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -o pipefail
#
# Supported variables:
# - PHP_VERSION: PHP version to build (default: the one pinned in craft.yml)
# - PHP_EXTENSIONS: comma-separated extensions (default: the list in craft.yml)
# - PHP_EXTENSIONS: comma-separated extensions (default: the list in craft.yml, plus ffi on glibc Linux builds)
# - PHP_EXTENSION_LIBS: comma-separated extra libraries (default: the list in craft.yml)
# - XCADDY_ARGS: extra Caddy modules to pass to xcaddy (default: the list in craft.yml)
# - FRANKENPHP_VERSION: FrankenPHP version (default: current Git commit)
Expand Down Expand Up @@ -168,7 +168,13 @@ while IFS= read -r line || [ -n "${line}" ]; do
[ -n "${PHP_VERSION}" ] && line="php-version: \"${PHP_VERSION}\""
;;
"extensions:"*)
[ -n "${PHP_EXTENSIONS}" ] && line="extensions: \"${PHP_EXTENSIONS}\""
if [ -n "${PHP_EXTENSIONS}" ]; then
line="extensions: \"${PHP_EXTENSIONS}\""
elif [[ "${bin_os}" == linux && "${line}" != *[\",]ffi[\",]* ]]; then
case "${SPC_TARGET:-${LIBC}}" in
gnu | *-linux-gnu*) line="${line%\"},ffi\"" ;;
esac
fi
;;
"packages:"*)
packages="${PHP_EXTENSION_LIBS}"
Expand Down
Loading