From b227293f1c1d41841776675e0855c36be1c070a0 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 13 Jan 2016 12:12:33 +0000 Subject: [PATCH] travis-ci: update build matrix Add clang-3.6/x86_64, clang-3.6/x86, and musl-gcc/x86_64 to the matrix. * .travis.yml (compiler): Add gcc, clang-3.6, and musl-gcc. (env): Add matrix, remove global ENABLE_GCC_WERROR. (matrix): Add exclude, remove include. * travis-ci.sh: Add support for clang and musl-gcc. Use --enable-gcc-Werror for gcc build unconditionally. --- .travis.yml | 21 ++++++++++++++++----- travis-ci.sh | 32 +++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1aba3b3..73fe57ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,11 @@ script: ./travis-ci.sh sudo: required +compiler: + - gcc + - clang-3.6 + - musl-gcc + addons: apt: packages: @@ -13,12 +18,18 @@ addons: env: global: - - ENABLE_GCC_WERROR="--enable-gcc-Werror" - SLEEP_A_BIT="sleep 0.1" - VERBOSE="1" + matrix: + - TARGET=x86_64 + - TARGET=x32 + - TARGET=x86 matrix: - include: - - env: TARGET=x86_64 - - env: TARGET=x32 - - env: TARGET=x86 + exclude: + - compiler: clang-3.6 + env: TARGET=x32 + - compiler: musl-gcc + env: TARGET=x32 + - compiler: musl-gcc + env: TARGET=x86 diff --git a/travis-ci.sh b/travis-ci.sh index 652a5d52..2af16492 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -1,9 +1,25 @@ -#!/bin/sh -e +#!/bin/sh -ex + +case "$CC" in + gcc) + ENABLE_GCC_WERROR=--enable-gcc-Werror + ;; + clang-*) + sudo apt-get -qq update + sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \ + "$CC" + # clang -mx32 fails with the following error: + # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) + export st_cv_mx32_runtime=no + ;; + musl-gcc) + sudo add-apt-repository ppa:bortis/musl -y + sudo apt-get -qq update + sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \ + musl-tools linux-musl-dev + ;; +esac -j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j= -set -x -git fetch --unshallow -./git-set-file-times case "${TARGET-}" in x32) CC="$CC -mx32" @@ -14,6 +30,12 @@ case "${TARGET-}" in ;; esac export CC_FOR_BUILD="$CC" + +$CC --version + +git fetch --unshallow +./git-set-file-times ./bootstrap ./configure --enable-maintainer-mode ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-} +j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j= make -k $j distcheck VERBOSE=${VERBOSE-} -- 2.40.0