]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge #1462
[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*,*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               - cargo test --no-run  # let's measure compile time separately
18               - cargo test
19           env:
20               - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
21
22         - name: "Rust Docs"
23           os: linux
24           if: branch = master AND type = push
25           before_script:
26               - DEPLOY_DOCS=1
27           language: rust
28           rust: stable
29           script:
30               - cargo doc --all --no-deps
31           env:
32               - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0
33
34         - name: "VS Code Tests"
35           os: linux
36           language: node_js
37           dist: xenial
38           node_js: node
39           services:
40             - xvfb
41           before_install: cd editors/code
42           install:
43             - npm install
44             - npm run vscode:prepublish
45           script:
46             - npm ci
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