diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88e5b42..7b2c158 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,11 @@ # Optional: Install a C compiler, cmake and git into the container. # You will often need this when you (or any of your dependencies) depends on C code. -# before_script: -# - apt-get update -yqq -# - apt-get install -yqq --no-install-recommends build-essential +before_script: +- apt-get update -yqq +- apt-get install -yqq --no-install-recommends build-essential + +# kcov +- apt-get install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev variables: RUSTFLAGS: "-C link-dead-code" @@ -13,7 +16,7 @@ test:stable: script: - rustc --version && cargo --version # Print version info for debugging - cargo build - - cargo test --verbose + - cargo test --verbose --jobs 1 --release # Use cargo to test the project test:nightly: @@ -23,6 +26,9 @@ test:nightly: script: - rustc --version && cargo --version # Print version info for debugging - cargo build - - cargo test --verbose - # - cargo test --verbose --jobs 1 --release # Don't paralize to make errors more readable - + # - cargo test --verbose + # # Don't paralize, At least until I fix tempdb helper fn. + - cargo test --verbose --jobs 1 --release + - cargo bench + after_script: + - 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/hammond-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && bash <(curl -s https://codecov.io/bash) && echo "Uploaded code coverage" diff --git a/Cargo.lock b/Cargo.lock index 77fe394..790a6a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,7 @@ dependencies = [ "diesel_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "loggerv 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -360,7 +360,7 @@ dependencies = [ [[package]] name = "hyper" -version = "0.11.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -397,7 +397,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -767,7 +767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libflate 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1235,7 +1235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futures-cpupool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "77d49e7de8b91b20d6fda43eea906637eff18b96702eb6b2872df8bfab1ad2b5" "checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07" "checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" -"checksum hyper 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60aefca3b899717636625c8f9c5c7ca678936a4a7696a62c455a998f84dbbc91" +"checksum hyper 0.11.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b45eac8b696d59491b079bd04fcb0f3488c0f6ed62dcb36bcfea8a543e9cdc3" "checksum hyper-native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72332e4a35d3059583623b50e98e491b78f8b96c5521fcb3f428167955aa56e8" "checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"