keepassxc/.travis.yml

43 lines
1.5 KiB
YAML
Raw Normal View History

2016-10-02 21:30:17 -04:00
language: cpp
sudo: required
dist: trusty
2014-11-02 06:55:46 -05:00
os:
- linux
2016-10-02 21:30:17 -04:00
# - osx
2014-11-02 06:55:46 -05:00
compiler:
- gcc
2016-10-02 21:30:17 -04:00
# - clang
git:
depth: 3
2016-11-08 19:49:48 -05:00
matrix:
include:
- env: BUILD=1
services: [docker]
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
2016-10-02 21:30:17 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libmicrohttpd10 libmicrohttpd-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb; fi
2014-11-02 06:55:46 -05:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- 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
before_script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"; fi
- mkdir build && pushd build
2016-11-08 19:49:48 -05:00
2014-11-02 06:55:46 -05:00
script:
2016-10-02 21:30:17 -04:00
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUI_TESTS=ON $CMAKE_ARGS ..
2014-11-02 06:55:46 -05:00
- make
- 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
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi
2016-11-08 19:49:48 -05:00
after_success:
- popd
- if [ ! -z "$BUILD" ]; then docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && apt update && snapcraft'; fi