File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ if [[ ${INSTALL_VERSION} == *asan* ]]; then
1717 export LDFLAGS=' -fsanitize=address -shared-libasan'
1818fi
1919
20+ # Release variant: optimized with debug symbols (no --enable-debug)
21+ if [[ ${INSTALL_VERSION} == release ]]; then
22+ export CFLAGS=" ${CFLAGS:- } -O2 -g"
23+ fi
24+
2025if [[ ${PHP_VERSION_ID} -le 73 ]]; then
2126 export CFLAGS=" ${CFLAGS:- } -Wno-implicit-function-declaration -DHAVE_POSIX_READDIR_R=1 -DHAVE_OLD_READDIR_R=0 -DTRUE=1 -DFALSE=0"
2227 export CXXFLAGS=" -DTRUE=true -DFALSE=false"
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $
6969COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7070COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7171COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
72+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7273
7374USER root
7475
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $
7070COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7171COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7272COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
73+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7374
7475USER root
7576
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $
7070COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7171COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7272COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
73+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7374
7475USER root
7576
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts $PHP_INSTALL_DIR/debug-zts $
6363COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
6464COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
6565COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
66+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
6667
6768USER root
6869
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-
6969COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7070COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7171COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
72+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7273
7374USER root
7475
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-
7575COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7676COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7777COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
78+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7879
7980USER root
8081
Original file line number Diff line number Diff line change @@ -70,12 +70,20 @@ COPY build-extensions.sh /home/circleci
7070RUN /home/circleci/build-extensions.sh
7171RUN cp /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/debug-zts-asan/bin/php
7272
73+ FROM build AS php-release
74+ ARG TARGETPLATFORM
75+ RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release $PHP_VERSION
76+ COPY build-extensions.sh /home/circleci
77+ RUN /home/circleci/build-extensions.sh
78+
79+
7380FROM base AS final
7481COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR
7582COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan
7683COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7784COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7885COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
86+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7987
8088USER root
8189
Original file line number Diff line number Diff line change @@ -68,12 +68,20 @@ COPY build-extensions.sh /home/circleci
6868RUN /home/circleci/build-extensions.sh
6969RUN cp /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/debug-zts-asan/bin/php
7070
71+ FROM build AS php-release
72+ ARG TARGETPLATFORM
73+ RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release $PHP_VERSION
74+ COPY build-extensions.sh /home/circleci
75+ RUN /home/circleci/build-extensions.sh
76+
77+
7178FROM base AS final
7279COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR
7380COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan
7481COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
7582COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
7683COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
84+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
7785
7886USER root
7987
Original file line number Diff line number Diff line change @@ -86,13 +86,21 @@ FROM build AS php-nts-asan
8686 RUN /home/circleci/build-extensions.sh
8787 RUN mv /tmp/build-php/sapi/cli/php-asan $PHP_INSTALL_DIR/nts-asan/bin/php
8888
89+ FROM build AS php-release
90+ ARG TARGETPLATFORM
91+ RUN /home/circleci/build-php.sh $TARGETPLATFORM $PHP_INSTALL_DIR release $PHP_VERSION
92+ COPY build-extensions.sh /home/circleci
93+ RUN /home/circleci/build-extensions.sh
94+
95+
8996FROM base AS final
9097COPY --chown=circleci:circleci --from=src $PHP_SRC_DIR $PHP_SRC_DIR
9198COPY --chown=circleci:circleci --from=php-debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan $PHP_INSTALL_DIR/debug-zts-asan
9299COPY --chown=circleci:circleci --from=php-nts-asan $PHP_INSTALL_DIR/nts-asan $PHP_INSTALL_DIR/nts-asan
93100COPY --chown=circleci:circleci --from=php-debug $PHP_INSTALL_DIR/debug $PHP_INSTALL_DIR/debug
94101COPY --chown=circleci:circleci --from=php-nts $PHP_INSTALL_DIR/nts $PHP_INSTALL_DIR/nts
95102COPY --chown=circleci:circleci --from=php-zts $PHP_INSTALL_DIR/zts $PHP_INSTALL_DIR/zts
103+ COPY --chown=circleci:circleci --from=php-release $PHP_INSTALL_DIR/release $PHP_INSTALL_DIR/release
96104
97105USER root
98106
You can’t perform that action at this time.
0 commit comments