]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge #1035
[rust.git] / .travis.yml
1 cache: cargo
2 before_cache:
3     - find ./target/debug -type f -maxdepth 1 -delete
4     - rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*test*,*tools*,*gen_lsp*,*thread_worker*}
5     - rm -f  ./target/.rustc_info.json
6
7 build: &rust_build
8     language: rust
9     rust: stable
10     script:
11         - rustup component add rustfmt
12         - rustup component add rust-src
13         - cargo test --no-run  # let's measure compile time separately
14         - cargo test
15         - cargo doc --all --no-deps
16     env:
17         - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
18
19 matrix:
20     include:
21         - os: linux
22           before_script:
23               - DEPLOY_DOCS=1
24           <<: *rust_build
25         - language: node_js
26           node_js: node
27           before_script: false
28           script:
29               - cd editors/code && npm ci && npm run travis
30
31         - os: windows
32           if: branch = master AND type = push
33           before_script:
34               - dos2unix ./crates/ra_syntax/tests/data/parser/**/*.txt
35               - dos2unix ./crates/ra_syntax/tests/data/parser/**/*.rs
36           <<: *rust_build
37
38     allow_failures:
39         # Because Travis-Windows-Rust can be flaky
40         # We still support Windows and want the tests to be succeeding,
41         # but there are too many spurious failures
42         - os: windows
43
44 branches:
45     only:
46         - staging
47         - master
48         - trying
49
50 deploy:
51     provider: pages
52     skip-cleanup: true
53     github-token: $DOCS_TOKEN  # Set in the settings page of your repository, as a secure variable
54     keep-history: true
55     local-dir: target/doc
56     branch: gh-pages
57     on:
58         branch: master
59         condition: $DEPLOY_DOCS = 1