]> git.lizzy.rs Git - rust.git/blob - .travis.yml
extract block contents into a function
[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     env:
16         - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
17
18 matrix:
19     include:
20         - os: linux
21           <<: *rust_build
22         - language: node_js
23           node_js: node
24           before_script: false
25           script:
26               - cd editors/code && npm ci && npm run travis
27
28         - os: windows
29           if: branch = master AND type = push
30           before_script:
31               - dos2unix ./crates/ra_syntax/tests/data/parser/**/*.txt
32               - dos2unix ./crates/ra_syntax/tests/data/parser/**/*.rs
33           <<: *rust_build
34
35     allow_failures:
36         # Because Travis-Windows-Rust can be flaky
37         # We still support Windows and want the tests to be succeeding,
38         # but there are too many spurious failures
39         - os: windows
40
41 branches:
42     only:
43         - staging
44         - master
45         - trying