Skip to content

Commit

Permalink
travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops committed Oct 9, 2017
1 parent 1ced0aa commit 8d9c2f0
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
sudo: false

language: rust

matrix:
fast_finish: true
include:
- rust: nightly
- rust: beta
- rust: stable
allow_failures:
- rust: nightly

script:
- RUSTFLAGS="$RUSTFLAGS -C link-dead-code" cargo test

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

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

after_success:
- '[ $TRAVIS_RUST_VERSION = stable ] &&
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
(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/recess-*; do
if [[ "${file: -2}" != ".d" ]]; 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/* &&
echo "covered") || true'
- '[ $TRAVIS_RUST_VERSION = stable ] &&
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ]
&& cargo doc --no-deps &&
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d / -f 2`/index.html>" > target/doc/index.html &&
pip install --user ghp-import &&
/home/travis/.local/bin/ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages &&
echo "documented"'
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# recess

> Extended [play](https://play.rust-lang.org/) time with rust
## install

## usage

Doug Tangren (softprops) 2017
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ extern crate recess;
extern crate tokio_core;

use futures::Future;
use recess::{Client, CompileRequest, Error};
use recess::{Client, CompileRequest, Error, ExecuteRequest};
use tokio_core::reactor::Core;

fn run() -> Result<(), Error> {
let mut core = Core::new()?;
let client = Client::new(&core.handle());
let work = client
.compile(CompileRequest::builder(
.execute(ExecuteRequest::builder(
r#"fn main() { println!("{}", 1); }"#,
).build()?)
.and_then(|result| {
Expand Down

0 comments on commit 8d9c2f0

Please sign in to comment.