2015-10-17 08:40:40 +00:00
|
|
|
sudo: false
|
2015-04-30 08:16:18 +00:00
|
|
|
language: rust
|
2015-05-22 03:50:58 +00:00
|
|
|
rust:
|
2017-06-14 12:07:49 +00:00
|
|
|
# - stable
|
|
|
|
# - beta
|
2015-05-22 03:50:58 +00:00
|
|
|
- nightly
|
2015-10-17 08:40:40 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
2015-11-11 17:41:12 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cargo
|
2015-04-30 08:16:18 +00:00
|
|
|
|
2015-11-12 21:38:35 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libelf-dev
|
|
|
|
- libdw-dev
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- |
|
2017-12-03 02:26:09 +00:00
|
|
|
if [ $TRAVIS_OS_NAME = 'osx' ]; then
|
2018-03-02 16:55:17 +00:00
|
|
|
virtualenv env &&
|
2017-12-06 09:12:34 +00:00
|
|
|
source env/bin/activate &&
|
2018-03-02 16:55:17 +00:00
|
|
|
python --version &&
|
2017-12-06 22:47:48 +00:00
|
|
|
pip install 'travis-cargo<0.2'
|
2017-12-03 02:26:09 +00:00
|
|
|
else
|
2017-12-06 09:12:34 +00:00
|
|
|
pip install 'travis-cargo<0.2' --user &&
|
2017-12-06 02:42:00 +00:00
|
|
|
export PATH="$(python -m site --user-base)/bin:$PATH"
|
2017-12-03 02:26:09 +00:00
|
|
|
fi
|
2015-11-12 21:38:35 +00:00
|
|
|
|
2015-04-30 08:16:18 +00:00
|
|
|
script:
|
2015-11-12 21:38:35 +00:00
|
|
|
- |
|
2015-11-12 22:47:24 +00:00
|
|
|
cargo build &&
|
|
|
|
cargo test
|
2015-11-12 21:38:35 +00:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- travis-cargo coveralls --no-sudo
|
2015-10-17 08:40:40 +00:00
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
# TODO: cross build
|
|
|
|
- cargo build --release --target=x86_64-unknown-linux-gnu
|
|
|
|
- tar czf rustfmt-x86_64-unknown-linux-gnu.tar.gz Contributing.md Design.md README.md -C target/x86_64-unknown-linux-gnu/release/rustfmt rustfmt
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
|
|
|
secure: "your own encrypted key"
|
|
|
|
file:
|
|
|
|
- rustfmt-x86_64-unknown-linux-gnu.tar.gz
|
|
|
|
on:
|
|
|
|
repo: nrc/rustfmt
|
|
|
|
tags: true
|
|
|
|
condition: "$TRAVIS_OS_NAME = linux"
|
|
|
|
skip_cleanup: true
|