Skip to content

Commit a029094

Browse files
author
Vlastimil Zeman
committed
Split jobs to two stages in Travis
1. Linter + Doxygen + non-debug Ubuntu/gcc-5 test - linting, documentation and build on standard OS with standard compilator with non-debug flags. This will fail fast in case of trivial error and do not waste Travis resources. 2. Test different OS/CXX/Flags - rest of combinations we support. This stage will start only if first one will pass.
1 parent 1f2bb67 commit a029094

File tree

1 file changed

+50
-43
lines changed

1 file changed

+50
-43
lines changed

.travis.yml

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,47 @@
11
language: cpp
22

3-
matrix:
3+
jobs:
44
include:
55

6+
- &linter-stage
7+
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
8+
env: NAME="CPP-LINT"
9+
install:
10+
script: scripts/travis_lint.sh
11+
before_cache:
12+
13+
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
14+
env: NAME="DOXYGEN-CHECK"
15+
addons:
16+
apt:
17+
packages:
18+
- doxygen
19+
install:
20+
script: scripts/travis_doxygen.sh
21+
before_cache:
22+
23+
# Ubuntu Linux with glibc using g++-5
24+
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
25+
os: linux
26+
sudo: false
27+
compiler: gcc
28+
cache: ccache
29+
addons:
30+
apt:
31+
sources:
32+
- ubuntu-toolchain-r-test
33+
packages:
34+
- libwww-perl
35+
- g++-5
36+
- libubsan0
37+
before_install:
38+
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
39+
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
40+
env: COMPILER="g++-5"
41+
642
# Alpine Linux with musl-libc using g++
7-
- os: linux
43+
- stage: Test different OS/CXX/Flags
44+
os: linux
845
sudo: required
946
compiler: gcc
1047
cache: ccache
@@ -17,7 +54,8 @@ matrix:
1754
- COMPILER="ccache g++"
1855

1956
# OS X using g++
20-
- os: osx
57+
- stage: Test different OS/CXX/Flags
58+
os: osx
2159
sudo: false
2260
compiler: gcc
2361
cache: ccache
@@ -30,7 +68,8 @@ matrix:
3068
env: COMPILER=g++
3169

3270
# OS X using clang++
33-
- os: osx
71+
- stage: Test different OS/CXX/Flags
72+
os: osx
3473
sudo: false
3574
compiler: clang
3675
cache: ccache
@@ -42,26 +81,9 @@ matrix:
4281
- COMPILER="ccache clang++ -Qunused-arguments -fcolor-diagnostics"
4382
- CCACHE_CPP2=yes
4483

45-
# Ubuntu Linux with glibc using g++-5
46-
- os: linux
47-
sudo: false
48-
compiler: gcc
49-
cache: ccache
50-
addons:
51-
apt:
52-
sources:
53-
- ubuntu-toolchain-r-test
54-
packages:
55-
- libwww-perl
56-
- g++-5
57-
- libubsan0
58-
before_install:
59-
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
60-
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
61-
env: COMPILER="g++-5"
62-
6384
# Ubuntu Linux with glibc using g++-5, debug mode
64-
- os: linux
85+
- stage: Test different OS/CXX/Flags
86+
os: linux
6587
sudo: false
6688
compiler: gcc
6789
cache: ccache
@@ -82,7 +104,8 @@ matrix:
82104
script: echo "Not running any tests for a debug build."
83105

84106
# Ubuntu Linux with glibc using clang++-3.7
85-
- os: linux
107+
- stage: Test different OS/CXX/Flags
108+
os: linux
86109
sudo: false
87110
compiler: clang
88111
cache: ccache
@@ -105,7 +128,8 @@ matrix:
105128
- CCACHE_CPP2=yes
106129

107130
# Ubuntu Linux with glibc using clang++-3.7, debug mode
108-
- os: linux
131+
- stage: Test different OS/CXX/Flags
132+
os: linux
109133
sudo: false
110134
compiler: clang
111135
cache: ccache
@@ -129,25 +153,8 @@ matrix:
129153
- EXTRA_CXXFLAGS="-DDEBUG"
130154
script: echo "Not running any tests for a debug build."
131155

132-
- env: NAME="CPP-LINT"
133-
install:
134-
script: scripts/travis_lint.sh
135-
before_cache:
136-
137-
- env: NAME="DOXYGEN-CHECK"
138-
addons:
139-
apt:
140-
packages:
141-
- doxygen
142-
install:
143-
script: scripts/travis_doxygen.sh
144-
before_cache:
145-
146156
allow_failures:
147-
- env: NAME="CPP-LINT"
148-
install:
149-
script: scripts/travis_lint.sh
150-
before_cache:
157+
- <<: *linter-stage
151158

152159
install:
153160
- COMMAND="make -C src minisat2-download" &&

0 commit comments

Comments
 (0)