First attempt at lighting up code coverage

This commit is contained in:
Greg Fitzgerald 2018-02-15 16:09:11 -07:00
parent fb168fcee0
commit 046271a657
2 changed files with 47 additions and 4 deletions

View File

@ -8,10 +8,31 @@ matrix:
env:
- FEATURES='unstable'
cache: cargo
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- rustup component add rustfmt-preview
before_script: |
export PATH="$PATH:$HOME/.cargo/bin"
rustup component add rustfmt-preview
PKGNAME="phist" # must match with cargo.toml
LOCAL="~/.local" # install here to avoid `sudo`
export PATH=$LOCAL/bin:$PATH
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # required for `--verify`
script:
- cargo fmt -- --write-mode=diff
- cargo build --verbose --features "$FEATURES"
- cargo test --verbose --features "$FEATURES"
after_success: |
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=$LOCAL .. && make &&
make install && cd ../.. &&
kcov --verify \
--exclude-pattern=/.cargo \
target/kcov target/debug/$PKGNAME-*
bash <(curl -s https://codecov.io/bash) -s target/kcov

View File

@ -1,5 +1,27 @@
[![Build Status](https://travis-ci.org/garious/phist.svg?branch=master)](https://travis-ci.org/garious/phist)
# phist
# :punch: phist :punch:
An implementation of Loom's Proof-of-History.
# Developing
Install Rust and Cargo:
```bash
$ curl https://sh.rustup.rs -sSf | sh
```
Download the source code:
```bash
$ git clone https://github.com/garious/phist.git
$ cd phist
```
Run the test suite:
```bash
cargo test
```