forked from thecoshman/http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (69 loc) · 2.93 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
sudo: false
language: generic
cache: cargo
matrix:
include:
- env: LANGUAGE=Rust DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../http-$TRAVIS_TAG"
language: rust
rust: stable
- env: LANGUAGE=Rust
language: rust
rust: beta
- env: LANGUAGE=Rust CLIPPY=true
language: rust
rust: nightly
- env: LANGUAGE=Rust-deb DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/target/debian"
language: rust
rust: stable
- env: LANGUAGE=Ruby DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../http-man-$TRAVIS_TAG.tbz2"
language: ruby
rust: []
rvm: "2.2"
allow_failures:
- rust: beta
- rust: nightly
install:
- if [ "$LANGUAGE" == "Ruby" ]; then gem install ronn; fi
- if [ "$LANGUAGE" == "Rust-deb" ]; then
export DEPLOY_FILE="$DEPLOY_FILE/http_$(awk '/version/ {print(gensub(/"/, "", "g", $3)); exit}' Cargo.toml)_amd64.deb";
cargo install cargo-deb || :;
fi
script:
- if [ "$LANGUAGE" == "Rust" ]; then cargo build --verbose; fi
- if [ "$LANGUAGE" == "Rust" ]; then cargo test --verbose; fi
-
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ]; then cargo build --verbose --release; fi
- if [ "$LANGUAGE" == "Rust" ] && [ "$CLIPPY" ]; then
rustup component add clippy-preview || cargo install --git https://github.com/rust-lang/rust-clippy clippy -f;
cargo clippy;
fi
-
- if [ "$LANGUAGE" == "Rust-deb" ]; then cargo deb; fi
-
- if [ "$LANGUAGE" == "Ruby" ]; then
mkdir man; pushd man;
cp ../http.md .;
ronn --organization="http developers" http.md;
popd;
fi
after_success:
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ]; then
cp target/release/http "$DEPLOY_FILE";
strip --strip-all --remove-section=.comment --remove-section=.note "$DEPLOY_FILE";
fi
- if [ "$LANGUAGE" == "Ruby" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ]; then
cp -r man "$TRAVIS_BUILD_DIR/../http-man-$TRAVIS_TAG";
pushd "$TRAVIS_BUILD_DIR/..";
tar -caf "http-man-$TRAVIS_TAG.tbz2" "http-man-$TRAVIS_TAG";
rm -rf "http-man-$TRAVIS_TAG";
popd;
fi
deploy:
provider: releases
api_key:
secure: "k2Y6coPaGjjGie7UmbTkh2Vms7PVr8PIfVP0+0iuuACyZJaSzfaJmLW4crYgEPpifydVSlf+2EDw25N13yU0blIwhvNMO7BMBWLKFsVUc/0vurHCDj/xuzh8OkpN9VpL/i5nOzi26CHBBzMgIIqqnx8MB1suXkg38X05ZJQoFXciqObvHIl85rP3naLjpzgtWDwHSMZ3tceBpYhcFDAuLgw+LEhIGw2de4KYNfAUOyb2zgy7Sga0dZFyJghb9eOMncC3/F2Ahl18f14Uw+kzYaJkBjL/HA05o0j1dM66MhU14iZNJWsr0CHDwXDBdGsYgAbIcDMl9yeIPh+aMqzQq3+YmJFzwQSVtJDGLQbohBExjPRZRgwZ+RbcIr7AfWW5dvviRG8+kHEIqeUpv/uXOn7bhN0xtgMSj/harzml6qpNzLgR+A3sqS3sVc3uDFQavuiiQpKbi8rq/ZyTmSd2gXjo1jH6qcda1wasqth6nd+m9TpHl01fHSSWVQ9gIhgsqzTTDzSUqb6SHiIMWffaH1q6Py8guUoWZrYaSTVZu6ABu3d6hxGfwAX+m2Y/8BeYNvEflP1MxWzN/g0ziH5NsLy8gxdEYXtDOcWD5wwmB89GLzFpGU1KsafZf4qpBgDD9R3STACmc6WQ4whMDEne9jBXoZfxOxCSA+72907hxUQ="
file: "$DEPLOY_FILE"
skip_cleanup: true
on:
tags: true
condition: $DEPLOY = true