Skip to content

[tgs->master] continuous integration fixes and workarounds #1264

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

Merged
merged 8 commits into from
Aug 22, 2017
Merged
Show file tree
Hide file tree
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
104 changes: 55 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,61 @@
language: cpp

matrix:
jobs:
include:

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

- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
env: NAME="DOXYGEN-CHECK"
addons:
apt:
packages:
- doxygen
install:
script: scripts/travis_doxygen.sh
before_cache:

# Ubuntu Linux with glibc using g++-5
- stage: Linter + Doxygen + non-debug Ubuntu/gcc-5 test
os: linux
sudo: false
compiler: gcc
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libwww-perl
- g++-5
- libubsan0
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: COMPILER="ccache g++-5"

# Alpine Linux with musl-libc using g++
- os: linux
- stage: Test different OS/CXX/Flags
os: linux
sudo: required
compiler: gcc
cache: ccache
services:
- docker
before_install:
- docker pull diffblue/cbmc-builder:alpine-0.0.1
- docker pull diffblue/cbmc-builder:alpine-0.0.3
env:
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.1"
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.3"
- COMPILER="ccache g++"

# OS X using g++
- os: osx
- stage: Test different OS/CXX/Flags
os: osx
sudo: false
compiler: gcc
cache: ccache
Expand All @@ -26,42 +64,24 @@ matrix:
- mkdir bin ; ln -s /usr/bin/gcc bin/gcc
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
- export PATH=/usr/local/opt/ccache/libexec:$PATH
- ccache -M 1G
env: COMPILER=g++
env: COMPILER="ccache g++"

# OS X using clang++
- os: osx
- stage: Test different OS/CXX/Flags
os: osx
sudo: false
compiler: clang
cache: ccache
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
- export PATH=/usr/local/opt/ccache/libexec:$PATH
- ccache -M 1G
env:
- COMPILER="ccache clang++ -Qunused-arguments -fcolor-diagnostics"
- CCACHE_CPP2=yes

# Ubuntu Linux with glibc using g++-5
- os: linux
sudo: false
compiler: gcc
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libwww-perl
- g++-5
- libubsan0
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: COMPILER="g++-5"

# Ubuntu Linux with glibc using g++-5, debug mode
- os: linux
- stage: Test different OS/CXX/Flags
os: linux
sudo: false
compiler: gcc
cache: ccache
Expand All @@ -77,12 +97,13 @@ matrix:
- 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:
- COMPILER="g++-5"
- COMPILER="ccache g++-5"
- EXTRA_CXXFLAGS="-DDEBUG"
script: echo "Not running any tests for a debug build."

# Ubuntu Linux with glibc using clang++-3.7
- os: linux
- stage: Test different OS/CXX/Flags
os: linux
sudo: false
compiler: clang
cache: ccache
Expand All @@ -105,7 +126,8 @@ matrix:
- CCACHE_CPP2=yes

# Ubuntu Linux with glibc using clang++-3.7, debug mode
- os: linux
- stage: Test different OS/CXX/Flags
os: linux
sudo: false
compiler: clang
cache: ccache
Expand All @@ -129,27 +151,11 @@ matrix:
- EXTRA_CXXFLAGS="-DDEBUG"
script: echo "Not running any tests for a debug build."

- env: NAME="CPP-LINT"
install:
script: scripts/travis_lint.sh
before_cache:

- env: NAME="DOXYGEN-CHECK"
addons:
apt:
packages:
- doxygen
install:
script: scripts/travis_doxygen.sh
before_cache:

allow_failures:
- env: NAME="CPP-LINT"
install:
script: scripts/travis_lint.sh
before_cache:
- <<: *linter-stage

install:
- ccache --max-size=1G
- COMMAND="make -C src minisat2-download" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C src CXX=\"$COMPILER\" CXXFLAGS=\"-Wall -Werror -pedantic -O2 -g $EXTRA_CXXFLAGS\" -j2" &&
Expand Down
5 changes: 4 additions & 1 deletion scripts/run_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ then
doxygen=doxygen
doxygenlogdir="doc/html"
doxygenlog="$doxygenlogdir/doxygen.log"
suppress_warnings=(
"warning: Included by graph for .* not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.")
if ! $doxygen --version &>/dev/null
then
echo "Lint script could not be found in the $script_folder directory"
echo "Ensure cpplint.py is inside the $script_folder directory then run again"
exit 1
else
mkdir -p $doxygenlogdir && cd src && $doxygen &> ../$doxygenlog && cd ..
cmd='cat $doxygenlog'
suppress_warnings_regex=$(IFS="|" ; echo "${suppress_warnings[*]}")
cmd='grep -Ev "$suppress_warnings_regex" $doxygenlog'
fi
else
echo "Mode $mode not recognized"
Expand Down
6 changes: 5 additions & 1 deletion scripts/travis_doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ pip install --user unidiff
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
$script_folder/run_diff.sh DOXYGEN HEAD~1 # Check for errors introduced in last commit
else
$script_folder/run_diff.sh DOXYGEN $TRAVIS_BRANCH # Check for errors compared to merge target
TMP_HEAD=$(git rev-parse HEAD)
git config remote.origin.fetch +refs/heads/$TRAVIS_BRANCH:refs/remotes/origin/$TRAVIS_BRANCH
git fetch --unshallow
git checkout $TMP_HEAD
$script_folder/run_diff.sh DOXYGEN origin/$TRAVIS_BRANCH # Check for errors compared to merge target
fi
6 changes: 5 additions & 1 deletion scripts/travis_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ pip install --user unidiff
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
$script_folder/run_diff.sh CPPLINT HEAD~1 # Check for errors introduced in last commit
else
$script_folder/run_diff.sh CPPLINT $TRAVIS_BRANCH # Check for errors compared to merge target
TMP_HEAD=$(git rev-parse HEAD)
git config remote.origin.fetch +refs/heads/$TRAVIS_BRANCH:refs/remotes/origin/$TRAVIS_BRANCH
git fetch --unshallow
git checkout $TMP_HEAD
$script_folder/run_diff.sh CPPLINT origin/$TRAVIS_BRANCH # Check for errors compared to merge target
fi