Skip to content

Commit e0bfd18

Browse files
Merge pull request #1184 from RustPython/master
Update demo with frozen stdlib
2 parents 89d0e7f + c786109 commit e0bfd18

File tree

338 files changed

+79468
-4461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+79468
-4461
lines changed

.dockerignore

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
target
2-
**/node_modules
1+
**/target/
2+
**/*.rs.bk
3+
**/*.bytecode
4+
**/__pycache__/*
5+
**/*.pytest_cache
6+
.*sw*
7+
.repl_history.txt
8+
.vscode
9+
wasm-pack.log
10+
.idea/
11+
tests/snippets/resources
12+
13+
flame-graph.html
14+
flame.txt
15+
flamescope.json
16+
17+
**/node_modules/
18+
wasm/**/dist/
19+
wasm/lib/pkg/

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ __pycache__
99
.vscode
1010
wasm-pack.log
1111
.idea/
12-
tests/snippets/resources
12+
tests/snippets/resources
13+
14+
flame-graph.html
15+
flame.txt
16+
flamescope.json

.travis.yml

Lines changed: 73 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,90 @@
1-
language: rust
2-
rust: stable
3-
cache: cargo
1+
before_cache: |
2+
if command -v cargo; then
3+
! command -v cargo-sweep && cargo install cargo-sweep
4+
cargo sweep -i
5+
cargo sweep -t 15
6+
fi
47
58
matrix:
69
fast_finish: true
710
include:
8-
- name: rust unittests and doctests
11+
- name: Run Rust tests
912
language: rust
1013
rust: stable
1114
cache: cargo
1215
script:
1316
- cargo build --verbose --all
1417
- cargo test --verbose --all
18+
env:
19+
# Prevention of cache corruption.
20+
# See: https://docs.travis-ci.com/user/caching/#caches-and-build-matrices
21+
- JOBCACHE=1
1522

1623
# To test the snippets, we use Travis' Python environment (because
1724
# installing rust ourselves is a lot easier than installing Python)
18-
- name: python test snippets
25+
- name: Python test snippets
1926
language: python
2027
python: 3.6
2128
cache:
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
29+
- pip
30+
- cargo
2831
env:
32+
- JOBCACHE=2
2933
- TRAVIS_RUST_VERSION=stable
3034
- CODE_COVERAGE=false
3135
script: tests/.travis-runner.sh
32-
- name: rustfmt
36+
37+
- name: Check Rust code style with rustfmt
3338
language: rust
3439
rust: stable
3540
cache: cargo
3641
before_script:
37-
- rustup component add rustfmt-preview
42+
- rustup component add rustfmt
3843
script:
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
4444
- cargo fmt --all -- --check
45-
- name: publish documentation
45+
env:
46+
- JOBCACHE=3
47+
48+
- name: Lint Rust code with clippy
49+
language: rust
50+
rust: stable
51+
cache: cargo
52+
before_script:
53+
- rustup component add clippy
54+
script:
55+
- cargo clippy --all -- -Dwarnings
56+
env:
57+
- JOBCACHE=8
58+
59+
- name: Lint Python code with flake8
60+
language: python
61+
python: 3.6
62+
cache: pip
63+
env: JOBCACHE=9
64+
install: pip install flake8
65+
script:
66+
flake8 . --count --exclude=./.*,./Lib,./vm/Lib --select=E9,F63,F7,F82
67+
--show-source --statistics
68+
69+
- name: Publish documentation
4670
language: rust
4771
rust: stable
4872
cache: cargo
4973
script:
5074
- cargo doc --no-deps --all
5175
if: branch = release
5276
env:
53-
- DEPLOY_DOC=true
77+
- JOBCACHE=4
78+
deploy:
79+
- provider: pages
80+
repo: RustPython/website
81+
target-branch: master
82+
local-dir: target/doc
83+
skip-cleanup: true
84+
# Set in the settings page of your repository, as a secure variable
85+
github-token: $WEBSITE_GITHUB_TOKEN
86+
keep-history: true
87+
5488
- name: WASM online demo
5589
language: rust
5690
rust: stable
@@ -65,42 +99,38 @@ matrix:
6599
- npm run dist
66100
if: branch = release
67101
env:
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
102+
- JOBCACHE=5
103+
deploy:
104+
- provider: pages
105+
repo: RustPython/demo
106+
target-branch: master
107+
local-dir: wasm/demo/dist
108+
skip-cleanup: true
109+
# Set in the settings page of your repository, as a secure variable
110+
github-token: $WEBSITE_GITHUB_TOKEN
111+
keep-history: true
112+
77113
- name: Code Coverage
78114
language: python
79115
python: 3.6
80116
cache:
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
117+
- pip
118+
- cargo
87119
script:
88120
- tests/.travis-runner.sh
89121
# Only do code coverage on master via a cron job.
90122
if: branch = master AND type = cron
91123
env:
124+
- JOBCACHE=6
92125
- TRAVIS_RUST_VERSION=nightly
93126
- CODE_COVERAGE=true
94-
- name: test WASM
127+
128+
- name: Test WASM
95129
language: python
96130
python: 3.6
97131
cache:
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
132+
- pip
133+
- cargo
104134
addons:
105135
firefox: latest
106136
install:
@@ -109,30 +139,5 @@ matrix:
109139
script:
110140
- wasm/tests/.travis-runner.sh
111141
env:
142+
- JOBCACHE=7
112143
- 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

0 commit comments

Comments
 (0)