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:
parent
0446a0653c
commit
8224c437d7
29
.travis.yml
29
.travis.yml
|
@ -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
|
||||||
|
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;
|
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
|
||||||
|
if [[ "$RUN_TESTS" == "true" ]]; then
|
||||||
|
make -j$(nproc);
|
||||||
|
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);
|
build-wrapper-linux-x86-64 --out-dir ../bw-outputs make -j$(nproc);
|
||||||
cd ..;
|
cd ..;
|
||||||
sonar-scanner;
|
sonar-scanner;
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
make -j1;
|
make -j1;
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user