Skip to content

Commit 1f02cc0

Browse files
committed
Squash all demo commits onto one branch
2 parents 4c5b584 + 8303743 commit 1f02cc0

34 files changed

+3650
-471
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/target
2-
wasm/target
32
**/*.rs.bk
43
**/*.bytecode
54
__pycache__

.travis.yml

Lines changed: 80 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
language: rust
32

43
rust:
@@ -7,102 +6,106 @@ rust:
76
- nightly
87

98
script:
10-
- cargo build --verbose --all
11-
- cargo test --verbose --all
9+
- cargo build --verbose --all
10+
- cargo test --verbose --all
1211

1312
env:
14-
# This is used to only capture the regular nightly test in allow_failures
15-
- REGULAR_TEST=true
13+
# This is used to only capture the regular nightly test in allow_failures
14+
- REGULAR_TEST=true
1615

1716
cache: cargo
1817

1918
matrix:
20-
include:
21-
# To test the snippets, we use Travis' Python environment (because
22-
# installing rust ourselves is a lot easier than installing Python)
23-
- language: python
24-
python: 3.6
25-
cache:
26-
pip: true
27-
# Because we're using the Python Travis environment, we can't use
28-
# the built-in cargo cacher
29-
directories:
30-
- /home/travis/.cargo
31-
- target
32-
env:
33-
- TRAVIS_RUST_VERSION=stable
34-
- REGULAR_TEST=false
35-
script: tests/.travis-runner.sh
36-
- language: python
37-
python: 3.6
38-
cache:
39-
pip: true
40-
# Because we're using the Python Travis environment, we can't use
41-
# the built-in cargo cacher
42-
directories:
43-
- /home/travis/.cargo
44-
- target
45-
env:
46-
- TRAVIS_RUST_VERSION=beta
47-
- REGULAR_TEST=false
48-
script: tests/.travis-runner.sh
49-
- name: rustfmt
50-
language: rust
51-
rust: stable
52-
cache: cargo
53-
before_script:
54-
- rustup component add rustfmt-preview
55-
script:
56-
# Code references the generated python.rs, so put something in
57-
# place to make `cargo fmt` happy. (We use `echo` rather than
58-
# `touch` because rustfmt complains about the empty file touch
59-
# creates.)
60-
- echo > parser/src/python.rs
61-
- cargo fmt --all -- --check
62-
env:
63-
- REGULAR_TEST=false
64-
- name: publish documentation
65-
language: rust
66-
rust: stable
67-
cache: cargo
68-
script:
69-
- cargo doc --no-deps --all
70-
if: branch = release
71-
env:
72-
- REGULAR_TEST=false
73-
- name: WASM online demo
74-
language: rust
75-
rust: nightly
76-
cache: cargo
77-
install:
78-
- nvm install node
79-
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh # install wasm-pack
80-
script:
81-
- cd wasm
82-
- bash release.sh
83-
if: branch = release
84-
env:
85-
- REGULAR_TEST=false
86-
allow_failures:
87-
- rust: nightly
88-
env: REGULAR_TEST=true
19+
include:
20+
# To test the snippets, we use Travis' Python environment (because
21+
# installing rust ourselves is a lot easier than installing Python)
22+
- language: python
23+
python: 3.6
24+
cache:
25+
pip: true
26+
# Because we're using the Python Travis environment, we can't use
27+
# the built-in cargo cacher
28+
directories:
29+
- /home/travis/.cargo
30+
- target
31+
env:
32+
- TRAVIS_RUST_VERSION=stable
33+
- REGULAR_TEST=false
34+
script: tests/.travis-runner.sh
35+
- language: python
36+
python: 3.6
37+
cache:
38+
pip: true
39+
# Because we're using the Python Travis environment, we can't use
40+
# the built-in cargo cacher
41+
directories:
42+
- /home/travis/.cargo
43+
- target
44+
env:
45+
- TRAVIS_RUST_VERSION=beta
46+
- REGULAR_TEST=false
47+
script: tests/.travis-runner.sh
48+
- name: rustfmt
49+
language: rust
50+
rust: stable
51+
cache: cargo
52+
before_script:
53+
- rustup component add rustfmt-preview
54+
script:
55+
# Code references the generated python.rs, so put something in
56+
# place to make `cargo fmt` happy. (We use `echo` rather than
57+
# `touch` because rustfmt complains about the empty file touch
58+
# creates.)
59+
- echo > parser/src/python.rs
60+
- cargo fmt --all -- --check
61+
env:
62+
- REGULAR_TEST=false
63+
- name: publish documentation
64+
language: rust
65+
rust: stable
66+
cache: cargo
67+
script:
68+
- cargo doc --no-deps --all
69+
if: branch = release
70+
env:
71+
- REGULAR_TEST=false
72+
- name: WASM online demo
73+
language: rust
74+
rust: nightly
75+
cache: cargo
76+
install:
77+
- nvm install node
78+
# install wasm-pack
79+
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
80+
script:
81+
- cd wasm/demo
82+
- npm install
83+
- npm run dist
84+
if: branch = release
85+
env:
86+
- REGULAR_TEST=false
87+
allow_failures:
88+
- rust: nightly
89+
env: REGULAR_TEST=true
8990

9091
deploy:
9192
- provider: pages
9293
repo: RustPython/website
9394
target-branch: master
9495
local-dir: target/doc
9596
skip-cleanup: true
96-
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
97+
# Set in the settings page of your repository, as a secure variable
98+
github-token: $WEBSITE_GITHUB_TOKEN
9799
keep-history: true
98100
on:
99101
branch: release
100102
- provider: pages
101103
repo: RustPython/demo
102104
target-branch: master
103-
local-dir: wasm/app/dist
105+
local-dir: wasm/demo/dist
104106
skip-cleanup: true
105-
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
107+
# Set in the settings page of your repository, as a secure variable
108+
github-token: $WEBSITE_GITHUB_TOKEN
106109
keep-history: true
107110
on:
108111
branch: release

0 commit comments

Comments
 (0)