-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
26 lines (26 loc) · 984 Bytes
/
.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
language: rust
os:
- linux
# - osx
rust:
- nightly
notifications:
email: false
before_script:
- cargo +nightly install rustfmt-nightly --vers 0.3.8 --force
- cargo +nightly install clippy --force
- export PATH=$PATH:~/.cargo/bin
script:
- travis_wait 30 cargo build --verbose
- travis_wait 30 cargo test --verbose
- travis_wait 30 cargo +nightly fmt --all -- --write-mode=diff
- travis_wait 30 cargo +nightly clippy --all -- --deny warnings
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
cargo doc &&
echo "<meta http-equiv=refresh content=0;url=servo_css_parser/index.html>" > target/doc/index.html &&
git clone https://github.com/davisp/ghp-import.git &&
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
echo "Uploaded documentation"
fi