]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge #1604
[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_*,*heavy_test*,*gen_lsp*,*thread_worker*}
5     - rm -f  ./target/.rustc_info.json
6
7 matrix:
8     include:
9         - name: "Rust Tests"
10           os: linux
11           dist: xenial
12           language: rust
13           rust: stable
14           script:
15               - rustup component add rustfmt
16               - rustup component add rust-src
17               - printf "\n\n[profile.dev]\ndebug = false\n" >> Cargo.toml
18               - cargo test --no-run  # let's measure compile time separately
19               - cargo test
20           env:
21               - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
22
23         - name: "Rust Docs"
24           os: linux
25           if: branch = master AND type = push
26           before_script:
27               - DEPLOY_DOCS=1
28           language: rust
29           rust: stable
30           script:
31               - cargo doc --all --no-deps
32           env:
33               - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
34
35         - name: "VS Code Tests"
36           os: linux
37           language: node_js
38           dist: xenial
39           node_js: node
40           services:
41             - xvfb
42           before_install: cd editors/code
43           install:
44             - npm ci
45             - npm run vscode:prepublish
46           script:
47             - npm run travis
48           env:
49             - CXX="g++-4.9", CC="gcc-4.9"
50
51 branches:
52     only:
53         - staging
54         - master
55         - trying
56
57 deploy:
58     provider: pages
59     skip-cleanup: true
60     github-token: $DOCS_TOKEN  # Set in the settings page of your repository, as a secure variable
61     keep-history: true
62     local-dir: target/doc
63     branch: gh-pages
64     on:
65         branch: master
66         condition: $DEPLOY_DOCS = 1