Skip to content

Commit

Permalink
Update travis config and fix typo in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Froelich committed Dec 17, 2017
1 parent f469dd4 commit a146ac4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
52 changes: 30 additions & 22 deletions .travis.yml
@@ -1,34 +1,42 @@
dist: trusty
language: rust
sudo: false

rust:
- nightly
- beta
- stable
matrix:
include:
- rust: nightly
env: FEATURES="--features nightly"
- rust: beta
- rust: stable

cache:
apt: true
directories:
- target/debug/deps
- target/debug/build

addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev

script:
- cargo build --verbose
- cargo test --verbose

after_success: |
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
cd kcov-master &&
mkdir build &&
cd build &&
cmake .. &&
make &&
sudo make install &&
cd ../.. &&
rm -rf kcov-master &&
kcov --verify --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/lru-* &&
echo "Uploaded code coverage"
after_success:
- '[ $TRAVIS_RUST_VERSION = stable ] &&
LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH &&
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 ../.. &&
ls target/debug &&
RUSTFLAGS="-C link-dead-code" cargo test --no-run &&
for file in target/debug/lru-*; do
if [[ -x $file ]]; then
mkdir -p "target/cov/$(basename $file)";
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
fi;
done &&
kcov --coveralls-id=$TRAVIS_JOB_ID --merge target/cov target/cov/*'
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@

An implementation of a LRU cache. The cache supports `put`, `get`, and `pop` operations,
all of which are O(1). This crate was heavily influenced by the
[LRU Cache implementation in an earlier version of Rust's std::collections crate] (https://doc.rust-lang.org/0.12.0/std/collections/lru_cache/struct.LruCache.html).
[LRU Cache implementation in an earlier version of Rust's std::collections crate](https://doc.rust-lang.org/0.12.0/std/collections/lru_cache/struct.LruCache.html).


## Example
Expand Down

0 comments on commit a146ac4

Please sign in to comment.