.travis.yml: Remove $(nproc).
[collectd.git] / .travis.yml
index e2821f7..593905d 100644 (file)
@@ -1,3 +1,5 @@
+# Travis CI configuration file
+# https://travis-ci.org/collectd/collectd
 env:
   global:
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
@@ -6,14 +8,20 @@ env:
 
 sudo: required
 dist: trusty
+os:
+  - linux
+  - osx
 compiler:
   - gcc
   - clang
 language: c
 before_install:
-  - openssl s_client -connect scan.coverity.com:443 </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
-  - sudo apt-get update -qq
-  - sudo apt-get install -qq --no-install-recommends
+  # When building the coverity_scan branch, allow only the first job to continue to avoid travis-ci/travis-ci#1975.
+  - if [[ "${TRAVIS_BRANCH}" == "coverity_scan" && ! "${TRAVIS_JOB_NUMBER}" =~ \.1$ ]]; then exit 0; fi
+  - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
+    sudo apt-get update -qq &&
+    sudo apt-get install -qq --no-install-recommends
+      autotools-dev
       iptables-dev
       libatasmart-dev
       libcap-dev
@@ -28,6 +36,8 @@ before_install:
       libi2c-dev
       libldap2-dev
       libltdl-dev
+      liblua50-dev
+      liblua5.1-0-dev
       liblua5.2-dev
       liblvm2-dev
       libmemcached-dev
@@ -46,6 +56,7 @@ before_install:
       libprotobuf-c0-dev
       librabbitmq-dev
       librdkafka-dev
+      libriemann-client-dev
       librrd-dev
       libsensors4-dev
       libsigrok-dev
@@ -57,21 +68,63 @@ before_install:
       libupsclient-dev
       libvarnish-dev
       libvirt-dev
+      libxen-dev
       libxml2-dev
       libyajl-dev
       linux-libc-dev
       perl
       protobuf-c-compiler
+      python3-dev
       python-dev
+      xfslibs-dev
+    ; fi
+
+  # libgcrypt, libpq & libxml2 are already installed & can't be listed again.
+  # ganglia has a file conflict with coreutils.
+  - if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
+    brew install
+      curl
+      libdbi
+      glib
+      hiredis
+      openldap
+      lua
+      libmemcached
+      libmicrohttpd
+      libmodbus
+      mosquitto
+      mysql-client
+      libnotify
+      liboping
+      libpcap
+      perl
+      protobuf-c
+      rabbitmq-c
+      librdkafka
+      riemann-client
+      rrdtool
+      net-snmp
+      libstatgrab
+      tokyo-cabinet
+      varnish
+      libvirt
+      yajl
+      protobuf
+      python
+    ; fi
 before_script: autoreconf -fi
-script: ./configure && make -j 4 && make check
+script:
+  - if [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]]; then exit 0; fi
+  - ./configure
+  - make
+  - make check
 
 addons:
   coverity_scan:
     project:
       name: "collectd/collectd"
       description: "Build submitted via Travis CI"
-    notification_email: octo@collectd.org
+    notification_email: collectd-changes@verplant.org
     build_command_prepend: "./configure; make clean"
-    build_command: "make -j 4"
+    build_command: "make -j $(nproc)"
     branch_pattern: coverity_scan