mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
👷 use PHP7.1 and add PostgreSQL9.6
Use newer distro for Travis CI runs. New environment provides PostgreSQL9.6. Also no need to install custom Doxygen, made it optional. Changed default PHP environment from PHP7.0 to current PHP7.1. Changed codecoverage reporting.
This commit is contained in:
parent
03db9833e8
commit
8e80500ee6
3 changed files with 40 additions and 29 deletions
40
.travis.yml
40
.travis.yml
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Travis-CI configuration file
|
# Travis-CI configuration file for Hubzilla
|
||||||
#
|
#
|
||||||
## configure things
|
## configure things
|
||||||
#
|
#
|
||||||
|
@ -7,6 +7,8 @@
|
||||||
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
|
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
|
# use newer 'trusty' based distro, old one is 'precise'
|
||||||
|
dist: trusty
|
||||||
# use docker based containers
|
# use docker based containers
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
@ -21,9 +23,8 @@ addons:
|
||||||
# Install dependencies for generating API documentation with doxygen
|
# Install dependencies for generating API documentation with doxygen
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
# default doxygen 1.7 is too old, we install our own
|
- doxygen
|
||||||
#- doxygen
|
- doxygen-latex
|
||||||
#- doxygen-latex
|
|
||||||
- graphviz
|
- graphviz
|
||||||
- ttf-liberation
|
- ttf-liberation
|
||||||
|
|
||||||
|
@ -36,7 +37,8 @@ addons:
|
||||||
php:
|
php:
|
||||||
- '5.6'
|
- '5.6'
|
||||||
- '7.0'
|
- '7.0'
|
||||||
#- hhvm
|
- '7.1'
|
||||||
|
#- 'hhvm'
|
||||||
|
|
||||||
# list of environments to test
|
# list of environments to test
|
||||||
env:
|
env:
|
||||||
|
@ -46,6 +48,8 @@ env:
|
||||||
- GHP_REPO_REF: github.com/redmatrix/hubzilla.git
|
- GHP_REPO_REF: github.com/redmatrix/hubzilla.git
|
||||||
# Uncomment if a newer/specific version of Doxygen should be used
|
# Uncomment if a newer/specific version of Doxygen should be used
|
||||||
#- DOXY_VER: 1.8.12
|
#- DOXY_VER: 1.8.12
|
||||||
|
# Code Coverage is slow, no need to have it in every build
|
||||||
|
- PHPUCOV: "--no-coverage"
|
||||||
# use matrix only for PHP and MySQL, all other combinations added through includes
|
# use matrix only for PHP and MySQL, all other combinations added through includes
|
||||||
matrix:
|
matrix:
|
||||||
- DB=mysql
|
- DB=mysql
|
||||||
|
@ -55,18 +59,20 @@ matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
# Additional check combinations
|
# Additional check combinations
|
||||||
include:
|
include:
|
||||||
# PHP7, mariadb 10.1
|
# PHP7.1, mariadb 10.1
|
||||||
- php: '7.0'
|
- php: '7.1'
|
||||||
env: DB=mariadb MARIADB_VERSION=10.1
|
env: DB=mariadb MARIADB_VERSION=10.1 CODECOV=1
|
||||||
# use mariadb instead of MySQL
|
# use mariadb instead of MySQL
|
||||||
addons:
|
addons:
|
||||||
mariadb: '10.1'
|
mariadb: '10.1'
|
||||||
# PHP7, PostgreSQL 9.4
|
# PHP7.1, PostgreSQL 9.6
|
||||||
- php: '7.0'
|
- php: '7.1'
|
||||||
env: DB=pgsql POSTGRESQL_VERSION=9.4
|
env: DB=pgsql POSTGRESQL_VERSION=9.6
|
||||||
# Use newer postgres than 9.1 default
|
# Use newer postgres than 9.2 default
|
||||||
addons:
|
addons:
|
||||||
postgresql: '9.4'
|
postgresql: '9.6'
|
||||||
|
services:
|
||||||
|
- postgresql
|
||||||
# Exclude from default matrix combinations
|
# Exclude from default matrix combinations
|
||||||
# exclude:
|
# exclude:
|
||||||
# - php: hhvm
|
# - php: hhvm
|
||||||
|
@ -76,7 +82,7 @@ matrix:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.composer/cache
|
- $HOME/.composer/cache
|
||||||
- $HOME/doxygen/doxygen-$DOXY_VER/bin
|
#- $HOME/doxygen/doxygen-$DOXY_VER/bin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,6 +99,10 @@ install:
|
||||||
|
|
||||||
# execute any number of scripts before the test run, custom env's are available as variables
|
# execute any number of scripts before the test run, custom env's are available as variables
|
||||||
before_script:
|
before_script:
|
||||||
|
# Use code coverage config for phpunit
|
||||||
|
- if [[ ! -z $CODECOV ]]; then export PHPUCOV=""; fi
|
||||||
|
# HHVM needs xdebug for code coverage, but extremely slow
|
||||||
|
#- if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi
|
||||||
# Some preparation tasks of environment
|
# Some preparation tasks of environment
|
||||||
- ./tests/travis/prepare.sh
|
- ./tests/travis/prepare.sh
|
||||||
# DB specific prepare scripts
|
# DB specific prepare scripts
|
||||||
|
@ -101,7 +111,7 @@ before_script:
|
||||||
- if [[ "$DB" == "pgsql" ]]; then ./tests/travis/prepare_pgsql.sh; fi
|
- if [[ "$DB" == "pgsql" ]]; then ./tests/travis/prepare_pgsql.sh; fi
|
||||||
|
|
||||||
# omitting "script:" will default to phpunit
|
# omitting "script:" will default to phpunit
|
||||||
script: ./vendor/bin/phpunit -c tests/phpunit-$DB.xml
|
script: ./vendor/bin/phpunit $PHPUCOV -c tests/phpunit-$DB.xml
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Generate API documentation and deploy it to gh-pages
|
# Generate API documentation and deploy it to gh-pages
|
||||||
|
|
|
@ -34,21 +34,22 @@ if [[ "$TRAVIS_JOB_NUMBER" != "${TRAVIS_BUILD_NUMBER}.1" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get newer Doxygen
|
echo "Doxygen version >= 1.8 is required"
|
||||||
#echo "Doxygen version 1.7 is too old for us :("
|
|
||||||
#doxygen --version
|
|
||||||
|
|
||||||
# Travis CI has an old Doxygen 1.7 build, so we fetch a recent static binary
|
|
||||||
export DOXY_BINPATH=$HOME/doxygen/doxygen-$DOXY_VER/bin
|
|
||||||
if [ ! -e "$DOXY_BINPATH/doxygen" ]; then
|
|
||||||
echo "Installing newer Doxygen $DOXY_VER ..."
|
|
||||||
mkdir -p $HOME/doxygen && cd $HOME/doxygen
|
|
||||||
wget -O - http://ftp.stack.nl/pub/users/dimitri/doxygen-$DOXY_VER.linux.bin.tar.gz | tar xz
|
|
||||||
export PATH=$PATH:$DOXY_BINPATH
|
|
||||||
fi
|
|
||||||
echo "Doxygen version"
|
|
||||||
doxygen --version
|
doxygen --version
|
||||||
|
|
||||||
|
# Check if newer version of Doxygen should be used
|
||||||
|
if [ ! -z "$DOXY_VER" ]; then
|
||||||
|
export DOXY_BINPATH=$HOME/doxygen/doxygen-$DOXY_VER/bin
|
||||||
|
if [ ! -e "$DOXY_BINPATH/doxygen" ]; then
|
||||||
|
echo "Installing newer Doxygen $DOXY_VER ..."
|
||||||
|
mkdir -p $HOME/doxygen && cd $HOME/doxygen
|
||||||
|
wget -O - http://ftp.stack.nl/pub/users/dimitri/doxygen-$DOXY_VER.linux.bin.tar.gz | tar xz
|
||||||
|
export PATH=$DOXY_BINPATH:$PATH
|
||||||
|
fi
|
||||||
|
echo "Doxygen version"
|
||||||
|
doxygen --version
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Generating Doxygen API documentation ..."
|
echo "Generating Doxygen API documentation ..."
|
||||||
cd $TRAVIS_BUILD_DIR
|
cd $TRAVIS_BUILD_DIR
|
||||||
mkdir -p ./doc/html
|
mkdir -p ./doc/html
|
||||||
|
|
|
@ -30,7 +30,7 @@ echo "Preparing for PostgreSQL ..."
|
||||||
# Print out some PostgreSQL information
|
# Print out some PostgreSQL information
|
||||||
psql --version
|
psql --version
|
||||||
# Why does this hang further execution of the job?
|
# Why does this hang further execution of the job?
|
||||||
#psql -c "SELECT VERSION();" -U postgres
|
psql -c "SELECT VERSION();" -U postgres
|
||||||
|
|
||||||
# Create Hubzilla database
|
# Create Hubzilla database
|
||||||
psql -c "DROP DATABASE IF EXISTS hubzilla;" -U postgres
|
psql -c "DROP DATABASE IF EXISTS hubzilla;" -U postgres
|
||||||
|
|
Loading…
Reference in a new issue