2016-10-02 21:30:17 -04:00
|
|
|
language: cpp
|
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2016-11-23 22:28:08 -05:00
|
|
|
services: [docker]
|
2016-10-02 21:30:17 -04:00
|
|
|
|
2014-11-02 06:55:46 -05:00
|
|
|
os:
|
|
|
|
- linux
|
2017-05-04 17:09:08 -04:00
|
|
|
# - osx
|
2016-10-02 21:30:17 -04:00
|
|
|
|
2016-11-25 10:12:45 -05:00
|
|
|
# Define clang compiler without any frills
|
2014-11-02 06:55:46 -05:00
|
|
|
compiler:
|
2016-11-23 22:28:08 -05:00
|
|
|
- clang
|
2017-01-14 22:41:22 -05:00
|
|
|
- gcc
|
2016-12-13 15:14:39 -05:00
|
|
|
|
2017-01-14 22:33:16 -05:00
|
|
|
env:
|
2017-03-14 09:53:29 -04:00
|
|
|
- CONFIG=Release ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
|
|
|
- CONFIG=Debug ASAN_OPTIONS=detect_odr_violation=1:leak_check_at_exit=0
|
2016-10-02 21:30:17 -04:00
|
|
|
|
|
|
|
git:
|
|
|
|
depth: 3
|
2016-11-08 19:49:48 -05:00
|
|
|
|
2016-10-02 21:30:17 -04:00
|
|
|
before_install:
|
2014-11-02 06:55:46 -05:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
|
2017-03-14 09:53:29 -04:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libclang-common-3.5-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb libyubikey-dev libykpers-1-dev; fi
|
2014-11-02 06:55:46 -05:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
2015-09-12 08:43:37 -04:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq libgcrypt || brew install libgcrypt; fi
|
2016-11-08 19:49:48 -05:00
|
|
|
|
2015-09-12 08:07:57 -04:00
|
|
|
before_script:
|
2015-10-15 14:58:00 -04:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"; fi
|
2015-09-12 08:07:57 -04:00
|
|
|
- mkdir build && pushd build
|
2016-11-08 19:49:48 -05:00
|
|
|
|
2014-11-02 06:55:46 -05:00
|
|
|
script:
|
2017-03-14 09:53:29 -04:00
|
|
|
- cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_ASAN=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
|
2016-11-25 10:12:45 -05:00
|
|
|
- make -j2
|
2015-05-14 14:46:59 -04:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
|
2015-09-12 09:39:21 -04:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi
|
2016-11-08 19:49:48 -05:00
|
|
|
|
2016-11-25 10:12:45 -05:00
|
|
|
# Generate snapcraft build when merging into master/develop branches
|
2017-01-14 22:41:22 -05:00
|
|
|
#after_success:
|
|
|
|
# - popd
|
|
|
|
# - "[[ $DEPLOY = 1 ]] && [[ $CONFIG = Release ]] && [[ $TRAVIS_BRANCH =~ (master|develop) ]] && [[ $TRAVIS_PULL_REQUEST = false ]] \
|
|
|
|
# && docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && apt update && snapcraft'"
|