@@ -15,18 +15,10 @@ concurrency:
15
15
cancel-in-progress : true
16
16
17
17
env :
18
- CARGO_ARGS : --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
19
18
NON_WASM_PACKAGES : >-
20
19
-p rustpython-common
21
20
-p rustpython-compiler-core
22
- -p rustpython-compiler
23
- -p rustpython-codegen
24
21
-p rustpython-parser
25
- -p rustpython-vm
26
- -p rustpython-stdlib
27
- -p rustpython-jit
28
- -p rustpython-derive
29
- -p rustpython
30
22
PLATFORM_INDEPENDENT_TESTS : >-
31
23
test_argparse
32
24
test_array
@@ -137,12 +129,7 @@ jobs:
137
129
run : cargo clippy ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} -- -Dwarnings
138
130
139
131
- name : run rust tests
140
- run : cargo test --workspace --exclude rustpython_wasm --verbose --features threading ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
141
- if : runner.os != 'macOS'
142
- # temp skip ssl linking for Mac to avoid CI failure
143
- - name : run rust tests (MacOS no ssl)
144
- run : cargo test --workspace --exclude rustpython_wasm --verbose --no-default-features --features threading,stdlib,zlib,importlib,encodings,jit ${{ env.NON_WASM_PACKAGES }}
145
- if : runner.os == 'macOS'
132
+ run : cargo test --workspace --verbose --features threading ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
146
133
147
134
- name : check compilation without threading
148
135
run : cargo check ${{ env.CARGO_ARGS }}
@@ -221,7 +208,7 @@ jobs:
221
208
target : wasm32-unknown-unknown
222
209
223
210
- name : Check compilation for wasm32
224
- run : cargo check --target wasm32-unknown-unknown --no-default-features
211
+ run : cargo check --target wasm32-unknown-unknown
225
212
226
213
- uses : dtolnay/rust-toolchain@stable
227
214
with :
@@ -237,80 +224,80 @@ jobs:
237
224
with :
238
225
command : check
239
226
240
- snippets_cpython :
241
- if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
242
- needs : lalrpop
243
- env :
244
- RUST_BACKTRACE : full
245
- name : Run snippets and cpython tests
246
- runs-on : ${{ matrix.os }}
247
- strategy :
248
- matrix :
249
- os : [macos-latest, ubuntu-latest, windows-latest]
250
- fail-fast : false
251
- steps :
252
- - uses : actions/checkout@v3
253
- - name : Cache generated parser
254
- uses : actions/cache@v3
255
- with :
256
- path : compiler/parser/python.rs
257
- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
258
-
259
- - uses : dtolnay/rust-toolchain@stable
260
- - uses : actions/setup-python@v4
261
- with :
262
- python-version : " 3.11"
263
- - name : Set up the Windows environment
264
- shell : bash
265
- run : |
266
- choco install llvm openssl
267
- echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >>$GITHUB_ENV
268
- if : runner.os == 'Windows'
269
- - name : Set up the Mac environment
270
- run : brew install autoconf automake libtool openssl@3
271
- if : runner.os == 'macOS'
272
-
273
- - uses : Swatinem/rust-cache@v2
274
- - name : build rustpython
275
- run : cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }}
276
- - uses : actions/setup-python@v4
277
- with :
278
- python-version : " 3.11"
279
- - name : run snippets
280
- run : python -m pip install -r requirements.txt && pytest -v
281
- working-directory : ./extra_tests
282
- - if : runner.os == 'Linux'
283
- name : run cpython platform-independent tests
284
- run :
285
- target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v ${{ env.PLATFORM_INDEPENDENT_TESTS }}
286
- - if : runner.os != 'Windows'
287
- name : run cpython platform-dependent tests
288
- run : target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
289
- - if : runner.os == 'Windows'
290
- name : run cpython platform-dependent tests (windows partial - fixme)
291
- run :
292
- target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
293
- test_glob
294
- test_importlib
295
- test_io
296
- test_iter
297
- test_os
298
- test_pathlib
299
- test_posixpath
300
- test_shutil
301
- test_venv
302
- - if : runner.os != 'Windows'
303
- name : check that --install-pip succeeds
304
- run : |
305
- mkdir site-packages
306
- target/release/rustpython --install-pip ensurepip --user
307
- - if : runner.os != 'Windows'
308
- name : Check that ensurepip succeeds.
309
- run : |
310
- target/release/rustpython -m ensurepip
311
- target/release/rustpython -c "import pip"
312
- - name : Check whats_left is not broken
313
- run : python -I whats_left.py
227
+ # snippets_cpython:
228
+ # if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
229
+ # needs: lalrpop
230
+ # env:
231
+ # RUST_BACKTRACE: full
232
+ # name: Run snippets and cpython tests
233
+ # runs-on: ${{ matrix.os }}
234
+ # strategy:
235
+ # matrix:
236
+ # os: [macos-latest, ubuntu-latest, windows-latest]
237
+ # fail-fast: false
238
+ # steps:
239
+ # - uses: actions/checkout@v3
240
+ # - name: Cache generated parser
241
+ # uses: actions/cache@v3
242
+ # with:
243
+ # path: compiler/parser/python.rs
244
+ # key: lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
245
+ #
246
+ # - uses: dtolnay/rust-toolchain@stable
247
+ # - uses: actions/setup-python@v4
248
+ # with:
249
+ # python-version: "3.11"
250
+ # - name: Set up the Windows environment
251
+ # shell: bash
252
+ # run: |
253
+ # choco install llvm openssl
254
+ # echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >>$GITHUB_ENV
255
+ # if: runner.os == 'Windows'
256
+ # - name: Set up the Mac environment
257
+ # run: brew install autoconf automake libtool openssl@3
258
+ # if: runner.os == 'macOS'
259
+ #
260
+ # - uses: Swatinem/rust-cache@v2
261
+ # - name: build rustpython
262
+ # run: cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }}
263
+ # - uses: actions/setup-python@v4
264
+ # with:
265
+ # python-version: "3.11"
266
+ # - name: run snippets
267
+ # run: python -m pip install -r requirements.txt && pytest -v
268
+ # working-directory: ./extra_tests
269
+ # - if: runner.os == 'Linux'
270
+ # name: run cpython platform-independent tests
271
+ # run:
272
+ # target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v ${{ env.PLATFORM_INDEPENDENT_TESTS }}
273
+ # - if: runner.os != 'Windows'
274
+ # name: run cpython platform-dependent tests
275
+ # run: target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
276
+ # - if: runner.os == 'Windows'
277
+ # name: run cpython platform-dependent tests (windows partial - fixme)
278
+ # run:
279
+ # target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }}
280
+ # test_glob
281
+ # test_importlib
282
+ # test_io
283
+ # test_iter
284
+ # test_os
285
+ # test_pathlib
286
+ # test_posixpath
287
+ # test_shutil
288
+ # test_venv
289
+ # - if: runner.os != 'Windows'
290
+ # name: check that --install-pip succeeds
291
+ # run: |
292
+ # mkdir site-packages
293
+ # target/release/rustpython --install-pip ensurepip --user
294
+ # - if: runner.os != 'Windows'
295
+ # name: Check that ensurepip succeeds.
296
+ # run: |
297
+ # target/release/rustpython -m ensurepip
298
+ # target/release/rustpython -c "import pip"
299
+ # - name: Check whats_left is not broken
300
+ # run: python -I whats_left.py
314
301
315
302
lalrpop :
316
303
if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
@@ -361,8 +348,8 @@ jobs:
361
348
components : rustfmt, clippy
362
349
- name : run rustfmt
363
350
run : cargo fmt --all -- --check
364
- - name : run clippy on wasm
365
- run : cargo clippy --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings
351
+ # - name: run clippy on wasm
352
+ # run: cargo clippy --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings
366
353
- uses : actions/setup-python@v4
367
354
with :
368
355
python-version : " 3.11"
@@ -397,86 +384,84 @@ jobs:
397
384
398
385
- uses : Swatinem/rust-cache@v2
399
386
- name : Run tests under miri
400
- # miri-ignore-leaks because the type-object circular reference means that there will always be
401
- # a memory leak, at least until we have proper cyclic gc
402
- run : MIRIFLAGS='-Zmiri-ignore-leaks' cargo +nightly miri test -p rustpython-vm -- miri_test
403
-
404
- wasm :
405
- if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
406
- name : Check the WASM package and demo
407
- needs : lalrpop
408
- runs-on : ubuntu-latest
409
- steps :
410
- - uses : actions/checkout@v3
411
- - name : Cache generated parser
412
- uses : actions/cache@v3
413
- with :
414
- path : compiler/parser/python.rs
415
- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
416
- - uses : dtolnay/rust-toolchain@stable
417
-
418
- - uses : Swatinem/rust-cache@v2
419
- - name : install wasm-pack
420
- run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
421
- - name : install geckodriver
422
- run : |
423
- wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
424
- mkdir geckodriver
425
- tar -xzf geckodriver-v0.30.0-linux64.tar.gz -C geckodriver
426
- - uses : actions/setup-python@v4
427
- with :
428
- python-version : " 3.11"
429
- - run : python -m pip install -r requirements.txt
430
- working-directory : ./wasm/tests
431
- - uses : actions/setup-node@v3
432
- - name : run test
433
- run : |
434
- export PATH=$PATH:`pwd`/../../geckodriver
435
- npm install
436
- npm run test
437
- env :
438
- NODE_OPTIONS : " --openssl-legacy-provider"
439
- working-directory : ./wasm/demo
440
- - name : build notebook demo
441
- if : github.ref == 'refs/heads/release'
442
- run : |
443
- npm install
444
- npm run dist
445
- mv dist ../demo/dist/notebook
446
- env :
447
- NODE_OPTIONS : " --openssl-legacy-provider"
448
- working-directory : ./wasm/notebook
449
- - name : Deploy demo to Github Pages
450
- if : success() && github.ref == 'refs/heads/release'
451
- uses : peaceiris/actions-gh-pages@v2
452
- env :
453
- ACTIONS_DEPLOY_KEY : ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
454
- PUBLISH_DIR : ./wasm/demo/dist
455
- EXTERNAL_REPOSITORY : RustPython/demo
456
- PUBLISH_BRANCH : master
457
-
458
- wasm-wasi :
459
- if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
460
- name : Run snippets and cpython tests on wasm-wasi
461
- needs : lalrpop
462
- runs-on : ubuntu-latest
463
- steps :
464
- - uses : actions/checkout@v3
465
- - name : Cache generated parser
466
- uses : actions/cache@v3
467
- with :
468
- path : compiler/parser/python.rs
469
- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
470
- - uses : dtolnay/rust-toolchain@stable
471
- with :
472
- target : wasm32-wasi
473
-
474
- - uses : Swatinem/rust-cache@v2
475
- - name : Setup Wasmer
476
- uses : wasmerio/setup-wasmer@v2
477
- - name : Install clang
478
- run : sudo apt-get update && sudo apt-get install clang -y
479
- - name : build rustpython
480
- run : cargo build --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose
481
- - name : run snippets
482
- run : wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- extra_tests/snippets/stdlib_random.py
387
+ run : cargo +nightly miri test -p rustpython-parser -- miri_test
388
+
389
+ # wasm:
390
+ # if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
391
+ # name: Check the WASM package and demo
392
+ # needs: lalrpop
393
+ # runs-on: ubuntu-latest
394
+ # steps:
395
+ # - uses: actions/checkout@v3
396
+ # - name: Cache generated parser
397
+ # uses: actions/cache@v3
398
+ # with:
399
+ # path: compiler/parser/python.rs
400
+ # key: lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
401
+ # - uses: dtolnay/rust-toolchain@stable
402
+ #
403
+ # - uses: Swatinem/rust-cache@v2
404
+ # - name: install wasm-pack
405
+ # run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
406
+ # - name: install geckodriver
407
+ # run: |
408
+ # wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
409
+ # mkdir geckodriver
410
+ # tar -xzf geckodriver-v0.30.0-linux64.tar.gz -C geckodriver
411
+ # - uses: actions/setup-python@v4
412
+ # with:
413
+ # python-version: "3.11"
414
+ # - run: python -m pip install -r requirements.txt
415
+ # working-directory: ./wasm/tests
416
+ # - uses: actions/setup-node@v3
417
+ # - name: run test
418
+ # run: |
419
+ # export PATH=$PATH:`pwd`/../../geckodriver
420
+ # npm install
421
+ # npm run test
422
+ # env:
423
+ # NODE_OPTIONS: "--openssl-legacy-provider"
424
+ # working-directory: ./wasm/demo
425
+ # - name: build notebook demo
426
+ # if: github.ref == 'refs/heads/release'
427
+ # run: |
428
+ # npm install
429
+ # npm run dist
430
+ # mv dist ../demo/dist/notebook
431
+ # env:
432
+ # NODE_OPTIONS: "--openssl-legacy-provider"
433
+ # working-directory: ./wasm/notebook
434
+ # - name: Deploy demo to Github Pages
435
+ # if: success() && github.ref == 'refs/heads/release'
436
+ # uses: peaceiris/actions-gh-pages@v2
437
+ # env:
438
+ # ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
439
+ # PUBLISH_DIR: ./wasm/demo/dist
440
+ # EXTERNAL_REPOSITORY: RustPython/demo
441
+ # PUBLISH_BRANCH: master
442
+ #
443
+ # wasm-wasi:
444
+ # if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
445
+ # name: Run snippets and cpython tests on wasm-wasi
446
+ # needs: lalrpop
447
+ # runs-on: ubuntu-latest
448
+ # steps:
449
+ # - uses: actions/checkout@v3
450
+ # - name: Cache generated parser
451
+ # uses: actions/cache@v3
452
+ # with:
453
+ # path: compiler/parser/python.rs
454
+ # key: lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
455
+ # - uses: dtolnay/rust-toolchain@stable
456
+ # with:
457
+ # target: wasm32-wasi
458
+ #
459
+ # - uses: Swatinem/rust-cache@v2
460
+ # - name: Setup Wasmer
461
+ # uses: wasmerio/setup-wasmer@v2
462
+ # - name: Install clang
463
+ # run: sudo apt-get update && sudo apt-get install clang -y
464
+ # - name: build rustpython
465
+ # run: cargo build --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose
466
+ # - name: run snippets
467
+ # run: wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- extra_tests/snippets/stdlib_random.py
0 commit comments