From b4ccb0085e862c29797c13e55c756e525c431105 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Thu, 13 Feb 2020 13:55:55 -0500 Subject: [PATCH] Integrate rustfmt into travis. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 308c8d634d7..ba5a6145b87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ before_install: - sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev script: + # Check formatting. + - if [ "$(rustup show | grep stable)" != "" ]; then rustup component add rustfmt && cargo fmt --all -- --check; fi - if [ "$(rustup show | grep 1.34.2)" != "" ]; then rustup component add rustfmt && cd fuzz && cargo fmt --all -- --check && cd ../; fi # Build workspaces with Rust stable, beta, and 1.34.0 - if [ "$(rustup show | grep default | grep 1.22.0)" == "" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi # Build lightning workspace with Rust 1.22.0