diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
commit | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch) | |
tree | e0db2bb4a012d5b06a633160b19f62f4868ecd28 /travis | |
parent | 36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff) | |
parent | 2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff) | |
download | forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2 forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip |
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'travis')
-rwxr-xr-x | travis/check-executable-files.sh | 7 | ||||
-rwxr-xr-x | travis/check-image-icc-profiles.sh | 3 | ||||
-rwxr-xr-x | travis/check-sami-parse-errors.sh | 3 | ||||
-rwxr-xr-x | travis/ext-sniff.sh | 5 | ||||
-rwxr-xr-x | travis/install-phpbb-test-dependencies.sh | 16 | ||||
-rwxr-xr-x | travis/phing-sniff.sh | 3 | ||||
-rwxr-xr-x | travis/setup-database.sh | 8 | ||||
-rwxr-xr-x | travis/setup-mariadb.sh | 2 | ||||
-rwxr-xr-x | travis/setup-php-extensions.sh | 20 | ||||
-rwxr-xr-x | travis/setup-phpbb.sh | 13 | ||||
-rwxr-xr-x | travis/setup-webserver.sh | 71 |
11 files changed, 67 insertions, 84 deletions
diff --git a/travis/check-executable-files.sh b/travis/check-executable-files.sh index 4d420add1c..1aa8dca073 100755 --- a/travis/check-executable-files.sh +++ b/travis/check-executable-files.sh @@ -12,10 +12,11 @@ set -e DB=$1 TRAVIS_PHP_VERSION=$2 -root="$3" +NOTESTS=$3 +root="$4" path="${root}phpBB/" -if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == '1' ] then # Check the permissions of the files @@ -27,7 +28,7 @@ then files_skipped="-false" # Files which have to be executable - executable_files="-path ${path}bin/*" + executable_files="-path ${path}bin/* -o -path ${path}install/phpbbcli.php" incorrect_files=$( \ find ${path} \ diff --git a/travis/check-image-icc-profiles.sh b/travis/check-image-icc-profiles.sh index 5926962d40..05c7de2d27 100755 --- a/travis/check-image-icc-profiles.sh +++ b/travis/check-image-icc-profiles.sh @@ -12,8 +12,9 @@ set -e DB=$1 TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 -if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == '1' ] then find . -type f -a -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' -a -not -wholename '*vendor/*' | \ parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}' diff --git a/travis/check-sami-parse-errors.sh b/travis/check-sami-parse-errors.sh index c3338e34db..4cc2cee525 100755 --- a/travis/check-sami-parse-errors.sh +++ b/travis/check-sami-parse-errors.sh @@ -12,8 +12,9 @@ set -e DB=$1 TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 -if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == '1' ] then # Workarounds for # https://github.com/fabpot/Sami/issues/116 diff --git a/travis/ext-sniff.sh b/travis/ext-sniff.sh index 4e557a41c1..ca4d2115ba 100755 --- a/travis/ext-sniff.sh +++ b/travis/ext-sniff.sh @@ -10,12 +10,13 @@ # set -e set -x - + DB=$1 TRAVIS_PHP_VERSION=$2 EXTNAME=$3 +NOTESTS=$4 -if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == "1" ] then phpBB/vendor/bin/phpcs \ -s \ diff --git a/travis/install-phpbb-test-dependencies.sh b/travis/install-phpbb-test-dependencies.sh deleted file mode 100755 index 25743ff2b1..0000000000 --- a/travis/install-phpbb-test-dependencies.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# This file is part of the phpBB Forum Software package. -# -# @copyright (c) phpBB Limited <https://www.phpbb.com> -# @license GNU General Public License, version 2 (GPL-2.0) -# -# For full copyright and license information, please see -# the docs/CREDITS.txt file. -# -set -e -set -x - -cd tests -php ../composer.phar install --dev --no-interaction --prefer-source -cd .. diff --git a/travis/phing-sniff.sh b/travis/phing-sniff.sh index 660d1764c2..3f43b64130 100755 --- a/travis/phing-sniff.sh +++ b/travis/phing-sniff.sh @@ -13,8 +13,9 @@ set -x DB=$1 TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 -if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == '1' ] then cd build ../phpBB/vendor/bin/phing sniff diff --git a/travis/setup-database.sh b/travis/setup-database.sh index 4ba9157d9d..3771f19073 100755 --- a/travis/setup-database.sh +++ b/travis/setup-database.sh @@ -13,6 +13,12 @@ set -x DB=$1 TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 + +if [ "$NOTESTS" == '1' ] +then + exit 0 +fi if [ "$DB" == "postgres" ] then @@ -20,7 +26,7 @@ then psql -c 'create database phpbb_tests;' -U postgres fi -if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ] +if [ "$TRAVIS_PHP_VERSION" == "5.4" -a "$DB" == "mysqli" ] then mysql -e 'SET GLOBAL storage_engine=MyISAM;' fi diff --git a/travis/setup-mariadb.sh b/travis/setup-mariadb.sh index 9bc487915d..95445dcc55 100755 --- a/travis/setup-mariadb.sh +++ b/travis/setup-mariadb.sh @@ -12,7 +12,7 @@ set -e set -x # MariaDB Series -VERSION='5.5' +VERSION='10.0' # Operating system codename, e.g. "precise" OS_CODENAME=$(lsb_release --codename --short) diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh index d9544858b7..a69468a637 100755 --- a/travis/setup-php-extensions.sh +++ b/travis/setup-php-extensions.sh @@ -46,13 +46,25 @@ php_ini_file=$(find_php_ini) if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ] then echo 'Enabling APC PHP extension' - register_php_extension 'apc' "$php_ini_file" + printf "\n" | pecl install apc echo 'apc.enable_cli=1' >> "$php_ini_file" -else - echo 'Disabling Opcache' - echo 'opcache.enable=0' >> "$php_ini_file" fi +# APCu +if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ] +then + if ! [ "$(pecl info pecl/apcu)" ] + then + echo 'Enabling APCu PHP extension' + printf "\n" | pecl install apcu + echo 'apc.enabled=1' >> "$php_ini_file" + echo 'apc.enable_cli=1' >> "$php_ini_file" + fi +fi + +# Disable xdebug on travis +phpenv config-rm xdebug.ini + # redis # Disabled redis for now as it causes travis to fail # git clone git://github.com/nicolasff/phpredis.git redis diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh index 4daa754481..be9eb703d5 100755 --- a/travis/setup-phpbb.sh +++ b/travis/setup-phpbb.sh @@ -13,8 +13,9 @@ set -x DB=$1 TRAVIS_PHP_VERSION=$2 +NOTESTS=$3 -if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ] +if [ "$NOTESTS" == '1' ] then travis/setup-exiftool.sh travis/setup-unbuffer.sh @@ -25,22 +26,16 @@ then travis/setup-mariadb.sh fi -if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] +if [ "$NOTESTS" != '1' ] then travis/setup-php-extensions.sh fi -if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` == "1" ] +if [ "$NOTESTS" != '1' ] then travis/setup-webserver.sh - travis/install-phpbb-test-dependencies.sh fi cd phpBB -if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.4', '<');"` == "1" ] -then - php ../composer.phar config disable-tls true -fi php ../composer.phar install --dev --no-interaction - cd .. diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh index 911ba12f3c..fd87d97449 100755 --- a/travis/setup-webserver.sh +++ b/travis/setup-webserver.sh @@ -19,58 +19,39 @@ sudo service nginx stop DIR=$(dirname "$0") USER=$(whoami) PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB") -NGINX_CONF="/etc/nginx/sites-enabled/default" +NGINX_SITE_CONF="/etc/nginx/sites-enabled/default" +NGINX_CONF="/etc/nginx/nginx.conf" APP_SOCK=$(realpath "$DIR")/php-app.sock -if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ] -then - HHVM_LOG=$(realpath "$DIR")/hhvm.log +# php-fpm +PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" +PHP_FPM_CONF="$DIR/php-fpm.conf" - sudo service hhvm stop - sudo hhvm \ - --mode daemon \ - --user "$USER" \ - -vServer.Type=fastcgi \ - -vServer.FileSocket="$APP_SOCK" \ - -vLog.File="$HHVM_LOG" -else - # php-fpm - PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" - PHP_FPM_CONF="$DIR/php-fpm.conf" - - echo " - [global] +echo " + [global] - [travis] - user = $USER - group = $USER - listen = $APP_SOCK - listen.mode = 0666 - pm = static - pm.max_children = 2 + [travis] + user = $USER + group = $USER + listen = $APP_SOCK + listen.mode = 0666 + pm = static + pm.max_children = 2 - php_admin_value[memory_limit] = 128M - " > $PHP_FPM_CONF + php_admin_value[memory_limit] = 128M +" > $PHP_FPM_CONF - sudo $PHP_FPM_BIN \ - --fpm-config "$DIR/php-fpm.conf" -fi +sudo $PHP_FPM_BIN \ + --fpm-config "$DIR/php-fpm.conf" # nginx -echo " - server { - listen 80; - root $PHPBB_ROOT_PATH/; - index index.php index.html; - - location ~ \.php { - include fastcgi_params; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - fastcgi_param PATH_INFO \$fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; - fastcgi_pass unix:$APP_SOCK; - } - } -" | sudo tee $NGINX_CONF > /dev/null +cat $DIR/../phpBB/docs/nginx.sample.conf \ +| sed "s/root \/path\/to\/phpbb/root $(echo $PHPBB_ROOT_PATH | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g')/g" \ +| sed -e '1,/The actual board domain/d' \ +| sed -e '/If running php as fastcgi/,$d' \ +| sed -e "s/fastcgi_pass php;/fastcgi_pass unix:$(echo $APP_SOCK | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g');/g" \ +| sed -e 's/#listen 80/listen 80/' \ +| sudo tee $NGINX_SITE_CONF +sudo sed -i "s/user www-data;/user $USER;/g" $NGINX_CONF sudo service nginx start |