-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
language: rust | ||
|
||
env: | ||
global: | ||
- CRATE_NAME=drs-studio | ||
# 'rust:' statements in lint stage also need to be modified | ||
- NIGHTLY=nightly-2018-01-01 | ||
- RUSTFMT=0.3.4 | ||
- CLIPPY=0.0.177 | ||
|
||
stages: | ||
- name: lint | ||
if: tag IS blank | ||
- name: test | ||
if: tag IS blank | ||
- name: deploy | ||
if: tag IS present | ||
|
||
jobs: | ||
fast_finish: true | ||
include: | ||
- stage: lint | ||
rust: nightly-2018-01-01 | ||
env: clippy | ||
before_install: | ||
- if [[ `cargo +$NIGHTLY clippy -- --version` != $CLIPPY* ]] ; then travis_wait cargo +$NIGHTLY install clippy --force --vers $CLIPPY; fi | ||
script: | ||
- cargo +$NIGHTLY clippy -- -D warnings | ||
- stage: test | ||
script: | ||
- cargo test | ||
- stage: deploy | ||
env: TARGET=x86_64-unknown-linux-gnu | ||
script: sh ci/before_deploy.sh | ||
deploy: | ||
provider: releases | ||
api_key: $GH_DEPLOY_API_KEY | ||
file_glob: true | ||
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* | ||
on: | ||
tags: true | ||
skip_cleanup: true | ||
allow_failures: | ||
- rust: nightly-2018-01-01 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cargo | ||
- target/debug/deps | ||
- target/debug/build | ||
before_cache: | ||
# Make sure all files are readable by "others" for caching | ||
- chmod -R a+r $HOME/.cargo |