diff --git a/.travis.yml b/.travis.yml index 74614503c2..8c4546bfb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,89 +1,121 @@ # Control file for the Travis autobuilder # https://docs.travis-ci.com/user/customizing-the-build/ language: c -compiler: - - gcc - - clang -# - cov-build + +matrix: + include: + - compiler: gcc + env: MAINT_EXTRA=0 + - compiler: clang + env: MAINT_EXTRA=0 + #- compiler: cov-build + # env: MAINT_EXTRA=0 + - compiler: gcc + env: MAINT_EXTRA=1 env: global: # -- BEGIN Coverity Scan ENV # Used by https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh # The build command with all of the arguments that you would apply to a manual `cov-build` - COVERITY_SCAN_BUILD_COMMAND="make" # Email address for notifications related to this build - OWNER_EMAIL="andrew@beekhof.net" # Regular expression selects on which branches to run analysis # Be aware of quotas. Do not run on every branch/commit - COVERITY_SCAN_BRANCH_PATTERN="1.1" # COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key - secure: "qnrF7L8RejLUY7URdNe7XP4Hu4R55C0tvAuMRg4EjVtelOpw+nIgA7BLiX19q/70VjFuKcGnMhW28TdYl0uwMMdWKKxmwTim04Sy3UfOE2BPeuQOBphr+8s9gd0U1MO8j2dZ84A40t5Mkk946wWZwT0okpjOr/PfBOZkU3o87FM=" # -- END Coverity Scan ENV # sudo add-apt-repository ppa:hotot-team before_install: - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main" - sudo apt-get update -qq # To switch to Travis-CI's containerized (non-sudo) architecture, # all our dependencies need to be on Travis's whitelist: # https://github.com/travis-ci/apt-package-whitelist # # The only ones that aren't already are: # - cluster-glue-dev: see open issue: # https://github.com/travis-ci/apt-package-whitelist/issues/2936 # - resource-agents: see open issue: # https://github.com/travis-ci/apt-package-whitelist/issues/4261 # - libdbus-1-dev: see multiple open issues: # https://github.com/travis-ci/apt-package-whitelist/issues?utf8=%E2%9C%93&q=is%3Aissue+libdbus+-1-dev # (a workaround is to install libdbus-glib-1-dev, which depends on it and is whitelisted) install: - - sudo apt-get install -qq automake autoconf chrpath libtool perl python python-dev - - sudo apt-get install -qq libbz2-dev libdbus-1-dev libglib2.0-dev libgnutls-dev libltdl-dev - - sudo apt-get install -qq libncurses5-dev libpam0g-dev libxml2-dev libxslt1-dev uuid-dev - - sudo apt-get install -qq libqb-dev libcfg-dev libcmap-dev libcorosync-common-dev libcpg-dev - - sudo apt-get install -qq libquorum-dev libsam-dev libtotem-pg-dev libvotequorum-dev - - sudo apt-get install -qq cluster-glue-dev resource-agents + - test $MAINT_EXTRA -ne 0 + || sudo apt-get install -qq + automake autoconf libtool + python python-dev + libbz2-dev libdbus-1-dev libglib2.0-dev libgnutls-dev libltdl-dev + libncurses5-dev libpam0g-dev libxml2-dev libxslt1-dev uuid-dev + libqb-dev libcfg-dev libcmap-dev libcorosync-common-dev libcpg-dev + libquorum-dev libsam-dev libtotem-pg-dev libvotequorum-dev + cluster-glue-dev resource-agents + - test $MAINT_EXTRA -eq 0 + || sudo apt-get install -qq + make libxml2-utils xsltproc before_script: # Save and restore CC so that ./configure can pass - - export CC_SAVED=$CC - - export CC=`echo ${CC} | sed s/cov-build/gcc/` - - ./autogen.sh - - ./configure - - export CC=$CC_SAVED + - test $MAINT_EXTRA -ne 0 || { + export CC_SAVED=$CC; + export CC=$(echo ${CC} | sed s/cov-build/gcc/); + ./autogen.sh; + ./configure; + export CC=$CC_SAVED; + } + - test $MAINT_EXTRA -eq 0 || ( + cd xml; + { cat Makefile.am; printf 'hack_rng\x3a %s' '${RNG_generated}'; } + | make -f- top_srcdir=$(pwd)/.. top_builddir=$(pwd)/.. hack_rng + ) script: -- if test ${CC} != cov-build; then sudo make install-exec-local || true; fi -- if test ${CC} != cov-build; then make && ./cts/cts-regression -V cli scheduler exec; fi -- if test ${CC} = cov-build; then export CC=gcc; bash ./travisci_build_coverity_scan.sh; fi +# XXX Is the following item needed? +- test $MAINT_EXTRA -ne 0 || test ${CC} = cov-build + || sudo make install-exec-local || true +- test $MAINT_EXTRA -ne 0 || test ${CC} = cov-build + || { make && ./cts/cts-regression -V cli scheduler exec; } +- test $MAINT_EXTRA -ne 0 || test ${CC} != cov-build + || export CC=gcc; bash ./travisci_build_coverity_scan.sh +- test $MAINT_EXTRA -eq 0 || ( cd xml; + ./regression.sh && ./regression.sh -B && ./regression.sh -S && { + schemas=; for schema in *.rng; do + case ${schema} in *cibtr*) ;; *) schemas="${schemas} ${schema}";; esac; + done; + xmllint --noout --relaxng 'http://relaxng.org/relaxng.rng' ${schemas}; + } + ) #after_script: #after_success: after_failure: - lsb_release -a - sudo cat /etc/apt/sources.list - whoami - env | sort - cat include/config.h notifications: irc: "irc.freenode.org#pcmk" # email: # recipients: # - developers@clusterlabs.org # whitelist branches: only: - master - "1.1" - "2.0"