summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-13 16:19:25 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-13 16:19:25 -0700
commit20c4a1469ddf3e965030b1a3093683db23e9c781 (patch)
tree685209719b5e6d299ac710efbefd0ea697a6b633
parent571f166f11b019855c80df1fc4146acc367599aa (diff)
downloadfatcat-20c4a1469ddf3e965030b1a3093683db23e9c781.tar.gz
fatcat-20c4a1469ddf3e965030b1a3093683db23e9c781.zip
add default travis-cargo travis file
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml49
2 files changed, 51 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 6932422b..62c53208 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ golang/fatcatd
*.log
!.gitlab-ci.yml
+!.travis.yml
# Don't ignore this file itself
-:Q!.gitignore
+!.gitignore
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..e9fb657a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,49 @@
+sudo: false
+language: rust
+# necessary for `travis-cargo coveralls --no-sudo`
+addons:
+ apt:
+ packages:
+ - libcurl4-openssl-dev
+ - libelf-dev
+ - libdw-dev
+ - binutils-dev # optional: only required for the --verify flag of coveralls
+
+# run builds for all the trains (and more)
+rust:
+ - nightly
+ - beta
+ # check it compiles on the latest stable compiler
+ - stable
+ # and the first stable one (this should be bumped as the minimum
+ # Rust version required changes)
+ - 1.0.0
+
+# load travis-cargo
+before_script:
+ - |
+ pip install 'travis-cargo<0.2' --user &&
+ export PATH=$HOME/.local/bin:$PATH
+
+# the main build
+script:
+ - |
+ travis-cargo build &&
+ travis-cargo test &&
+ travis-cargo bench &&
+ travis-cargo --only stable doc
+after_success:
+ # upload the documentation from the build with stable (automatically only actually
+ # runs on the master branch, not individual PRs)
+ - travis-cargo --only stable doc-upload
+ # measure code coverage and upload to coveralls.io (the verify
+ # argument mitigates kcov crashes due to malformed debuginfo, at the
+ # cost of some speed <https://github.com/huonw/travis-cargo/issues/12>)
+ - travis-cargo coveralls --no-sudo --verify
+
+env:
+ global:
+ # override the default `--features unstable` used for the nightly branch (optional)
+ - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
+ # encrypted github token for doc upload (see `GH_TOKEN` link above)
+ - secure: "..."