language: rust
rust:
- 1.32.0 - stable
- beta
- nightly
os: linux
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 script: cargo check --all-targets
rust: stable
- stage: test
script:
- cargo test --all
- 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