Skip to content

Commit a916367

Browse files
committed
Merge branch 'main' into ruff-parser
2 parents 16ac422 + a596568 commit a916367

261 files changed

Lines changed: 8824 additions & 4141 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/universal:2",
3-
"features": {
4-
"ghcr.io/devcontainers/features/rust:1": {}
5-
}
6-
}
2+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
3+
"onCreateCommand": "curl https://sh.rustup.rs -sSf | sh -s -- -y"
4+
}

.github/workflows/ci.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
types: [unlabeled, opened, synchronize, reopened]
66
merge_group:
7+
workflow_dispatch:
78

89
name: CI
910

@@ -15,7 +16,7 @@ concurrency:
1516
cancel-in-progress: true
1617

1718
env:
18-
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,sqlite,ssl
19+
CARGO_ARGS: --no-default-features --features stdlib,importlib,encodings,sqlite,ssl
1920
# Skip additional tests on Windows. They are checked on Linux and MacOS.
2021
# test_glob: many failing tests
2122
# test_io: many failing tests
@@ -360,15 +361,18 @@ jobs:
360361
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
361362
- name: install geckodriver
362363
run: |
363-
wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
364+
wget https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz
364365
mkdir geckodriver
365-
tar -xzf geckodriver-v0.34.0-linux64.tar.gz -C geckodriver
366+
tar -xzf geckodriver-v0.36.0-linux64.tar.gz -C geckodriver
366367
- uses: actions/setup-python@v5
367368
with:
368369
python-version: ${{ env.PYTHON_VERSION }}
369370
- run: python -m pip install -r requirements.txt
370371
working-directory: ./wasm/tests
371372
- uses: actions/setup-node@v4
373+
with:
374+
cache: "npm"
375+
cache-dependency-path: "wasm/demo/package-lock.json"
372376
- name: run test
373377
run: |
374378
export PATH=$PATH:`pwd`/../../geckodriver
@@ -378,7 +382,7 @@ jobs:
378382
NODE_OPTIONS: "--openssl-legacy-provider"
379383
working-directory: ./wasm/demo
380384
- uses: mwilliamson/setup-wabt-action@v3
381-
with: { wabt-version: "1.0.30" }
385+
with: { wabt-version: "1.0.36" }
382386
- name: check wasm32-unknown without js
383387
run: |
384388
cd wasm/wasm-unknown-test

.github/workflows/cron-ci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ on:
22
schedule:
33
- cron: '0 0 * * 6'
44
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/cron-ci.yaml
58

69
name: Periodic checks/tasks
710

811
env:
9-
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
12+
CARGO_ARGS: --no-default-features --features stdlib,importlib,encodings,ssl,jit
1013
PYTHON_VERSION: "3.13.1"
1114

1215
jobs:
@@ -24,7 +27,7 @@ jobs:
2427
python-version: ${{ env.PYTHON_VERSION }}
2528
- run: sudo apt-get update && sudo apt-get -y install lcov
2629
- name: Run cargo-llvm-cov with Rust tests.
27-
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --verbose --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
30+
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --verbose --no-default-features --features stdlib,importlib,encodings,ssl,jit
2831
- name: Run cargo-llvm-cov with Python snippets.
2932
run: python scripts/cargo-llvm-cov.py
3033
continue-on-error: true
@@ -97,9 +100,9 @@ jobs:
97100
cd website
98101
[ -f ./_data/whats_left.temp ] && cp ./_data/whats_left.temp ./_data/whats_left_lastrun.temp
99102
cp ../whats_left.temp ./_data/whats_left.temp
100-
rm _data/whats_left/modules.csv
101-
cat _data/whats_left.temp | grep "(entire module)" | cut -d ' ' -f 1 | sort >> ../_data/whats_left/modules.csv
102-
103+
rm ./_data/whats_left/modules.csv
104+
echo -e "module" > ./_data/whats_left/modules.csv
105+
cat ./_data/whats_left.temp | grep "(entire module)" | cut -d ' ' -f 1 | sort >> ./_data/whats_left/modules.csv
103106
git add -A
104107
if git -c user.name="Github Actions" -c user.email="actions@github.com" commit -m "Update what is left results" --author="$GITHUB_ACTOR"; then
105108
git push

.github/workflows/release.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
contents: write
1717

1818
env:
19-
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,sqlite,ssl
19+
CARGO_ARGS: --no-default-features --features stdlib,importlib,encodings,sqlite,ssl
2020

2121
jobs:
2222
build:
@@ -89,10 +89,8 @@ jobs:
8989
steps:
9090
- uses: actions/checkout@v4
9191
- uses: dtolnay/rust-toolchain@stable
92-
93-
- name: Set up Environment
94-
shell: bash
95-
run: rustup target add wasm32-wasip1
92+
with:
93+
targets: wasm32-wasip1
9694

9795
- name: Build RustPython
9896
run: cargo build --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib --release
@@ -106,6 +104,34 @@ jobs:
106104
name: rustpython-release-wasm32-wasip1
107105
path: target/rustpython-release-wasm32-wasip1.wasm
108106

107+
- name: install wasm-pack
108+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
109+
- uses: actions/setup-node@v4
110+
- uses: mwilliamson/setup-wabt-action@v3
111+
with: { wabt-version: "1.0.30" }
112+
- name: build demo
113+
run: |
114+
npm install
115+
npm run dist
116+
env:
117+
NODE_OPTIONS: "--openssl-legacy-provider"
118+
working-directory: ./wasm/demo
119+
- name: build notebook demo
120+
run: |
121+
npm install
122+
npm run dist
123+
mv dist ../demo/dist/notebook
124+
env:
125+
NODE_OPTIONS: "--openssl-legacy-provider"
126+
working-directory: ./wasm/notebook
127+
- name: Deploy demo to Github Pages
128+
uses: peaceiris/actions-gh-pages@v4
129+
with:
130+
deploy_key: ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
131+
publish_dir: ./wasm/demo/dist
132+
external_repository: RustPython/demo
133+
publish_branch: master
134+
109135
release:
110136
runs-on: ubuntu-latest
111137
needs: [build, build-wasm]
@@ -142,4 +168,4 @@ jobs:
142168
--target="$tag" \
143169
--generate-notes \
144170
$PRERELEASE_ARG \
145-
bin/rustpython-release-*
171+
bin/rustpython-release-*

Cargo.lock

Lines changed: 36 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)