zmq 0.9.1

High-level bindings to the zeromq library
Documentation
language: rust
rust:
  - 1.32.0 # uniform paths
  - stable
  - beta
  - nightly
os: linux

# always test things that aren't pushes (like PRs)
# never test tags or pushes to non-master or release branches (wait for PR)
# https://github.com/travis-ci/travis-ci/issues/2200#issuecomment-441395545)
if: type != push OR (tag IS blank AND branch =~ /^(master|release\/-.*)$/)

addons:
  apt:
    packages:
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev
      - libc6-dev

before_install:
  - wget https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz
  - tar xvfz libsodium-1.0.16.tar.gz
  - cd libsodium-1.0.16 && ./configure --prefix=$HOME && make && make install && cd ..
  - wget https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz
  - tar xvfz zeromq-4.2.5.tar.gz
  - cd zeromq-4.2.5 && ./configure --prefix=$HOME --with-libsodium && make && make install && cd ..

matrix:
  allow_failures:
    - rust: nightly
  fast_finish: true
  include:
    - stage: check # do a pre-screen to make sure this is even worth testing
      script: cargo check --all-targets
      rust: stable
    - stage: test
      script:
        - cargo test --all
        # Now test with the vendored crate. Clean to prevent duplicate zmq link.
        - cargo clean
        - cargo test --all --all-features
        - cargo test --all --release --all-features
    - stage: lint
      name: "Rust: rustfmt"
      install:
        - rustup component add rustfmt
      script:
        - cargo fmt -v -- --check
    - name: "Rust: clippy"
      install:
        - rustup component add clippy
      script:
        - cargo clippy --all-features --all-targets -- -D warnings

stages:
  - check
  - test
  - lint

env:
  global:
  - PATH=$HOME/.local/bin:$PATH
  - LD_LIBRARY_PATH=$HOME/lib
  - PKG_CONFIG_PATH=$HOME/lib/pkgconfig