Merge pull request #2890 from bestlong/php8-fpm
Fix Github CI build PHP 8.0 php-fpm
This commit is contained in:
commit
b9260fbff6
|
@ -12,6 +12,7 @@ jobs:
|
||||||
build-php:
|
build-php:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php_version: ["7.2", "7.3", "7.4", "8.0"]
|
php_version: ["7.2", "7.3", "7.4", "8.0"]
|
||||||
service: [php-fpm, php-worker, workspace, laravel-horizon]
|
service: [php-fpm, php-worker, workspace, laravel-horizon]
|
||||||
|
@ -22,14 +23,27 @@ jobs:
|
||||||
PHP_VERSION: ${{ matrix.php_version }}
|
PHP_VERSION: ${{ matrix.php_version }}
|
||||||
run: |
|
run: |
|
||||||
cp env-example .env
|
cp env-example .env
|
||||||
# sed -i -- '201,272s/=false/=true/g' .env
|
sed -i -- '201,272s/=false/=true/g' .env
|
||||||
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
|
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
|
||||||
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
|
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
|
||||||
|
sed -i -- 's/CASSANDRA=true/CASSANDRA=false/g' .env
|
||||||
|
sed -i -- 's/GEARMAN=true/GEARMAN=false/g' .env
|
||||||
|
sed -i -- 's/AEROSPIKE=true/AEROSPIKE=false/g' .env
|
||||||
|
sed -i -- 's/PHALCON=true/PHALCON=false/g' .env
|
||||||
|
sed -i -- 's/RDKAFKA=true/RDKAFKA=false/g' .env
|
||||||
|
sed -i -- 's/MAILPARSE=true/MAILPARSE=false/g' .env
|
||||||
|
sed -i -- 's/YAML=true/YAML=false/g' .env
|
||||||
|
sed -i -- 's/MSSQL=true/MSSQL=false/g' .env
|
||||||
|
sed -i -- 's/AMQP=true/AMQP=false/g' .env
|
||||||
|
sed -i -- 's/MEMCACHED=true/MEMCACHED=false/g' .env
|
||||||
|
sed -i -- 's/OCI8=true/OCI8=false/g' .env
|
||||||
|
sed -i -- 's/IONCUBE=true/IONCUBE=false/g' .env
|
||||||
docker-compose build ${{ matrix.service }}
|
docker-compose build ${{ matrix.service }}
|
||||||
|
|
||||||
build-other:
|
build-other:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo']
|
service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo']
|
||||||
steps:
|
steps:
|
||||||
|
@ -39,5 +53,4 @@ jobs:
|
||||||
cp env-example .env
|
cp env-example .env
|
||||||
sed -i -- 's/=false/=true/g' .env
|
sed -i -- 's/=false/=true/g' .env
|
||||||
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
|
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
|
||||||
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
|
|
||||||
docker-compose build ${{ matrix.service }}
|
docker-compose build ${{ matrix.service }}
|
||||||
|
|
|
@ -339,31 +339,38 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
|
|
||||||
ARG INSTALL_XHPROF=false
|
ARG INSTALL_XHPROF=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
RUN set -eux; \
|
||||||
|
if [ ${INSTALL_XHPROF} = true ]; then \
|
||||||
# Install the php xhprof extension
|
# Install the php xhprof extension
|
||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") != 5 ]; then \
|
||||||
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v5.0.1.tar.gz"; \
|
pecl install xhprof; \
|
||||||
else \
|
else \
|
||||||
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
||||||
fi \
|
mkdir -p /tmp/xhprof; \
|
||||||
&& mkdir -p xhprof \
|
tar -C /tmp/xhprof -zxvf /tmp/xhprof.tar.gz --strip 1; \
|
||||||
&& tar -C xhprof -zxvf /tmp/xhprof.tar.gz --strip 1 \
|
( \
|
||||||
&& ( \
|
cd /tmp/xhprof/extension; \
|
||||||
cd xhprof \
|
phpize; \
|
||||||
&& phpize \
|
./configure; \
|
||||||
&& ./configure \
|
make; \
|
||||||
&& make \
|
make install; \
|
||||||
&& make install \
|
); \
|
||||||
) \
|
rm -r /tmp/xhprof; \
|
||||||
&& rm -r xhprof \
|
rm /tmp/xhprof.tar.gz; \
|
||||||
&& rm /tmp/xhprof.tar.gz \
|
fi; \
|
||||||
;fi
|
docker-php-ext-enable xhprof; \
|
||||||
|
php -m | grep -q 'xhprof'; \
|
||||||
|
fi
|
||||||
|
|
||||||
COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
# if [ ${INSTALL_XHPROF_USE_TIDYWAYS} = true ]; then \
|
||||||
|
# https://github.com/tideways/php-xhprof-extension
|
||||||
|
# fi
|
||||||
|
|
||||||
RUN if [ ${INSTALL_XHPROF} = false ]; then \
|
# COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
||||||
rm /usr/local/etc/php/conf.d/xhprof.ini \
|
|
||||||
;fi
|
# RUN if [ ${INSTALL_XHPROF} = false ]; then \
|
||||||
|
# rm /usr/local/etc/php/conf.d/xhprof.ini \
|
||||||
|
# ;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# AMQP:
|
# AMQP:
|
||||||
|
@ -1027,7 +1034,13 @@ RUN if [ ${INSTALL_CACHETOOL} = true ]; then \
|
||||||
ARG INSTALL_XMLRPC=false
|
ARG INSTALL_XMLRPC=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_XMLRPC} = true ]; then \
|
RUN if [ ${INSTALL_XMLRPC} = true ]; then \
|
||||||
docker-php-ext-install xmlrpc \
|
apt-get -yq install libxml2-dev; \
|
||||||
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||||
|
pecl install xmlrpc-1.0.0RC2; \
|
||||||
|
docker-php-ext-enable xmlrpc; \
|
||||||
|
else \
|
||||||
|
docker-php-ext-install xmlrpc; \
|
||||||
|
fi \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
Loading…
Reference in New Issue