diff --git a/dockerfiles/ci/bookworm/build-php.sh b/dockerfiles/ci/bookworm/build-php.sh index 1f3a60de6f7..27507c5ad67 100755 --- a/dockerfiles/ci/bookworm/build-php.sh +++ b/dockerfiles/ci/bookworm/build-php.sh @@ -17,6 +17,11 @@ if [[ ${INSTALL_VERSION} == *asan* ]]; then export LDFLAGS='-fsanitize=address -shared-libasan' fi +# Release variants: optimized with debug symbols (no --enable-debug) +if [[ ${INSTALL_VERSION} == release-* ]]; then + export CFLAGS="${CFLAGS:-} -O2 -g" +fi + if [[ ${PHP_VERSION_ID} -le 73 ]]; then export CFLAGS="${CFLAGS:-} -Wno-implicit-function-declaration -DHAVE_POSIX_READDIR_R=1 -DHAVE_OLD_READDIR_R=0 -DTRUE=1 -DFALSE=0" export CXXFLAGS="-DTRUE=true -DFALSE=false" diff --git a/dockerfiles/ci/bookworm/php-7.0/Dockerfile b/dockerfiles/ci/bookworm/php-7.0/Dockerfile index e218acf11a3..32458c4f1dc 100644 --- a/dockerfiles/ci/bookworm/php-7.0/Dockerfile +++ b/dockerfiles/ci/bookworm/php-7.0/Dockerfile @@ -69,6 +69,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $ COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-7.1/Dockerfile b/dockerfiles/ci/bookworm/php-7.1/Dockerfile index d21d6962b1d..708e0e1c605 100644 --- a/dockerfiles/ci/bookworm/php-7.1/Dockerfile +++ b/dockerfiles/ci/bookworm/php-7.1/Dockerfile @@ -70,6 +70,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $ COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-7.2/Dockerfile b/dockerfiles/ci/bookworm/php-7.2/Dockerfile index 5bafb197c28..a59db89c1ea 100644 --- a/dockerfiles/ci/bookworm/php-7.2/Dockerfile +++ b/dockerfiles/ci/bookworm/php-7.2/Dockerfile @@ -70,6 +70,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $ COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-7.3/Dockerfile b/dockerfiles/ci/bookworm/php-7.3/Dockerfile index 09a21305975..2178fd40630 100644 --- a/dockerfiles/ci/bookworm/php-7.3/Dockerfile +++ b/dockerfiles/ci/bookworm/php-7.3/Dockerfile @@ -63,6 +63,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $ COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-7.4/Dockerfile b/dockerfiles/ci/bookworm/php-7.4/Dockerfile index 4c9d31edf88..fc880f0c46e 100644 --- a/dockerfiles/ci/bookworm/php-7.4/Dockerfile +++ b/dockerfiles/ci/bookworm/php-7.4/Dockerfile @@ -69,6 +69,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug- COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.0/Dockerfile b/dockerfiles/ci/bookworm/php-8.0/Dockerfile index 6ff8fc523a7..06774c87db3 100644 --- a/dockerfiles/ci/bookworm/php-8.0/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.0/Dockerfile @@ -75,6 +75,8 @@ COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug- COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.1/Dockerfile b/dockerfiles/ci/bookworm/php-8.1/Dockerfile index 15d7a69d71f..1d15afc53a4 100644 --- a/dockerfiles/ci/bookworm/php-8.1/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.1/Dockerfile @@ -70,12 +70,27 @@ COPY build-extensions.sh /home/circleci RUN /home/circleci/build-extensions.sh RUN cp /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/debug-zts-asan/bin/php +FROM build AS php-release-nts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-nts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + + +FROM build AS php-release-zts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-zts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + FROM base AS final COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.2/Dockerfile b/dockerfiles/ci/bookworm/php-8.2/Dockerfile index bfb9d871b5a..8e346f030e0 100644 --- a/dockerfiles/ci/bookworm/php-8.2/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.2/Dockerfile @@ -68,12 +68,27 @@ COPY build-extensions.sh /home/circleci RUN /home/circleci/build-extensions.sh RUN cp /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/debug-zts-asan/bin/php +FROM build AS php-release-nts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-nts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + + +FROM build AS php-release-zts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-zts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + FROM base AS final COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.3/Dockerfile b/dockerfiles/ci/bookworm/php-8.3/Dockerfile index dbf79aff9e0..c4df460d3b6 100644 --- a/dockerfiles/ci/bookworm/php-8.3/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.3/Dockerfile @@ -86,6 +86,19 @@ FROM build AS php-nts-asan RUN /home/circleci/build-extensions.sh RUN mv /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/nts-asan/bin/php +FROM build AS php-release-nts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-nts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + + +FROM build AS php-release-zts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-zts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + FROM base AS final COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan @@ -93,6 +106,8 @@ COPY --chown=circleci:circleci --from=php-nts-asan $PHP_INSTALL_DIR/nts-asan $PH COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.4/Dockerfile b/dockerfiles/ci/bookworm/php-8.4/Dockerfile index 632221b1595..ca63750f056 100644 --- a/dockerfiles/ci/bookworm/php-8.4/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.4/Dockerfile @@ -84,6 +84,18 @@ FROM build AS php-nts-asan RUN /home/circleci/build-extensions.sh RUN mv /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/nts-asan/bin/php +FROM build AS php-release-nts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-nts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + +FROM build AS php-release-zts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-zts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + FROM base AS final COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan @@ -91,6 +103,8 @@ COPY --chown=circleci:circleci --from=php-nts-asan $PHP_INSTALL_DIR/nts-asan $PH COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root diff --git a/dockerfiles/ci/bookworm/php-8.5/Dockerfile b/dockerfiles/ci/bookworm/php-8.5/Dockerfile index c342f2c81ba..ca7fedc0479 100644 --- a/dockerfiles/ci/bookworm/php-8.5/Dockerfile +++ b/dockerfiles/ci/bookworm/php-8.5/Dockerfile @@ -84,6 +84,19 @@ FROM build AS php-nts-asan RUN /home/circleci/build-extensions.sh RUN mv /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/nts-asan/bin/php +FROM build AS php-release-nts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-nts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + + +FROM build AS php-release-zts +ARG TARGETPLATFORM +RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release-zts $PHP_VERSION +COPY build-extensions.sh /home/circleci +RUN /home/circleci/build-extensions.sh + FROM base AS final COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan @@ -91,6 +104,8 @@ COPY --chown=circleci:circleci --from=php-nts-asan $PHP_INSTALL_DIR/nts-asan $PH COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts +COPY --chown=circleci:circleci --from=php-release-nts $PHP_INSTALL_DIR/release-nts $PHP_INSTALL_DIR/release-nts +COPY --chown=circleci:circleci --from=php-release-zts $PHP_INSTALL_DIR/release-zts $PHP_INSTALL_DIR/release-zts USER root