-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rustfmt updates + refactor Travis configuration (#60)
* Update rustfmt compliance Looks like rustfmt has made some improvements recently, so wanted to bring the code up to date. * Add rustfmt to nightly item in Travis matrix * Use Travis Cargo cache * Allow fast_finish in Travis Items that match the `allow_failures` predicate (right now, just Rust nightly), will still finish, but Travis won't wait for them to report a result if the other builds have already finished. * Run kcov in a separate matrix build in Travis * Rework allowed_failures logic We don't want rustfmt to match `allow_failures` just because it needs to use nightly, while we do want nightly to match `allow_failures`. Env vars provide a solution. * Add --all switch to rustfmt Travis * Test building docs in Travis * Use exact Ubuntu dependencies listed for kcov Some of the dependencies we were installing were not listed on https://github.com/SimonKagstrom/kcov/blob/master/INSTALL.md, and we were missing one dependency that was listed there. When `sudo: true` Travis uses Ubuntu Trusty. * No need to build before running kcov kcov builds its own test executables. * Generate `Cargo.lock` w/ `cargo update` before running kcov As noted in aeb3906 it is not necessary to build the project before running kcov, but kcov does require a `Cargo.lock` file, which can be generated with `cargo update`.
- Loading branch information
Showing
24 changed files
with
114 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,50 @@ | ||
|
||
sudo: required | ||
|
||
language: rust | ||
cache: cargo # https://docs.travis-ci.com/user/caching/#Rust-Cargo-cache | ||
|
||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
matrix: | ||
# Since this item is allowed to fail, don't wait for it's result to mark the | ||
# build complete. | ||
fast_finish: true | ||
allow_failures: | ||
- rust: nightly | ||
- env: NAME='nightly' | ||
- env: NAME='kcov' | ||
include: | ||
- env: NAME='nightly' | ||
rust: nightly | ||
- env: NAME='rustfmt' | ||
rust: nightly | ||
before_script: | ||
- rustup component add rustfmt-preview | ||
script: | ||
- cargo fmt --all -- --write-mode=diff | ||
- env: NAME='kcov' | ||
sudo: required # travis-ci/travis-ci#9061 | ||
before_script: | ||
- cargo install cargo-update || echo "cargo-update already installed" | ||
- cargo install cargo-kcov || echo "cargo-kcov already installed" | ||
- cargo install-update -a | ||
script: | ||
- cargo kcov --print-install-kcov-sh | sh | ||
- cargo update # Creates `Cargo.lock` needed by next command | ||
- cargo kcov --verbose --features dss --coveralls -- --verify --exclude-pattern=/.cargo,/usr/lib,src/proto | ||
addons: | ||
apt: | ||
packages: | ||
- libcurl4-openssl-dev | ||
- libdw-dev | ||
- binutils-dev | ||
- libiberty-dev | ||
- zlib1g-dev | ||
|
||
env: | ||
global: | ||
- RUSTFLAGS="-C link-dead-code" | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- libcurl4-openssl-dev | ||
- libdw-dev | ||
- cmake | ||
- g++ | ||
- pkg-config | ||
- binutils-dev | ||
- libiberty-dev | ||
|
||
script: | ||
- cargo build --verbose --all-features | ||
- cargo test --verbose --all-features | ||
|
||
after_success: | ||
- cargo install cargo-kcov | ||
- cargo kcov --print-install-kcov-sh | sh | ||
- cargo kcov --verbose --features dss --coveralls -- --verify --exclude-pattern=/.cargo,/usr/lib,src/proto | ||
|
||
- cargo doc --verbose --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.