First attempt at lighting up code coverage
This commit is contained in:
		
							
								
								
									
										27
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								.travis.yml
									
									
									
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								README.md
									
									
									
									
									
								
							@@ -1,5 +1,27 @@
 | 
			
		||||
[](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
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user