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