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