Blame .travis.yml

Packit 12c978
# Travis-CI Build for rabbitmq-c
Packit 12c978
# see travis-ci.org for details
Packit 12c978
Packit 12c978
language: c
Packit 12c978
Packit 12c978
dist: trusty
Packit 12c978
# Currently libpopt-dev is not on the list of whitelisted apt-packages.
Packit 12c978
sudo: true
Packit 12c978
Packit 12c978
env:
Packit 12c978
  global:
Packit 12c978
   # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
Packit 12c978
   #   via the "travis encrypt" command using the project repo's public key
Packit 12c978
   - secure: "gDwqo3jHj+HHGzFKnxL/nwZhbVeh2pItw0TbeaHcLtWubUZaf85ViEQRaXPyfnbG7l0OEQq+PjyhKAfvViVq2NP0lGeeu4VM5uMZJhsCLN594BJr39Y4XzOapg0O8mEMhQ0DU2u1Zo4LMgEcRz67aosVQOj6QV30tOzp9fnxn9U="
Packit 12c978
Packit 12c978
services:
Packit 12c978
  - rabbitmq
Packit 12c978
Packit 12c978
matrix:
Packit 12c978
  include:
Packit 12c978
    # Note that the first compiler in the matrix must be gcc, so that the
Packit 12c978
    # coverity_scan branch hack below works correctly.
Packit 12c978
    - compiler: gcc
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=cmake
Packit 12c978
    - compiler: gcc
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=format
Packit 12c978
    - compiler: gcc
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=coverage
Packit 12c978
    - compiler: clang
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=cmake
Packit 12c978
    - compiler: clang
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=asan
Packit 12c978
    - compiler: clang
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=tsan
Packit 12c978
    - compiler: clang
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=scan-build
Packit 12c978
    - compiler: clang
Packit 12c978
      os: osx
Packit 12c978
      env: CONFIG=cmake
Packit 12c978
    - compiler: gcc
Packit 12c978
      os: linux
Packit 12c978
      env: NAME="openssl-1.1.0" CONFIG=cmake
Packit 12c978
      addons:
Packit 12c978
        apt:
Packit 12c978
          sources:
Packit 12c978
          - sourceline: 'ppa:ondrej/nginx-mainline'
Packit 12c978
          packages:
Packit 12c978
          - libssl1.1
Packit 12c978
          - openssl
Packit 12c978
          - libssl-dev
Packit 12c978
Packit 12c978
  allow_failures:
Packit 12c978
    - compiler: clang
Packit 12c978
      os: linux
Packit 12c978
      env: CONFIG=tsan
Packit 12c978
Packit 12c978
before_install:
Packit 12c978
  - |
Packit 12c978
    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
Packit 12c978
      wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
Packit 12c978
      sudo apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main"
Packit 12c978
      sudo apt-get -q update;
Packit 12c978
      sudo apt-get install -y clang-3.9 clang-format-3.9 libpopt-dev;
Packit 12c978
    fi
Packit 12c978
  # ugly hack; if running a coverity scan abort all except the 1st build
Packit 12c978
  # see note re gcc compiler above needing to be 1st
Packit 12c978
  # also note that branch_pattern & the TRAVIS_BRANCH check must match
Packit 12c978
  # unfortunately COVERITY_SCAN_BRANCH isn't defined until later in the
Packit 12c978
  # build process
Packit 12c978
  - if ([[ "${TRAVIS_JOB_NUMBER##*.}" != "1" ]] && [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]]); then false ; fi
Packit 12c978
Packit 12c978
Packit 12c978
script:
Packit 12c978
  # Don't bother building if this is being done in the coverity_scan branch.
Packit 12c978
  - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./travis.sh $CONFIG ; fi
Packit 12c978
Packit 12c978
addons:
Packit 12c978
  coverity_scan:
Packit 12c978
    project:
Packit 12c978
      name: "alanxz/rabbitmq-c"
Packit 12c978
      description: "C AMQP client for RabbitMQ"
Packit 12c978
    notification_email: alan.antonuk@gmail.com
Packit 12c978
    build_command_prepend: mkdir build && pushd build && cmake .. && popd
Packit 12c978
    build_command: cmake --build ./build
Packit 12c978
    branch_pattern: coverity_scan