Remove state_processing tests, update travis

This commit is contained in:
Paul Hauner 2019-05-10 10:28:18 +10:00
parent 42765f2614
commit 59883603ac
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
9 changed files with 1 additions and 91 deletions

View File

@ -2,9 +2,6 @@ language: rust
cache:
directories:
- /home/travis/.cargo
# Going to try caching the registry
#before_cache:
# - rm -rf /home/travis/.cargo/registry
before_install:
- curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
- unzip protoc-3.4.0-linux-x86_64.zip -d protoc3
@ -12,37 +9,14 @@ 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
# Not building --release on travis any more, only GitLab
# - BUILD=--release --all
- BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto
script:
- cargo build --verbose $BUILD
- cargo test --verbose $BUILD
- cargo fmt --all -- --check
# No clippy until later...
#- cargo clippy
- cargo build --verbose --all --release
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
fast_finish: true
exclude:
# Not building --release on travis any more, only GitLab
# - rust: beta
# env: BUILD=--release --all
- rust: beta
env: BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto
# Not building --release on travis any more, only GitLab
# - 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
# No clippy for now
# - rustup component add clippy

View File

@ -3,7 +3,6 @@ members = [
"eth2/fork_choice",
"eth2/operation_pool",
"eth2/state_processing",
"eth2/state_processing/yaml_utils",
"eth2/types",
"eth2/utils/bls",
"eth2/utils/boolean-bitfield",

View File

@ -14,7 +14,6 @@ env_logger = "0.6.0"
serde = "1.0"
serde_derive = "1.0"
serde_yaml = "0.8"
yaml-utils = { path = "yaml_utils" }
[dependencies]
bls = { path = "../utils/bls" }
@ -30,6 +29,3 @@ tree_hash = { path = "../utils/tree_hash" }
tree_hash_derive = { path = "../utils/tree_hash_derive" }
types = { path = "../types" }
rayon = "1.0"
[features]
fake_crypto = ["bls/fake_crypto"]

View File

@ -1 +0,0 @@
../utils/bls/build.rs

View File

@ -1,14 +0,0 @@
[package]
name = "yaml-utils"
version = "0.1.0"
authors = ["Kirk Baird <baird.k@outlook.com>"]
edition = "2018"
[build-dependencies]
reqwest = "0.9"
[dependencies]
[lib]
name = "yaml_utils"
path = "src/lib.rs"

View File

@ -1,27 +0,0 @@
extern crate reqwest;
use std::fs::File;
use std::io::copy;
fn main() {
// These test files are not to be stored in the lighthouse repo as they are quite large (32MB).
// They will be downloaded at build time by yaml-utils crate (in build.rs)
let git_path = "https://raw.githubusercontent.com/ethereum/eth2.0-tests/master/state/";
let test_names = vec![
"sanity-check_default-config_100-vals.yaml",
"sanity-check_small-config_32-vals.yaml",
];
for test in test_names {
let mut target = String::from(git_path);
target.push_str(test);
let mut response = reqwest::get(target.as_str()).unwrap();
let mut dest = {
let mut file_name = String::from("specs/");
file_name.push_str(test);
File::create(file_name).unwrap()
};
copy(&mut response, &mut dest).unwrap();
}
}

View File

@ -1,15 +0,0 @@
#!/usr/bin/env python3
# Script to extract all the fields of the state mentioned in `expected_state` fields of tests
# in the `spec` directory. These fields can then be added to the `ExpectedState` struct.
# Might take a while to run.
import os, yaml
if __name__ == "__main__":
yaml_files = (filename for filename in os.listdir("specs") if filename.endswith(".yaml"))
parsed_yaml = (yaml.load(open("specs/" + filename, "r")) for filename in yaml_files)
all_fields = set()
for y in parsed_yaml:
all_fields.update(*({key for key in case["expected_state"]} for case in y["test_cases"]))
print(all_fields)

View File

@ -1 +0,0 @@
*.yaml

View File

@ -1 +0,0 @@
// This is a place holder such that yaml-utils is now a crate hence build.rs will be run when 'cargo test' is called