travis update (osx + linux) (#3041)

This commit is contained in:
tooomm 2018-01-21 23:07:25 +01:00 committed by Zach H
parent da7c7c1f83
commit 14a0c53fc1
3 changed files with 40 additions and 49 deletions

14
.travis/travis-compile.sh → .ci/travis-compile.sh Executable file → Normal file
View file

@ -7,6 +7,7 @@ set -e
mkdir -p build
cd build
prefix=""
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH"
prefix="-DCMAKE_PREFIX_PATH=$(echo /usr/local/opt/qt*/)"
@ -17,10 +18,11 @@ if [[ $TRAVIS_OS_NAME == "linux" ]]; then
fi
if [[ $BUILDTYPE == "Debug" ]]; then
cmake .. -DWITH_SERVER=1 -DTEST=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
make -j2
make test
else
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
make package -j2
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix -DTEST=1
make -j2
make test
fi
if [[ $BUILDTYPE == "Release" ]]; then
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
make package -j2
fi

View file

@ -4,4 +4,7 @@ if [[ $TRAVIS_OS_NAME == "osx" ]] ; then
brew install ccache # enable caching on mac (PATH only set in travis-compile.sh)
brew install --force qt@5.7
brew install protobuf
fi
if [[ $TRAVIS_OS_NAME == "linux" ]] ; then
echo Skipping... packages are installed with the Travis apt addon for sudo disabled container builds
fi

View file

@ -1,64 +1,48 @@
language: cpp
cache: ccache
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
group: stable
env: BUILDTYPE=Debug
addons:
apt:
packages:
- bc
- cmake
- libprotobuf-dev
- protobuf-compiler
- qt5-default
- qttools5-dev
- qttools5-dev-tools
- qtmultimedia5-dev
- libqt5multimedia5-plugins
- libqt5svg5-dev
- libqt5sql5-mysql
- os: linux
dist: trusty
group: stable
env: BUILDTYPE=Release
addons:
apt:
packages:
- bc
- cmake
- libprotobuf-dev
- protobuf-compiler
- qt5-default
- qttools5-dev
- qttools5-dev-tools
- qtmultimedia5-dev
- libqt5multimedia5-plugins
- libqt5svg5-dev
- libqt5sql5-mysql
if: branch = master AND NOT type = pull_request
- os: osx
osx_image: xcode7.3
osx_image: xcode8
env: BUILDTYPE=Debug
cache:
ccache: true
timeout: 360 # 6min timeout for cache uploading instead default 3
directories:
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
- os: osx
osx_image: xcode7.3
osx_image: xcode8
env: BUILDTYPE=Release
cache:
ccache: true
timeout: 360 # 6min timeout for cache uploading instead default 3
directories:
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
if: branch = master AND NOT type = pull_request
cache: ccache
#install dependencies for container-based "linux" builds
addons:
apt:
packages:
- bc
- cmake
- libprotobuf-dev
- protobuf-compiler
- qt5-default
- qttools5-dev
- qttools5-dev-tools
- qtmultimedia5-dev
- libqt5multimedia5-plugins
- libqt5svg5-dev
- libqt5sql5-mysql
before_install: bash ./.travis/travis-dependencies.sh
before_install: bash ./.ci/travis-dependencies.sh
script: bash ./.travis/travis-compile.sh
script: bash ./.ci/travis-compile.sh
# Builds for pull requests skip the deployment step altogether
@ -103,6 +87,8 @@ notifications:
on_success: change
on_failure: change
on_start: never
on_cancel: change
on_error: change
# official validator for ".travis.yml" config file: https://yaml.travis-ci.org