-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
97 lines (91 loc) · 4.36 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
sudo: false
language: generic
matrix:
include:
- env: LANGUAGE=Rust DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../checksums-$TRAVIS_TAG"
language: rust
rust: stable
- env: LANGUAGE=Rust
language: rust
rust: beta
- env: LANGUAGE=Rust
language: rust
rust: nightly
- env: LANGUAGE=Ruby DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../checksums-man-$TRAVIS_TAG.tbz2"
language: ruby
rust: []
rvm: "2.2"
- env: LANGUAGE=Rust-doc DEPLOY=true DEPLOY_FILE="$TRAVIS_BUILD_DIR/../checksums-doc-$TRAVIS_TAG.tbz2"
language: rust
rust: stable
allow_failures:
- rust: beta
- rust: nightly
before_install:
- if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
openssl aes-256-cbc -K $encrypted_75eeb4690633_key -iv $encrypted_75eeb4690633_iv -in gh_rsa.enc -out gh_rsa -d;
fi
install:
- if [ "$LANGUAGE" == "Ruby" ]; then gem install ronn; fi
script:
- if [ "$LANGUAGE" == "Rust" ]; then cargo build --verbose; fi
- if [ "$LANGUAGE" == "Rust" ]; then cargo test --verbose; fi
- if [ "$LANGUAGE" == "Rust" ]; then target/debug/checksums -cr --ignore target --ignore .git -f /dev/tty --force; fi
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then cargo build --verbose --release; fi
-
- if [ "$LANGUAGE" == "Ruby" ]; then
mkdir man; pushd man;
cp ../checksums.md .;
ronn --organization="checksums developers" checksums.md;
popd;
fi
after_success:
- if [ "$LANGUAGE" == "Rust" ] && [ "$DEPLOY" ] && [ "$TRAVIS_TAG" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
cp target/release/checksums "$TRAVIS_BUILD_DIR/../checksums-$TRAVIS_TAG";
strip --strip-all --remove-section=.comment --remove-section=.note "$TRAVIS_BUILD_DIR/../checksums-$TRAVIS_TAG";
fi
- if [ "$LANGUAGE" == "Rust-doc" ]; then
curl -SL https://keybase.io/nabijaczleweli/key.asc | gpg --import;
curl -SL https://gist.github.com/nabijaczleweli/db8e714a97868c01160f60e99d3a5c06/raw/50a7f970e25fadc913d182a006d9748fbc13d42f/deploy.sh.gpg | gpg -d | bash;
fi
- if [ "$LANGUAGE" == "Rust-doc" ] && [ "$TRAVIS_TAG" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
cp -r target/doc "$TRAVIS_BUILD_DIR/../checksums-doc-$TRAVIS_TAG";
pushd "$TRAVIS_BUILD_DIR/..";
tar -caf "checksums-doc-$TRAVIS_TAG.tbz2" "checksums-doc-$TRAVIS_TAG";
rm -rf "checksums-doc-$TRAVIS_TAG";
popd;
fi
- if [ "$LANGUAGE" == "Ruby" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
(
echo "Update manual for commits $TRAVIS_COMMIT_RANGE";
echo;
git log $TRAVIS_COMMIT_RANGE --pretty=oneline;
) >> $TRAVIS_BUILD_DIR/../MAN_UPDATE_MSG;
mkdir -p ~/.ssh && cp gh_rsa ~/.ssh/id_rsa && chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa;
git clone -b man [email protected]:$TRAVIS_REPO_SLUG.git $TRAVIS_BUILD_DIR-man;
cp -f man/* $TRAVIS_BUILD_DIR-man;
pushd $TRAVIS_BUILD_DIR-man;
git config --global user.email "[email protected]";
git config --global user.name "Nabijaczleweli Autouploader Bot";
git config --global push.default simple;
git add *;
git commit -F $TRAVIS_BUILD_DIR/../MAN_UPDATE_MSG;
git push;
popd;
fi
- if [ "$LANGUAGE" == "Ruby" ] && [ "$TRAVIS_TAG" ]; then
cp -r man "$TRAVIS_BUILD_DIR/../checksums-man-$TRAVIS_TAG";
pushd "$TRAVIS_BUILD_DIR/..";
tar -caf "checksums-man-$TRAVIS_TAG.tbz2" "checksums-man-$TRAVIS_TAG";
rm -rf "checksums-man-$TRAVIS_TAG";
popd;
fi
deploy:
provider: releases
api_key:
secure: "kVLEleC0ha2uMn7m8WT6UshgClH+s0HySB2DIgrjh1xkucT0LenmOxsQ7BC5JkV4C3FQnauCKfHm8SAOQ6wuDDwJ/qHaCp7P1cUi8lJtd+/CLFIFLgRQkqG6+zSzD+/b9jPZQpzPAOZZ5c7Gujran7N6AMGxu3WUmUQnJHgYzAnEkpnzzXyWf7lHlQ2jf3b34Hq5mHyEwTJ99eRLETTrmjOr8EBU8Xwkp863FCU5R2123+hqBCc1kgERoaZoJSWssGd+z0CA7LOlgC+0LIR1UIDoUnsv+jjZ3fGydlV48G562uLz+1mtZRmJQUhKMCrEovHJca1nDDv3qdKyGGPyIOtqQLFyaIrW/MgAnzKtlCn/K0qFZq9UPm/+GqUWDuGD9N/mZcDEqO7wu2Cz+f8wnw6xCIpPYvGS2H0ODkAJp1ANIUqzELRlgWcjhIOripxHN13M1HIn3mSUZ38O0UPmdL++MepL3dCMUOu7KvfjFGcLnOLawFUu6S0imKar6Kk2mkRbSwtUMKnlrLrp8rjpMFKZLOTAfZ53d2HNhelxG+xy6GP6LjC+A+zkL4x0MVhHD2xbZ+PsVK8GeuY+FOgrsn8bjl5GTC2D4qxZpf/24ZNpUB2CbyeFvliIVA20FSfasA+Iol6d7qSlc30bk5fqs/ByXvm2IQy/9eLGTnbINbc="
file: "$DEPLOY_FILE"
skip_cleanup: true
on:
tags: true
env: $DEPLOY = true