1- language :rust
2- rust :stable
3- cache :cargo
41
52matrix :
63fast_finish :true
74include :
8- -name :rustunittests and doctests
5+ -name :Run rusttests
96language :rust
107rust :stable
118cache :cargo
129script :
1310 -cargo build --verbose --all
1411 -cargo test --verbose --all
12+ env :
13+ # Prevention of cache corruption.
14+ # See: https://docs.travis-ci.com/user/caching/#caches-and-build-matrices
15+ -JOBCACHE=1
1516
1617# To test the snippets, we use Travis' Python environment (because
1718# installing rust ourselves is a lot easier than installing Python)
1819 -name :python test snippets
1920language :python
2021python :3.6
2122cache :
22- pip :true
23- # Because we're using the Python Travis environment, we can't use
24- # the built-in cargo cacher
25- directories :
26- -/home/travis/.cargo
27- -target
23+ -pip
24+ -cargo
2825env :
26+ -JOBCACHE=2
2927 -TRAVIS_RUST_VERSION=stable
3028 -CODE_COVERAGE=false
3129script :tests/.travis-runner.sh
32- -name :rustfmt
30+
31+ -name :Check rust code style with rustfmt
3332language :rust
3433rust :stable
3534cache :cargo
3635before_script :
37- -rustup component add rustfmt-preview
36+ -rustup component add rustfmt
3837script :
39- # Code references the generated python.rs, so put something in
40- # place to make `cargo fmt` happy. (We use `echo` rather than
41- # `touch` because rustfmt complains about the empty file touch
42- # creates.)
43- -echo > parser/src/python.rs
4438 -cargo fmt --all -- --check
39+ env :
40+ -JOBCACHE=3
41+
4542 -name :publish documentation
4643language :rust
4744rust :stable
@@ -50,7 +47,17 @@ matrix:
5047 -cargo doc --no-deps --all
5148if :branch = release
5249env :
53- -DEPLOY_DOC=true
50+ -JOBCACHE=4
51+ deploy :
52+ -provider :pages
53+ repo :RustPython/website
54+ target-branch :master
55+ local-dir :target/doc
56+ skip-cleanup :true
57+ # Set in the settings page of your repository, as a secure variable
58+ github-token :$WEBSITE_GITHUB_TOKEN
59+ keep-history :true
60+
5461 -name :WASM online demo
5562language :rust
5663rust :stable
@@ -65,42 +72,38 @@ matrix:
6572 -npm run dist
6673if :branch = release
6774env :
68- -DEPLOY_DEMO=true
69- -name :cargo-clippy
70- language :rust
71- rust :stable
72- cache :cargo
73- before_script :
74- -rustup component add clippy
75- script :
76- -cargo clippy
75+ -JOBCACHE=5
76+ deploy :
77+ -provider :pages
78+ repo :RustPython/demo
79+ target-branch :master
80+ local-dir :wasm/demo/dist
81+ skip-cleanup :true
82+ # Set in the settings page of your repository, as a secure variable
83+ github-token :$WEBSITE_GITHUB_TOKEN
84+ keep-history :true
85+
7786 -name :Code Coverage
7887language :python
7988python :3.6
8089cache :
81- pip :true
82- # Because we're using the Python Travis environment, we can't use
83- # the built-in cargo cacher
84- directories :
85- -/home/travis/.cargo
86- -target
90+ -pip
91+ -cargo
8792script :
8893 -tests/.travis-runner.sh
8994# Only do code coverage on master via a cron job.
9095if :branch = master AND type = cron
9196env :
97+ -JOBCACHE=6
9298 -TRAVIS_RUST_VERSION=nightly
9399 -CODE_COVERAGE=true
100+
94101 -name :test WASM
95102language :python
96103python :3.6
97104cache :
98- pip :true
99- # Because we're using the Python Travis environment, we can't use
100- # the built-in cargo cacher
101- directories :
102- -/home/travis/.cargo
103- -target
105+ -pip
106+ -cargo
104107addons :
105108firefox :latest
106109install :
@@ -109,30 +112,5 @@ matrix:
109112script :
110113 -wasm/tests/.travis-runner.sh
111114env :
115+ -JOBCACHE=7
112116 -TRAVIS_RUST_VERSION=stable
113- allow_failures :
114- -name :cargo-clippy
115-
116- deploy :
117- -provider :pages
118- repo :RustPython/website
119- target-branch :master
120- local-dir :target/doc
121- skip-cleanup :true
122- # Set in the settings page of your repository, as a secure variable
123- github-token :$WEBSITE_GITHUB_TOKEN
124- keep-history :true
125- on :
126- branch :release
127- condition :$DEPLOY_DOC = true
128- -provider :pages
129- repo :RustPython/demo
130- target-branch :master
131- local-dir :wasm/demo/dist
132- skip-cleanup :true
133- # Set in the settings page of your repository, as a secure variable
134- github-token :$WEBSITE_GITHUB_TOKEN
135- keep-history :true
136- on :
137- branch :release
138- condition :$DEPLOY_DEMO = true