Generates a test coverage using kcov on travis. The coverage is only generated for beta builds. kcov requires using sudo, so beta builds can't run on container infrastructure anymore. Closes #44
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| language: rust
 | |
| matrix:
 | |
|     fast_finish: true
 | |
|     include:
 | |
|         - rust: nightly
 | |
|           env: FEATURES="--features nightly"
 | |
|           sudo: false
 | |
|         - rust: nightly
 | |
|           env: FEATURES="--features nightly" BENCH=true
 | |
|           sudo: false
 | |
|         - rust: beta
 | |
|           sudo: true
 | |
| 
 | |
| cache:
 | |
|     directories:
 | |
|         - target
 | |
| 
 | |
| script: ./.travis.sh
 | |
| 
 | |
| after_success: |
 | |
|     [ $TRAVIS_RUST_VERSION = beta ] &&
 | |
|     sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev &&
 | |
|     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 &&
 | |
|     sudo make install && cd ../.. &&
 | |
|     kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/hyper-*
 | |
|     [ $TRAVIS_BRANCH = master ] &&
 | |
|     [ $TRAVIS_PULL_REQUEST = false ] &&
 | |
|     [ $TRAVIS_RUST_VERSION = beta ] &&
 | |
|     cargo doc  &&
 | |
|     echo '<meta http-equiv=refresh content=0;url=hyper/index.html>' > target/doc/index.html &&
 | |
|     pip install --user ghp-import &&
 | |
|     /home/travis/.local/bin/ghp-import -n target/doc &&
 | |
|     git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
 | |
| 
 | |
| env:
 | |
|     global:
 | |
|         - secure: kHuPGsSt14Y7TTy+4NeNMQ4yhENXm38OM26G0ZER870QVOQH8cBZk9a9jgA36F8CGkGAMkFJ5lQw5RginQX01zaCev765XqCF8VvToXq9n/Vg8+oxR5LepC1ybY06yd7AuW/znB6cnQ8BB8HJK5FvZJ1PqH+yubzyyada8c/sVQ=
 | |
| 
 | |
| notifications:
 | |
|     email: false
 |