Skip to content

Commit

Permalink
Merge pull request #1 from fitzgen/spring-cleaning
Browse files Browse the repository at this point in the history
Spring cleaning
  • Loading branch information
jameysharp committed Nov 30, 2016
2 parents f65f85e + bec5e1e commit 196f9b7
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 11 deletions.
Empty file added .coveralls.yml
Empty file.
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
sudo: false

language: rust

os:
- linux

rust:
- nightly
- beta
- stable

addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev

before_script:
- pip install -v 'travis-cargo<0.2' --user
- if [[ -e ~/.local/bin ]]; then export PATH=~/.local/bin:$PATH; fi
- echo PATH is $PATH
- export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

script:
- |
travis-cargo build &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc
after_success:
- travis-cargo --only stable doc-upload
- travis-cargo coveralls --no-sudo --verify
- if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then KCOV=./kcov/build/src/kcov ./coverage; fi

env:
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
103 changes: 93 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ version = "0.1.0"
authors = ["jamey <jamey@minilop.net>"]

[dependencies]
i2cdev = { git = "https://github.com/rust-embedded/rust-i2cdev.git" }
i2cdev = "0.3.1"
byteorder = "0.5"

[features]
nightly = []
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# `av4-fc`

[![Build Status](https://travis-ci.org/psas/av4-fc.png?branch=master)](https://travis-ci.org/psas/av4-fc) [![Coverage Status](https://coveralls.io/repos/github/psas/av4-fc/badge.svg?branch=master)](https://coveralls.io/github/psas/av4-fc?branch=master)

Flight controller.
26 changes: 26 additions & 0 deletions coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Usage:
# ./coverage
#
# Run kcov on the tests, and merge the results.
#
# Environment variables:
# TRAVIS_JOB_ID - id for coveralls, defaults to none
# KCOV - path to kcov, defaults to 'kcov'

[ -n "$TRAVIS_JOB_ID" ] && COVERALLS_ID="--coveralls-id=$TRAVIS_JOB_ID"
[ -z "$KCOV" ] && KCOV=kcov

# Rebuild tests with dead code included, and get a list of the filenames.
export RUSTFLAGS="-C link-dead-code"
TEST_FILES=$(cargo test 2>&1 >/dev/null | awk '/^ Running target\/debug\// { print $2 }')

KCOV_OPTS="--verify --exclude-pattern=/.cargo"
OUT_DIR=target/kcov

for f in $TEST_FILES; do
"$KCOV" $KCOV_OPTS "$OUT_DIR" $f
done
"$KCOV" --merge $KCOV_OPTS $COVERALLS_ID "$OUT_DIR" "$OUT_DIR"

0 comments on commit 196f9b7

Please sign in to comment.