From: Ivan Maidanski Date: Tue, 28 Mar 2017 20:09:13 +0000 (+0300) Subject: Travis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable X-Git-Tag: v8.0.0~807 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0138d609f7722d4e2ca0226aa21e0795384b4a2e;p=gc Travis CI: Replace multiple CONF_x with a single CONF_OPTIONS variable (code refactoring) --- diff --git a/.travis.yml b/.travis.yml index 8fc0d1a4..d46d9400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,61 +4,57 @@ matrix: include: - os: linux compiler: clang - env: [ CONF_CPP=--enable-cplusplus ] + env: [ CONF_OPTIONS="--enable-cplusplus" ] - os: linux compiler: gcc - env: [ CONF_CPP=--enable-cplusplus ] + env: [ CONF_OPTIONS="--enable-cplusplus" ] - os: osx - env: [ CONF_CPP=--enable-cplusplus ] + env: [ CONF_OPTIONS="--enable-cplusplus" ] - os: linux addons: { apt: { packages: [ gcc-multilib ] } } compiler: clang - env: [ CFLAGS_EXTRA="-m32", CONF_ASSERTIONS=--enable-gc-assertions ] + env: [ CFLAGS_EXTRA="-m32", CONF_OPTIONS="--enable-gc-assertions" ] - os: linux addons: { apt: { packages: [ gcc-multilib ] } } compiler: gcc - env: [ CFLAGS_EXTRA="-m32", CONF_ASSERTIONS=--enable-gc-assertions ] + env: [ CFLAGS_EXTRA="-m32", CONF_OPTIONS="--enable-gc-assertions" ] - os: osx env: - CFLAGS_EXTRA="-m32" - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus" - os: linux compiler: gcc env: - CFLAGS_EXTRA="-D CHECKSUMS" - - CONF_THREADS=--disable-threads - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--disable-threads --enable-cplusplus" - os: linux compiler: clang env: - CFLAGS_EXTRA="-D DBG_HDRS_ALL -D SHORT_DBG_HDRS" - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus" - os: osx env: - CFLAGS_EXTRA="-D DBG_HDRS_ALL -D SHORT_DBG_HDRS -D LINT2" - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus" - os: linux compiler: gcc env: - CFLAGS_EXTRA="-D DEBUG_ADD_DEL_ROOTS -D DEBUG_DIRTY_BITS -D DEBUG_THREADS -D GC_LOG_TO_FILE_ALWAYS" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: linux compiler: gcc env: - CFLAGS_EXTRA="-D ENABLE_TRACE -D EMPTY_GETENV_RESULTS -D GC_ALWAYS_MULTITHREADED -D CPPCHECK" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: linux compiler: clang env: - CFLAGS_EXTRA="-D GC_BUILTIN_ATOMIC -march=native -D _FORTIFY_SOURCE=2" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: osx env: - CFLAGS_EXTRA="-D GC_BUILTIN_ATOMIC -march=native -D _FORTIFY_SOURCE=2" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: linux addons: { apt: { packages: [ gcc-multilib ] } } compiler: gcc @@ -67,94 +63,71 @@ matrix: compiler: gcc env: - CFLAGS_EXTRA="-D POINTER_MASK=~0xf" - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-gc-assertions --enable-cplusplus" - os: linux compiler: gcc env: - CFLAGS_EXTRA="-D PROC_VDB -D GC_NO_SYS_FAULT_H -D NO_INCREMENTAL" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: linux compiler: gcc env: - CFLAGS_EXTRA="-D SMALL_CONFIG -D NO_GETENV" - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-cplusplus" - os: linux addons: { apt: { packages: [ lcov ] } } compiler: gcc env: - - CONF_GCOV=--enable-gcov - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus - - CONF_M_UNMAP=--enable-munmap - - CONF_SHARED=--disable-shared - - CONF_SINGLE_OBJ=--enable-single-obj-compilation + - CONF_OPTIONS="--enable-gcov --enable-munmap --enable-single-obj-compilation --enable-cplusplus --disable-shared --enable-gc-assertions" + - REPORT_COVERAGE=true - os: linux compiler: gcc - env: [ CONF_GC_DEBUG=--enable-gc-debug, CONF_CPP=--enable-cplusplus ] + env: [ CONF_OPTIONS="--enable-gc-debug --enable-cplusplus" ] - os: linux compiler: gcc - env: [ CONF_GC_DEBUG=--disable-gc-debug, CONF_CPP=--enable-cplusplus ] + env: [ CONF_OPTIONS="--disable-gc-debug --enable-cplusplus" ] - os: linux compiler: clang - env: - - CONF_LARGE_CONFIG=--enable-large-config - - CONF_CPP=--enable-cplusplus + env: [ CONF_OPTIONS="--enable-large-config --enable-cplusplus" ] - os: osx - env: - - CONF_LARGE_CONFIG=--enable-large-config - - CONF_CPP=--enable-cplusplus + env: [ CONF_OPTIONS="--enable-large-config --enable-cplusplus" ] - os: linux addons: { apt: { packages: [ gcc-multilib ] } } compiler: gcc - env: [ CONF_LARGE_CONFIG=--enable-large-config, CFLAGS_EXTRA="-m32" ] + env: [ CONF_OPTIONS="--enable-large-config", CFLAGS_EXTRA="-m32" ] - os: linux compiler: gcc env: - - CONF_LARGE_CONFIG=--enable-large-config - - CONF_CPP=--enable-cplusplus - - CONF_M_UNMAP=--enable-munmap + - CONF_OPTIONS="--enable-large-config --enable-munmap --enable-cplusplus" - CFLAGS_EXTRA="-D LINT2" - os: linux addons: { apt: { packages: [ gcc-multilib ] } } compiler: clang env: - - CONF_REDIRECT=--enable-redirect-malloc + - CONF_OPTIONS="--enable-redirect-malloc --disable-threads" - CFLAGS_EXTRA="-m32" - - CONF_THREADS=--disable-threads - os: osx env: - - CONF_REDIRECT=--enable-redirect-malloc + - CONF_OPTIONS="--enable-redirect-malloc --enable-cplusplus --disable-threads" - CFLAGS_EXTRA="-m32" - - CONF_CPP=--enable-cplusplus - - CONF_THREADS=--disable-threads - os: linux compiler: gcc env: - - CONF_REDIRECT=--enable-redirect-malloc - - CONF_GC_DEBUG=--enable-gc-debug - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-redirect-malloc --enable-gc-debug --enable-cplusplus --enable-gc-assertions" - os: linux compiler: clang env: - - CONF_STATIC=--disable-static - - CONF_THREADS=--disable-threads + - CONF_OPTIONS="--disable-static --disable-threads --enable-cplusplus" - CFLAGS_EXTRA="-O3 -march=native" - - CONF_CPP=--enable-cplusplus - os: linux compiler: gcc env: - - CONF_STATIC=--disable-static - - CONF_THREADS=--disable-threads + - CONF_OPTIONS="--disable-static --disable-threads --enable-cplusplus" - CFLAGS_EXTRA="-O3 -march=native" - - CONF_CPP=--enable-cplusplus - os: osx env: - - CONF_STATIC=--disable-static - - CONF_THREADS=--disable-threads + - CONF_OPTIONS="--disable-static --disable-threads --enable-cplusplus" - CFLAGS_EXTRA="-O3 -march=native" - - CONF_CPP=--enable-cplusplus - os: osx env: [ CSA_CHECK=true, CFLAGS_EXTRA="-m32" ] - os: linux @@ -195,16 +168,13 @@ matrix: compiler: musl-gcc dist: trusty env: - - CONF_PARALLEL_MARK=--enable-parallel-mark - - CONF_ASSERTIONS=--enable-gc-assertions - - CONF_CPP=--enable-cplusplus + - CONF_OPTIONS="--enable-parallel-mark --enable-gc-assertions --enable-cplusplus" - os: linux compiler: clang env: - CFLAGS_EXTRA="-fsanitize=undefined -fno-common -fno-omit-frame-pointer" - MSAN_OR_UBSAN=true - - CONF_CPP=--enable-cplusplus - - CONF_M_UNMAP=--enable-munmap + - CONF_OPTIONS="--enable-cplusplus --enable-munmap" # TODO: Add testing with ASan/MSan when clang-3.8 available. before_install: @@ -220,17 +190,14 @@ before_install: install: - git clone --depth=50 https://github.com/ivmai/libatomic_ops.git - ./autogen.sh - - if [[ "$CONF_GCOV" == --en* ]]; then + - if [[ "$REPORT_COVERAGE" == true ]]; then gem install coveralls-lcov; fi script: - if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" && "$MAKEFILE_NAME" != "Makefile.direct" ]]; then - ./configure $CONF_ASSERTIONS $CONF_CPP $CONF_GCOV $CONF_GC_DEBUG - $CONF_LARGE_CONFIG $CONF_M_UNMAP $CONF_PARALLEL_MARK - $CONF_REDIRECT $CONF_SHARED $CONF_SINGLE_OBJ $CONF_STATIC - $CONF_THREADS --enable-werror && + ./configure $CONF_OPTIONS --enable-werror && cat include/config.h; fi - if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" ]]; then @@ -255,7 +222,7 @@ script: fi after_success: - - if [[ "$CONF_GCOV" == --en* ]]; then + - if [[ "$REPORT_COVERAGE" == true ]]; then lcov --capture --base-directory . --directory . --output-file coverage.info; lcov --remove coverage.info '/usr/*' 'cord/tests/*' 'libatomic_ops/*' 'tests/*' --output-file coverage.info; lcov --list coverage.info;