Merge pull request #165 from keepassxreboot/test/newtravis

Travis builds release and debug using clang and gcc
This commit is contained in:
Janek Bevendorff 2017-01-15 06:06:35 +02:00 committed by GitHub
commit 5458d77980

View File

@ -10,12 +10,11 @@ os:
# Define clang compiler without any frills # Define clang compiler without any frills
compiler: compiler:
- clang - clang
- gcc
# Define gcc compile with deploy option (only for master/develop merges) env:
matrix: - CONFIG=Release
include: - CONFIG=Debug
- compiler: gcc
env: DEPLOY=1
git: git:
depth: 3 depth: 3
@ -33,14 +32,14 @@ before_script:
- mkdir build && pushd build - mkdir build && pushd build
script: script:
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUI_TESTS=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS .. - cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
- make -j2 - make -j2
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi - 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" = "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 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi
# Generate snapcraft build when merging into master/develop branches # Generate snapcraft build when merging into master/develop branches
after_success: #after_success:
- popd # - popd
- "[[ $DEPLOY = 1 ]] && [[ $TRAVIS_BRANCH =~ (master|develop) ]] && [[ $TRAVIS_PULL_REQUEST = false ]] \ # - "[[ $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'" # && docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && apt update && snapcraft'"