mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
0145ba7082
as per [@davidalber's advice](https://github.com/rust-lang-nursery/rustfmt/pull/2229#discussion_r155129274)
57 lines
1.0 KiB
YAML
57 lines
1.0 KiB
YAML
sudo: false
|
|
language: rust
|
|
rust:
|
|
# - stable
|
|
# - beta
|
|
- nightly
|
|
os:
|
|
- linux
|
|
- osx
|
|
cache:
|
|
directories:
|
|
- $HOME/.cargo
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libcurl4-openssl-dev
|
|
- libelf-dev
|
|
- libdw-dev
|
|
|
|
before_script:
|
|
- |
|
|
if [ $TRAVIS_OS_NAME = 'osx' ]; then
|
|
brew install python3
|
|
virtualenv env -p python3
|
|
source env/bin/activate
|
|
pip install 'travis-cargo<0.2'
|
|
else
|
|
pip install 'travis-cargo<0.2' --user
|
|
export PATH="$(python -m site --user-base)/bin:$PATH"
|
|
fi
|
|
|
|
script:
|
|
- |
|
|
cargo build &&
|
|
cargo test
|
|
|
|
after_success:
|
|
- travis-cargo coveralls --no-sudo
|
|
|
|
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
|