diff --git a/.travis.yml b/.travis.yml index 341aaa8..5523adc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ +# sudo required as tests set cpu affinity +sudo: false + os: - linux + - linux-ppc64le - osx language: @@ -9,4 +13,28 @@ compiler: - gcc - clang -script: ./tools/ci-build.sh +matrix: + exclude: + - os: osx + compiler: gcc +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-6.0 + packages: + - gcc-8 + - clang-6.0 + +script: + - > + if [[ $TRAVIS_OS_NAME == linux ]]; then + case "$CC" in + gcc) export CC=gcc-8 ;; + clang) export CC=clang-6.0 ;; + esac + fi + - ${CC} --version + - export CFLAGS="-DITERATE=400 -DPAIRS_S=100 -DITERATIONS=24" + - ./tools/ci-build.sh --cores=4 + - make check diff --git a/regressions/common.h b/regressions/common.h index f67c2af..6e53483 100644 --- a/regressions/common.h +++ b/regressions/common.h @@ -285,7 +285,10 @@ aff_iterate(struct affinity *acb) CPU_ZERO(&s); CPU_SET(c % CORES, &s); - return sched_setaffinity(gettid(), sizeof(s), &s); + if (sched_setaffinity(gettid(), sizeof(s), &s) != 0) + perror("WARNING: Could not affine thread"); + + return 0; } CK_CC_UNUSED static int @@ -297,7 +300,10 @@ aff_iterate_core(struct affinity *acb, unsigned int *core) CPU_ZERO(&s); CPU_SET((*core) % CORES, &s); - return sched_setaffinity(gettid(), sizeof(s), &s); + if (sched_setaffinity(gettid(), sizeof(s), &s) != 0) + perror("WARNING: Could not affine thread"); + + return 0; } #elif defined(__MACH__) CK_CC_UNUSED static int diff --git a/tools/ci-build.sh b/tools/ci-build.sh index 6d57655..9657303 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -4,6 +4,6 @@ ############################################################################## set -x -./configure +./configure $@ make -j