From c64758af837c46585cf0871c4b9e24ded39672c2 Mon Sep 17 00:00:00 2001 From: dschlaep Date: Fri, 13 Jul 2018 09:13:07 -0400 Subject: [PATCH] Fix travis yml for `*_severe` targets 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 - https://github.com/google/sanitizers/issues/764 - https://github.com/travis-ci/travis-ci/issues/9033 --- .travis.yml | 11 +++++++++++ makefile | 7 +++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86d05cf28..bb0c37a72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/makefile b/makefile index d69d334b0..577938be4 100644 --- a/makefile +++ b/makefile @@ -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