Skip to content

Increase parallelism in Travis builds #2047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 124 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
include:

- &formatting-stage
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
stage: Linter + Doxygen + non-debug builds
env: NAME="clang-format"
addons:
apt:
Expand Down Expand Up @@ -32,20 +32,20 @@ jobs:
before_cache:

- &linter-stage
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
stage: Linter + Doxygen + non-debug builds
env: NAME="CPP-LINT"
install:
script: scripts/travis_lint.sh
before_cache:

- &string-table-check
stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
stage: Linter + Doxygen + non-debug builds
env: NAME="string-table"
install:
script: scripts/string_table_check.sh
before_cache:

- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
- stage: Linter + Doxygen + non-debug builds
env:
NAME: "DOXYGEN-CHECK"
DOXYGEN_VERSION: "1.8.14"
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- scripts/publish_doc.sh

# Ubuntu Linux with glibc using g++-5
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
- stage: Linter + Doxygen + non-debug builds
os: linux
sudo: false
compiler: gcc
Expand All @@ -100,14 +100,104 @@ jobs:
- libwww-perl
- g++-5
- libubsan0
- parallel
- libc6-dev-i386
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env:
- COMPILER="ccache /usr/bin/g++-5"
- EXTRA_CXXFLAGS="-D_GLIBCXX_DEBUG"
script: echo "Tests are run in the next stage."

# cmake build using g++-5
- stage: Linter + Doxygen + non-debug builds
os: linux
compiler: gcc
cache: ccache
env:
- BUILD_SYSTEM=cmake
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
install:
- ccache -z
- ccache --max-size=1G
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-5'
- cmake --build build -- -j4
script: echo "Tests are run in the next stage."

# OS X using clang++
- stage: Linter + Doxygen + non-debug builds
os: osx
sudo: false
compiler: clang
cache: ccache
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache parallel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to install parallel here, as that's only used for tests.

- export PATH=$PATH:/usr/local/opt/ccache/libexec
env: COMPILER="ccache clang++"
script: echo "Tests are run in the next stage."

# Ubuntu Linux with glibc using clang++-3.7, no-debug mode
- stage: Linter + Doxygen + non-debug builds
os: linux
sudo: false
compiler: clang
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- libwww-perl
- clang-3.7
- libstdc++-5-dev
- libubsan0
before_install:
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
env:
- COMPILER="ccache /usr/bin/clang++-3.7"
- EXTRA_CXXFLAGS="-Qunused-arguments -fcolor-diagnostics -DNDEBUG"
- CCACHE_CPP2=yes
script: echo "Tests are run in the next stage."

# Ubuntu Linux with glibc using g++-5
- stage: Linter + Doxygen + non-debug builds
os: linux
sudo: false
compiler: gcc
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libwww-perl
- g++-5
- libubsan0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is libubsan0 actually needed for this build, is it a hangover from when we used to have sanitizer builds? (ditto for elsewhere in this file as well)

# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env:
- COMPILER="ccache /usr/bin/g++-5"
- EXTRA_CXXFLAGS="-D_GLIBCXX_DEBUG"
script: echo "Tests are run in the next stage."

- stage: Linter + Doxygen + non-debug builds
os: osx
compiler: clang
cache: ccache
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
- export PATH=$PATH:/usr/local/opt/ccache/libexec
env:
- BUILD_SYSTEM=cmake
- CCACHE_CPP2=yes
install:
- ccache -z
- ccache --max-size=1G
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_OSX_ARCHITECTURES=x86_64'
- cmake --build build -- -j4
script: echo "Tests are run in the next stage."

# OS X using clang++
- stage: Test different OS/CXX/Flags
Expand All @@ -134,11 +224,9 @@ jobs:
- libwww-perl
- g++-5
- libubsan0
- libc6-dev-i386
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env:
- NAME="DEBUG"
- COMPILER="ccache /usr/bin/g++-5"
- EXTRA_CXXFLAGS="-DDEBUG"
script: echo "Not running any tests for a debug build."
Expand All @@ -163,14 +251,13 @@ jobs:
- libc6-dev-i386
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
- export CCACHE_CPP2=yes
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
env:
- COMPILER="ccache /usr/bin/clang++-3.7"
- EXTRA_CXXFLAGS="-Qunused-arguments -fcolor-diagnostics -DNDEBUG"
- CCACHE_CPP2=yes

# Ubuntu Linux with glibc using clang++-3.7, debug mode, disable USE_DSTRING
# Ubuntu Linux with glibc using clang++-3.7, debug mode
- stage: Test different OS/CXX/Flags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these 'build only' tests (i.e. the debug builds) be either moved into the first stage (i.e. builds), or positioned into a third 'debug builds' stage? I don't have a strong opinion, but thought it was worth us making an explicit decision.

os: linux
sudo: false
Expand All @@ -186,14 +273,12 @@ jobs:
- clang-3.7
- libstdc++-5-dev
- libubsan0
- libc6-dev-i386
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
- export CCACHE_CPP2=yes
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
env:
- NAME="DEBUG"
- COMPILER="ccache /usr/bin/clang++-3.7"
- EXTRA_CXXFLAGS="-Qunused-arguments -fcolor-diagnostics -DDEBUG -DUSE_STD_STRING"
- EXTRA_CXXFLAGS="-Qunused-arguments -fcolor-diagnostics -DDEBUG"
- CCACHE_CPP2=yes
script: echo "Not running any tests for a debug build."

Expand Down Expand Up @@ -237,6 +322,28 @@ jobs:
- cmake --build build -- -j4
script: (cd build; ctest -V -L CORE -j2)

# Ubuntu Linux with glibc using g++-5, disable USE_DSTRING
- stage: Test different OS/CXX/Flags
os: linux
sudo: false
compiler: gcc
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libwww-perl
- g++-5
- libubsan0
- parallel
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env:
- NAME="USE_STD_STRING"
- COMPILER="ccache /usr/bin/g++-5"
- EXTRA_CXXFLAGS="-D_GLIBCXX_DEBUG -DUSE_STD_STRING"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the USE_STD_STRING builds were not running tests, with this patch hunk they will now be running tests (which appear to fail) - is this an intentional change? If so, we need the tests and/or USE_STD_STRING fixed before merging. :-)


# Run Coverity
- stage: Test different OS/CXX/Flags
Expand Down