Move running tests in separate build job. This potensially can give speed

optimization if travis shares cchace between build jobs.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-02-24 08:12:04 +02:00
parent 0446a0653c
commit 8224c437d7

View File

@ -1,13 +1,15 @@
language: cpp language: cpp
matrix: jobs:
include: include:
- os: linux - stage: "main test"
os: linux
dist: trusty dist: trusty
sudo: required sudo: required
compiler: clang compiler: clang
env: env:
- DEPLOY=false - DEPLOY=false
- CCACHE_CPP2=yes - CCACHE_CPP2=yes
- RUN_TESTS=true
cache: cache:
- ccache - ccache
directories: directories:
@ -24,6 +26,19 @@ matrix:
- DEPLOY=true - DEPLOY=true
- LEGACY=true - LEGACY=true
osx_image: xcode8 osx_image: xcode8
- stage: "sonarcloud"
os: linux
dist: trusty
sudo: required
compiler: clang
env:
- DEPLOY=false
- CCACHE_CPP2=yes
- RUN_TESTS=false
cache:
- ccache
directories:
- '$HOME/.sonar/cache'
before_install: before_install:
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
@ -72,7 +87,11 @@ before_script:
- qmake --version - qmake --version
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests; if [[ "$RUN_TESTS" == "true" ]]; then
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings;
else
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests;
fi
else else
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests; qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests;
fi fi
@ -80,9 +99,15 @@ script:
- $CXX --version - $CXX --version
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
build-wrapper-linux-x86-64 --out-dir ../bw-outputs make -j$(nproc); if [[ "$RUN_TESTS" == "true" ]]; then
cd ..; make -j$(nproc);
sonar-scanner; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$TRAVIS_BUILD_DIR/build/src/libs/vpropertyexplorer/bin:$TRAVIS_BUILD_DIR/build/src/libs/qmuparser/bin";
xvfb-run -a make --silent check TESTARGS="-silent";
else
build-wrapper-linux-x86-64 --out-dir ../bw-outputs make -j$(nproc);
cd ..;
sonar-scanner;
fi
else else
make -j1; make -j1;
fi fi