From c95625f9942266028e45705440bff18d6f336b1c Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 25 Apr 2020 23:24:05 +0200 Subject: [PATCH] Reorganize some Travis builds. Travis defaults to xenial these days, so some builds were redundant. Add gcc9, clang9 and clang10 builds. Switch the sanitize build to clang10. Add a PPC build. --- .travis.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca7dd25..373288b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,14 +43,6 @@ matrix: os: linux dist: bionic compiler: clang - - env: CONFIG=normal DIST=xenial - os: linux - dist: xenial - compiler: gcc - - env: CONFIG=normal DIST=xenial - os: linux - dist: xenial - compiler: clang - env: CONFIG=clang6 DIST=xenial os: linux dist: xenial @@ -60,8 +52,9 @@ matrix: packages: - autopoint - clang-6.0 - - env: CONFIG=clang8 + - env: CONFIG=clang8 DIST=xenial os: linux + dist: xenial compiler: clang addons: apt: @@ -71,8 +64,37 @@ matrix: packages: - autopoint - clang-8 - - env: CONFIG=gcc8 + - env: CONFIG=clang9 DIST=xenial + os: linux + dist: xenial + compiler: clang + addons: + apt: + sources: + sourceline: + - deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main + key_url: + - https://apt.llvm.org/llvm-snapshot.gpg.key + packages: + - autopoint + - clang-9 + - env: CONFIG=clang10 DIST=xenial + os: linux + dist: xenial + compiler: clang + addons: + apt: + sources: + sourceline: + - deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main + key_url: + - https://apt.llvm.org/llvm-snapshot.gpg.key + packages: + - autopoint + - clang-10 + - env: CONFIG=gcc8 DIST=xenial os: linux + dist: xenial compiler: gcc addons: apt: @@ -81,8 +103,20 @@ matrix: packages: - autopoint - g++-8 - - env: CONFIG=arm-cross + - env: CONFIG=gcc9 DIST=xenial os: linux + dist: xenial + compiler: gcc + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - autopoint + - g++-9 + - env: CONFIG=arm-cross DIST=xenial + os: linux + dist: xenial compiler: gcc addons: apt: @@ -99,17 +133,20 @@ matrix: packages: - autopoint - musl-tools - - env: CONFIG=sanitize + - env: CONFIG=sanitize DIST=xenial os: linux + dist: xenial compiler: clang addons: apt: sources: - - llvm-toolchain-trusty-8 - - ubuntu-toolchain-r-test + sourceline: + - deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main + key_url: + - https://apt.llvm.org/llvm-snapshot.gpg.key packages: - autopoint - - clang-8 + - clang-10 - libtool # Required for -fsanitize=undefined # see https://github.com/travis-ci/travis-ci/issues/9033 @@ -132,6 +169,11 @@ matrix: os: linux dist: bionic compiler: gcc + - env: CONFIG=normal DIST=bionic + arch: ppc64le + os: linux + dist: bionic + compiler: gcc before_install: # The apt addons section is ignored on bionic for some reason @@ -176,10 +218,13 @@ script: - if [ "$CONFIG" = "disable-nls" ] ; then CFLAGS='-Wall -Wextra -O3'; CONFIGURE_OPTS='--disable-nls'; fi - if [ "$CONFIG" = "clang6" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=clang-6.0; fi - if [ "$CONFIG" = "clang8" ] ; then CFLAGS='-Wall -Wextra -Wno-error=switch -O3'; MAKE_OPTS="CFLAGS+=-Werror CFLAGS+=${CFLAGS// / CFLAGS+=}"; export CC=clang-8; fi + - if [ "$CONFIG" = "clang9" ] ; then CFLAGS='-Wall -Wextra -Wno-error=switch -O3'; MAKE_OPTS="CFLAGS+=-Werror CFLAGS+=${CFLAGS// / CFLAGS+=}"; export CC=clang-9; fi + - if [ "$CONFIG" = "clang10" ] ; then CFLAGS='-Wall -Wextra -Wno-error=switch -O3'; MAKE_OPTS="CFLAGS+=-Werror CFLAGS+=${CFLAGS// / CFLAGS+=}"; export CC=clang-10; fi - if [ "$CONFIG" = "gcc8" ] ; then CFLAGS='-Wall -Wextra -Wno-error=switch -Wno-error=implicit-fallthrough -O3'; MAKE_OPTS="CFLAGS+=-Werror CFLAGS+=${CFLAGS// / CFLAGS+=}"; export CC=gcc-8; fi + - if [ "$CONFIG" = "gcc9" ] ; then CFLAGS='-Wall -Wextra -Wno-error=switch -Wno-error=implicit-fallthrough -O3'; MAKE_OPTS="CFLAGS+=-Werror CFLAGS+=${CFLAGS// / CFLAGS+=}"; export CC=gcc-9; fi - if [ "$CONFIG" = "arm-cross" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=arm-linux-gnueabihf-gcc-4.8; CONFIGURE_OPTS='--host=arm-linux-gnueabihf'; fi - if [ "$CONFIG" = "musl" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=musl-gcc; CONFIGURE_OPTS='--disable-shared'; fi - - if [ "$CONFIG" = "sanitize" ] ; then CFLAGS='-g -Wall -Wextra -fsanitize=address -fsanitize=undefined -fsanitize-address-use-after-scope'; export CC=clang-8; export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=1; fi + - if [ "$CONFIG" = "sanitize" ] ; then CFLAGS='-g -Wall -Wextra -fsanitize=address -fsanitize=undefined -fsanitize-address-use-after-scope'; export CC=clang-10; export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=1; fi - if [ "$CONFIG" = "coverage" ] ; then cd "$HOME"/libexif-testsuite; CFLAGS=--coverage; CONFIGURE_OPTS="LDFLAGS=--coverage --with-failmalloc=$HOME/failmalloc/lib"; fi - ./configure --prefix="$HOME"/install --disable-dependency-tracking CFLAGS="$CFLAGS" $CONFIGURE_OPTS || { tail -n 300 config.log; false; } -- 2.7.4