Skip to content

Commit

Permalink
Fix travis yml for *_severe targets
Browse files Browse the repository at this point in the history
We want to run the `*_severe` debug and test targets; thus, we need to enable ptrace capability for (L/A)SAN which is currently not possible
with container-based builds on travis-ci

TODO: revert to `sudo: false` (i.e., container-based builds) once the following are fixed/made possible
 - google/sanitizers#764
 - travis-ci/travis-ci#9033
  • Loading branch information
dschlaep committed Jul 13, 2018
1 parent d283620 commit c64758a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
language: cpp

# We want to run the `*_severe` debug and test targets; thus, we need
# to enable ptrace capability for (L/A)SAN which is currently not possible
# with container-based builds on travis-ci
# TODO: revert to `sudo: false` once the following are fixed/made possible
# - https://github.com/google/sanitizers/issues/764
# - https://github.com/travis-ci/travis-ci/issues/9033
sudo: required

matrix:
fast_finish: true

# We want to run the `*_severe` debug and test targets; thus, we need
# g++ >= 4.9 and clang++ >= 3.5
compiler:
Expand Down
7 changes: 3 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ warning_flags = -Wall -Wextra
# Don't use 'warning_flags_severe*' for production builds and rSOILWAT2
warning_flags_severe = $(warning_flags) -Wpedantic -Werror
warnings_flags_severe_cxx = $(warning_flags_severe) -Wno-error
# TODO: address underlying problems so that we can eventually add -Werror:
# - clang++: "treating 'c' input as 'c++' when in C++ mode"
# - ISO C++ forbids variable length array: (clang++ uses -Wvla-extension
# whereas g++ uses -Wvla) --> cannot compile c++ unit tests with -Werror
# TODO: address underlying problems so that we can eliminate `-Wno-error`:
# - compiler warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated (https://github.com/DrylandEcology/SOILWAT2/issues/208)
# - compiler warning: variable length arrays (https://github.com/DrylandEcology/SOILWAT2/issues/214)

# Instrumentation options for debugging and testing
instr_flags = -fstack-protector-all
Expand Down

0 comments on commit c64758a

Please sign in to comment.