diff --git a/.travis.yml b/.travis.yml index 6233ea68b2..70b9d21333 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,13 @@ before_install: - sudo mv protoc3/include/* /usr/local/include/ - sudo chown $USER /usr/local/bin/protoc - sudo chown -R $USER /usr/local/include/google +env: + - BUILD=--all + - BUILD=--release --all + - BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto script: - - cargo build --verbose --all - - cargo build --verbose --release --all - - cargo test --verbose --all - - cargo test --verbose --release --all - - cargo test --manifest-path eth2/state_processing/Cargo.toml --verbose --release --features fake_crypto + - cargo build --verbose $BUILD + - cargo test --verbose $BUILD - cargo fmt --all -- --check # No clippy until later... #- cargo clippy @@ -23,6 +24,15 @@ matrix: allow_failures: - rust: nightly fast_finish: true + exclude: + - rust: beta + env: BUILD=--release --all + - rust: beta + env: BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto + - rust: nightly + env: BUILD=--release --all + - rust: nightly + env: BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto install: - rustup component add rustfmt - rustup component add clippy diff --git a/beacon_node/beacon_chain/test_harness/tests/chain.rs b/beacon_node/beacon_chain/test_harness/tests/chain.rs index e72c3a5aa5..d47de6889a 100644 --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs +++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs @@ -1,3 +1,5 @@ +#![cfg(not(debug_assertions))] + use env_logger::{Builder, Env}; use log::debug; use test_harness::BeaconChainHarness; diff --git a/eth2/fork_choice/tests/tests.rs b/eth2/fork_choice/tests/tests.rs index 3ce63eeb77..fb530ac434 100644 --- a/eth2/fork_choice/tests/tests.rs +++ b/eth2/fork_choice/tests/tests.rs @@ -1,3 +1,4 @@ +#![cfg(not(debug_assertions))] // Tests the available fork-choice algorithms extern crate beacon_chain; diff --git a/eth2/state_processing/tests/tests.rs b/eth2/state_processing/tests/tests.rs index dd611b4590..e80340e9a4 100644 --- a/eth2/state_processing/tests/tests.rs +++ b/eth2/state_processing/tests/tests.rs @@ -1,3 +1,5 @@ +#![cfg(not(debug_assertions))] + use serde_derive::Deserialize; use serde_yaml; use state_processing::{per_block_processing, per_slot_processing}; @@ -15,7 +17,7 @@ pub struct ExpectedState { pub current_epoch_attestations: Option>, pub historical_roots: Option>, pub finalized_epoch: Option, - pub latest_block_roots: Option>, + pub latest_block_roots: Option>, } impl ExpectedState { @@ -26,7 +28,7 @@ impl ExpectedState { ($field_name:ident) => { if self.$field_name.as_ref().map_or(true, |$field_name| { println!(" > Checking {}", stringify!($field_name)); - &state.$field_name == $field_name + $field_name == &state.$field_name }) { vec![] } else { diff --git a/eth2/types/src/tree_hash_vector.rs b/eth2/types/src/tree_hash_vector.rs index 9b77e13dcd..1cc8e40a55 100644 --- a/eth2/types/src/tree_hash_vector.rs +++ b/eth2/types/src/tree_hash_vector.rs @@ -33,12 +33,6 @@ impl DerefMut for TreeHashVector { } } -impl PartialEq> for TreeHashVector { - fn eq(&self, other: &Vec) -> bool { - &self.0 == other - } -} - impl tree_hash::TreeHash for TreeHashVector where T: TreeHash, diff --git a/eth2/utils/boolean-bitfield/src/lib.rs b/eth2/utils/boolean-bitfield/src/lib.rs index a744c94981..1d0f1c02e3 100644 --- a/eth2/utils/boolean-bitfield/src/lib.rs +++ b/eth2/utils/boolean-bitfield/src/lib.rs @@ -9,7 +9,6 @@ use serde_hex::{encode, PrefixedHexVisitor}; use ssz::{Decodable, Encodable}; use std::cmp; use std::default; -use tree_hash::tree_hash_ssz_encoding_as_list; /// A BooleanBitfield represents a set of booleans compactly stored as a vector of bits. /// The BooleanBitfield is given a fixed size during construction. Reads outside of the current size return an out-of-bounds error. Writes outside of the current size expand the size of the set. diff --git a/eth2/utils/ssz_derive/src/lib.rs b/eth2/utils/ssz_derive/src/lib.rs index f3475f5a79..c5b53e9341 100644 --- a/eth2/utils/ssz_derive/src/lib.rs +++ b/eth2/utils/ssz_derive/src/lib.rs @@ -38,7 +38,7 @@ extern crate proc_macro; use proc_macro::TokenStream; -use quote::{quote, ToTokens}; +use quote::quote; use syn::{parse_macro_input, DeriveInput}; /// Returns a Vec of `syn::Ident` for each named field in the struct.