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

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

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

View file

@ -5,3 +5,6 @@ if [[ $TRAVIS_OS_NAME == "osx" ]] ; then
brew install --force qt@5.7 brew install --force qt@5.7
brew install protobuf brew install protobuf
fi 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,29 +1,30 @@
language: cpp language: cpp
cache: ccache
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- os: linux - os: linux
dist: trusty dist: trusty
group: stable
env: BUILDTYPE=Debug 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 - os: linux
dist: trusty dist: trusty
group: stable
env: BUILDTYPE=Release env: BUILDTYPE=Release
addons: if: branch = master AND NOT type = pull_request
- os: osx
osx_image: xcode8
env: BUILDTYPE=Debug
- os: osx
osx_image: xcode8
env: BUILDTYPE=Release
if: branch = master AND NOT type = pull_request
#install dependencies for container-based "linux" builds
addons:
apt: apt:
packages: packages:
- bc - bc
@ -37,28 +38,11 @@ matrix:
- libqt5multimedia5-plugins - libqt5multimedia5-plugins
- libqt5svg5-dev - libqt5svg5-dev
- libqt5sql5-mysql - libqt5sql5-mysql
- os: osx
osx_image: xcode7.3
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
env: BUILDTYPE=Release
cache:
ccache: true
timeout: 360 # 6min timeout for cache uploading instead default 3
directories:
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
cache: ccache
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 # Builds for pull requests skip the deployment step altogether
@ -103,6 +87,8 @@ notifications:
on_success: change on_success: change
on_failure: change on_failure: change
on_start: never on_start: never
on_cancel: change
on_error: change
# official validator for ".travis.yml" config file: https://yaml.travis-ci.org # official validator for ".travis.yml" config file: https://yaml.travis-ci.org