# Created by the Rust CI generator: https://github.com/bspeice/rust-ci dist: trusty language: rust # Used during coverage to build kcov addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev env: global: # CARGO_TOKEN secure: sU1O2DIBOmCN0W5sAwIfsNr5AtGb2zGlIH3uNo9uuiVvzpL0iyoPQThSjOIHbZlpcn3OttpyH/8jltdXBJPrDmO+JzBoHkZHahUZgUVFdanqvttOQfKtTSg2V90WABVWqNWASuAZwGEbJ2NhSTHNj3qYS0A8kMaatYA+ezdrFXAOaaXgLVdUP/hFSmQeTYDPNtAVxcHxzSpCDInbkfQn3A5940lPGXzQ7bs/2p6WwtIEUuKFOOYt715hxmzMb2vyd/D65h8TjYG2LXKfBL84hjyn2DpmAIkZszHNkZ5UUzmU8WO2WR2CGgol6+qhkpZcupv8kZQSzT1ZvU5ZGRAClsr8v7zUA57RB/gkVRdOkSgE8pzC4DTdcDSNau3r03ihAF26nP7bz/Icnjm506UJVJCgZy3+tmMWdkppb+q/47LZ4qnnJtcXaWDVy1zVs/nyVL2xm8W3ZNQcFsxP0t86qh4U3S+ylpSDcl9g39VHWtGMdlt0oQ1RsaAOJ5avgUsJO9uLXkOlEc3GadooSpJ8A36kdK9/I3KTDMgk5RLK03jRvgaEZ2W4Xbu4YKO0LO4OENVyuFhhn4/KZSGbKBnuS/g45X8GEWDoiEly8uX8UBwL/MKB8hMUlFSJzxQMG1hAtSIZM6tX+wl2Mjg1h4SBqBjXK8BjHeEXYmw6IT7GNkg= matrix: include: # Uniquely identifies the build that uploads to codecov.io - env: CODECOV=TRUE rust: nightly # Uniquely identifies the build that uploads to crates.io - env: CRATESIO=TRUE rust: nightly - rust: 1.31.0 - rust: nightly os: osx - rust: stable os: osx - rust: beta os: osx - rust: nightly - rust: stable - rust: beta before_install: - set -e - rustup self update install: - source ~/.cargo/env || true - | echo "TRAVIS_RUST_VERSION=\"$TRAVIS_RUST_VERSION\"" if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then echo "Installing preview" rustup component add rustfmt-preview else echo "Installing standard" rustup component add rustfmt fi script: - cargo fmt --all -- --check - | if [ -z "$TRAVIS_TAG" ]; then cargo test cargo test --release fi after_script: set +e after_success: | if [ -n "$TRAVIS_TAG" ]; then cd qadapt-macro && cargo publish --token "$CARGO_TOKEN" && cd .. && cargo publish --token "$CARGO_TOKEN" elif [ -n "$CODECOV" ] && [ -z "$TRAVIS_TAG" ]; then # Build test coverage statistics wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && \ tar xzf master.tar.gz && \ cd kcov-master && \ mkdir build && \ cd build && \ cmake .. && \ make && \ make install DESTDIR=../../kcov-build && \ cd ../.. && \ rm -rf kcov-master && \ for file in target/debug/*-*[^\.d]; do \ mkdir -p "target/cov/$(basename $file)"; \ ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib,tests/ --verify "target/cov/$(basename $file)" "$file"; \ done && \ bash <(curl -s https://codecov.io/bash) && \ echo "Uploaded code coverage" fi branches: only: - "/^v\\d+\\.\\d+\\.\\d+.*$/" - master