mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop-ascraeus
* develop-olympus: [ticket/12318] Use MySQL instead of MySQLi for now on HHVM. [ticket/12318] Pin HHVM version to 3.0.0~precise. [ticket/12318] Always install new config file on HHVM upgrade conflict. [ticket/12318] Add PPA providing dependencies for recent HHVM on Ubuntu 12.04. [ticket/12318] Upgrade to a recent stable version of HHVM. [ticket/12318] Correctly setup HHVM for functional tests.
This commit is contained in:
commit
7fb65f20da
1 changed files with 59 additions and 34 deletions
|
@ -1,42 +1,69 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# @copyright (c) 2013 phpBB Group
|
# @copyright (c) 2014 phpBB Group
|
||||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
|
||||||
|
then
|
||||||
|
# Add PPA providing dependencies for recent HHVM on Ubuntu 12.04.
|
||||||
|
sudo add-apt-repository -y ppa:mapnik/boost
|
||||||
|
fi
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y nginx realpath
|
sudo apt-get install -y nginx realpath
|
||||||
|
|
||||||
sudo service nginx stop
|
sudo service nginx stop
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
DIR=$(dirname "$0")
|
||||||
|
USER=$(whoami)
|
||||||
PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB")
|
PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB")
|
||||||
|
|
||||||
NGINX_CONF="/etc/nginx/sites-enabled/default"
|
NGINX_CONF="/etc/nginx/sites-enabled/default"
|
||||||
|
APP_SOCK=$(realpath "$DIR")/php-app.sock
|
||||||
|
|
||||||
|
if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
|
||||||
|
then
|
||||||
|
# Upgrade to a recent stable version of HHVM
|
||||||
|
sudo apt-get -o Dpkg::Options::="--force-confnew" \
|
||||||
|
install -y hhvm=3.0.0~precise
|
||||||
|
|
||||||
|
# MySQLi is broken in HHVM 3.0.0~precise and still does not work for us in
|
||||||
|
# 2014.03.28~saucy, i.e. needs more work. Use MySQL extension for now.
|
||||||
|
sed -i "s/mysqli/mysql/" "$DIR/phpunit-mysql-travis.xml"
|
||||||
|
|
||||||
|
HHVM_LOG=$(realpath "$DIR")/hhvm.log
|
||||||
|
|
||||||
|
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_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
|
||||||
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
||||||
PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock
|
|
||||||
|
|
||||||
USER=$(whoami)
|
|
||||||
|
|
||||||
# php-fpm configuration
|
|
||||||
echo "
|
echo "
|
||||||
[global]
|
[global]
|
||||||
|
|
||||||
[travis]
|
[travis]
|
||||||
user = $USER
|
user = $USER
|
||||||
group = $USER
|
group = $USER
|
||||||
listen = $PHP_FPM_SOCK
|
listen = $APP_SOCK
|
||||||
pm = static
|
pm = static
|
||||||
pm.max_children = 2
|
pm.max_children = 2
|
||||||
|
|
||||||
php_admin_value[memory_limit] = 128M
|
php_admin_value[memory_limit] = 128M
|
||||||
" > $PHP_FPM_CONF
|
" > $PHP_FPM_CONF
|
||||||
|
|
||||||
# nginx configuration
|
sudo $PHP_FPM_BIN \
|
||||||
|
--fpm-config "$DIR/php-fpm.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# nginx
|
||||||
echo "
|
echo "
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
@ -44,12 +71,10 @@ server {
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
location ~ \.php {
|
location ~ \.php {
|
||||||
fastcgi_pass unix:$PHP_FPM_SOCK;
|
fastcgi_pass unix:$APP_SOCK;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
" | sudo tee $NGINX_CONF > /dev/null
|
" | sudo tee $NGINX_CONF > /dev/null
|
||||||
|
|
||||||
# Start daemons
|
|
||||||
sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf"
|
|
||||||
sudo service nginx start
|
sudo service nginx start
|
||||||
|
|
Loading…
Add table
Reference in a new issue