travis update (osx + linux) (#3041)
This commit is contained in:
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
14
.travis/travis-compile.sh → .ci/travis-compile.sh
Executable file → Normal 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
|
||||||
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
|
if [[ $BUILDTYPE == "Release" ]]; then
|
||||||
make package -j2
|
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
|
||||||
|
make package -j2
|
||||||
fi
|
fi
|
3
.travis/travis-dependencies.sh → .ci/travis-dependencies.sh
Executable file → Normal file
3
.travis/travis-dependencies.sh → .ci/travis-dependencies.sh
Executable file → Normal 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 ccache # enable caching on mac (PATH only set in travis-compile.sh)
|
||||||
brew install --force qt@5.7
|
brew install --force qt@5.7
|
||||||
brew install protobuf
|
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
|
fi
|
72
.travis.yml
72
.travis.yml
|
@ -1,64 +1,48 @@
|
||||||
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
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- bc
|
|
||||||
- cmake
|
|
||||||
- libprotobuf-dev
|
|
||||||
- protobuf-compiler
|
|
||||||
- qt5-default
|
|
||||||
- qttools5-dev
|
|
||||||
- qttools5-dev-tools
|
|
||||||
- qtmultimedia5-dev
|
|
||||||
- libqt5multimedia5-plugins
|
|
||||||
- libqt5svg5-dev
|
|
||||||
- libqt5sql5-mysql
|
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode7.3
|
osx_image: xcode8
|
||||||
env: BUILDTYPE=Debug
|
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
|
- os: osx
|
||||||
osx_image: xcode7.3
|
osx_image: xcode8
|
||||||
env: BUILDTYPE=Release
|
env: BUILDTYPE=Release
|
||||||
cache:
|
if: branch = master AND NOT type = pull_request
|
||||||
ccache: true
|
|
||||||
timeout: 360 # 6min timeout for cache uploading instead default 3
|
|
||||||
directories:
|
|
||||||
- $HOME/Library/Caches/Homebrew # cache Homebrew ressources
|
|
||||||
|
|
||||||
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
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue