From 42b25c80dc1da5dbb09748b59959751e80ecde9a Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Wed, 15 Jun 2016 14:52:53 +0900 Subject: [PATCH] refs #1847 : add - basic travis CI support skeleton --- .travis.yml | 30 ++++++++++++++++++++++++++++++ build/travis-ci-apache | 20 ++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .travis.yml create mode 100644 build/travis-ci-apache diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..fde36f7fd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: php +php: + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - hhvm +env: + - DB=mysql + - DB=pgsql + - DB=sqlite +matrix: + exclude: + - php: hhvm + env: DB=pgsql # PDO driver for pgsql is unsupported by HHVM (3rd party install for support) + allow_failures: + - php: 7.0 + - php: hhvm +before_script: + - sudo apt-get update + - sudo apt-get install apache2 libapache2-mod-fastcgi + # enable php-fpm + - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf + - sudo a2enmod rewrite actions fastcgi alias + - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm + # configure apache virtual hosts + - sudo cp -f build/travis-ci-apache /etc/apache2/sites-available/default + - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default + - sudo service apache2 restart diff --git a/build/travis-ci-apache b/build/travis-ci-apache new file mode 100644 index 000000000..6f06db17d --- /dev/null +++ b/build/travis-ci-apache @@ -0,0 +1,20 @@ + + DocumentRoot %TRAVIS_BUILD_DIR% + + + Options FollowSymLinks MultiViews ExecCGI + AllowOverride All + Order deny,allow + Allow from all + + + # Wire up Apache to use Travis CI's php-fpm. + + AddHandler php5-fcgi .php + Action php5-fcgi /php5-fcgi + Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi + FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization + +RewriteEngine on +RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] +