commit
e36c22e0b0
20
.travis.yml
20
.travis.yml
@ -8,7 +8,7 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
env: FEATURES="--features ethcore/json-tests" KCOV_FEATURES=""
|
env: FEATURES="--features ethcore/json-tests" KCOV_FEATURES="" TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity"
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
directories:
|
directories:
|
||||||
@ -28,22 +28,12 @@ before_script: |
|
|||||||
sudo apt-get install -y --force-yes librocksdb
|
sudo apt-get install -y --force-yes librocksdb
|
||||||
script:
|
script:
|
||||||
- cargo build --release --verbose ${FEATURES}
|
- cargo build --release --verbose ${FEATURES}
|
||||||
- cargo test --release -p ethash --verbose ${FEATURES}
|
- cargo test --release --verbose ${FEATURES} ${TARGETS}
|
||||||
- cargo test --release -p ethcore-util --verbose ${FEATURES}
|
- cargo bench --no-run ${FEATURES} ${TARGETS}
|
||||||
- cargo test --release -p ethcore --verbose ${FEATURES}
|
|
||||||
- cargo test --release -p ethsync --verbose ${FEATURES}
|
|
||||||
- cargo test --release -p ethcore-rpc --verbose ${FEATURES}
|
|
||||||
- cargo test --release -p parity --verbose ${FEATURES}
|
|
||||||
- cargo bench --no-run ${FEATURES}
|
|
||||||
after_success: |
|
after_success: |
|
||||||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
|
||||||
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. &&
|
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. &&
|
||||||
cargo test --no-run -p ethcore-util ${KCOV_FEATURES} &&
|
cargo test --no-run ${KCOV_FEATURES} ${TARGETS} &&
|
||||||
cargo test --no-run -p ethash ${KCOV_FEATURES} &&
|
|
||||||
cargo test --no-run -p ethcore ${KCOV_FEATURES} &&
|
|
||||||
cargo test --no-run -p ethsync ${KCOV_FEATURES} &&
|
|
||||||
cargo test --no-run -p ethcore-rpc ${KCOV_FEATURES} &&
|
|
||||||
cargo test --no-run -p parity ${KCOV_FEATURES} &&
|
|
||||||
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore_util-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore_util-* &&
|
||||||
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethash-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethash-* &&
|
||||||
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore-* &&
|
./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /.cargo,/root/.multirust target/kcov target/debug/deps/ethcore-* &&
|
||||||
@ -53,7 +43,7 @@ after_success: |
|
|||||||
[ $TRAVIS_BRANCH = master ] &&
|
[ $TRAVIS_BRANCH = master ] &&
|
||||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||||
[ $TRAVIS_RUST_VERSION = nightly ] &&
|
[ $TRAVIS_RUST_VERSION = nightly ] &&
|
||||||
cargo doc ${KCOV_FEATURES} --no-deps --verbose -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity &&
|
cargo doc --no-deps --verbose ${KCOV_FEATURES} ${TARGETS} &&
|
||||||
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
|
echo '<meta http-equiv=refresh content=0;url=ethcore/index.html>' > target/doc/index.html &&
|
||||||
pip install --user ghp-import &&
|
pip install --user ghp-import &&
|
||||||
/home/travis/.local/bin/ghp-import -n target/doc
|
/home/travis/.local/bin/ghp-import -n target/doc
|
||||||
|
@ -178,3 +178,7 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parity needs at least 1 test to generate coverage reports correctly.
|
||||||
|
#[test]
|
||||||
|
fn if_works() {
|
||||||
|
}
|
||||||
|
@ -42,3 +42,8 @@ impl HttpServer {
|
|||||||
server.start_async(addr)
|
server.start_async(addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Lib needs at least 1 test to generate coverage reports correctly.
|
||||||
|
#[test]
|
||||||
|
fn if_works() {
|
||||||
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
//! ```bash
|
//! ```bash
|
||||||
//! multirust run nightly cargo bench
|
//! multirust run nightly cargo bench
|
||||||
//! ```
|
//! ```
|
||||||
/*
|
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
extern crate test;
|
extern crate test;
|
||||||
@ -63,9 +63,9 @@ fn bench_stream_nested_empty_lists(b: &mut Bencher) {
|
|||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
// [ [], [[]], [ [], [[]] ] ]
|
// [ [], [[]], [ [], [[]] ] ]
|
||||||
let mut stream = RlpStream::new_list(3);
|
let mut stream = RlpStream::new_list(3);
|
||||||
stream.append_list(0);
|
stream.begin_list(0);
|
||||||
stream.append_list(1).append_list(0);
|
stream.begin_list(1).begin_list(0);
|
||||||
stream.append_list(2).append_list(0).append_list(1).append_list(0);
|
stream.begin_list(2).begin_list(0).begin_list(1).begin_list(0);
|
||||||
let _ = stream.out();
|
let _ = stream.out();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -89,9 +89,8 @@ fn bench_stream_1000_empty_lists(b: &mut Bencher) {
|
|||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let mut stream = RlpStream::new_list(1000);
|
let mut stream = RlpStream::new_list(1000);
|
||||||
for _ in 0..1000 {
|
for _ in 0..1000 {
|
||||||
stream.append_list(0);
|
stream.begin_list(0);
|
||||||
}
|
}
|
||||||
let _ = stream.out();
|
let _ = stream.out();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
*/
|
|
Loading…
Reference in New Issue
Block a user