1818 CARGO_ARGS : --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
1919 NON_WASM_PACKAGES : >-
2020 -p rustpython-common
21- -p rustpython-compiler-core
2221 -p rustpython-compiler
2322 -p rustpython-codegen
24- -p rustpython-parser
2523 -p rustpython-vm
2624 -p rustpython-stdlib
2725 -p rustpython-jit
@@ -105,19 +103,13 @@ jobs:
105103 env :
106104 RUST_BACKTRACE : full
107105 name : Run rust tests
108- needs : lalrpop
109106 runs-on : ${{ matrix.os }}
110107 strategy :
111108 matrix :
112109 os : [macos-latest, ubuntu-latest, windows-latest]
113110 fail-fast : false
114111 steps :
115112 - uses : actions/checkout@v3
116- - name : Cache generated parser
117- uses : actions/cache@v3
118- with :
119- path : compiler/parser/python.rs
120- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
121113 - uses : dtolnay/rust-toolchain@stable
122114 with :
123115 components : clippy
@@ -167,16 +159,9 @@ jobs:
167159 exotic_targets :
168160 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
169161 name : Ensure compilation on various targets
170- needs : lalrpop
171162 runs-on : ubuntu-latest
172163 steps :
173164 - uses : actions/checkout@v3
174- - name : Cache generated parser
175- uses : actions/cache@v3
176- with :
177- path : compiler/parser/python.rs
178- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
179-
180165 - uses : dtolnay/rust-toolchain@stable
181166 with :
182167 target : i686-unknown-linux-gnu
@@ -239,7 +224,6 @@ jobs:
239224
240225 snippets_cpython :
241226 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
242- needs : lalrpop
243227 env :
244228 RUST_BACKTRACE : full
245229 name : Run snippets and cpython tests
@@ -250,12 +234,6 @@ jobs:
250234 fail-fast : false
251235 steps :
252236 - 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-
259237 - uses : dtolnay/rust-toolchain@stable
260238 - uses : actions/setup-python@v4
261239 with :
@@ -316,50 +294,11 @@ jobs:
316294 - name : Check whats_left is not broken
317295 run : python -I whats_left.py
318296
319- lalrpop :
320- if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
321- name : Generate parser with lalrpop
322- strategy :
323- matrix :
324- os : [ubuntu-latest, windows-latest]
325- runs-on : ${{ matrix.os }}
326- steps :
327- - uses : actions/checkout@v3
328- - name : Cache generated parser
329- uses : actions/cache@v3
330- with :
331- path : compiler/parser/python.rs
332- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
333- - name : Check if cached generated parser exists
334- id : generated_parser
335- uses : andstor/file-existence-action@v2
336- with :
337- files : " compiler/parser/python.rs"
338- - if : runner.os == 'Windows'
339- name : Force python.lalrpop to be lf # actions@checkout ignore .gitattributes
340- run : |
341- set file compiler/parser/python.lalrpop; ((Get-Content $file) -join "`n") + "`n" | Set-Content -NoNewline $file
342- - name : Install lalrpop
343- if : steps.generated_parser.outputs.files_exists == 'false'
344- uses : baptiste0928/cargo-install@v2
345- with :
346- crate : lalrpop
347- version : " 0.19.9"
348- - name : Run lalrpop
349- if : steps.generated_parser.outputs.files_exists == 'false'
350- run : lalrpop compiler/parser/python.lalrpop
351-
352297 lint :
353298 name : Check Rust code with rustfmt and clippy
354- needs : lalrpop
355299 runs-on : ubuntu-latest
356300 steps :
357301 - uses : actions/checkout@v3
358- - name : Cache generated parser
359- uses : actions/cache@v3
360- with :
361- path : compiler/parser/python.rs
362- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
363302 - uses : dtolnay/rust-toolchain@stable
364303 with :
365304 components : rustfmt, clippy
@@ -372,28 +311,22 @@ jobs:
372311 python-version : " 3.11"
373312 - name : install ruff
374313 run : python -m pip install ruff
375- - name : run lint
376- run : ruff extra_tests wasm examples compiler/ast --exclude='./.*',./Lib,./vm/Lib,./benches/ --select=E9,F63,F7,F82 --show-source
314+ - name : run python lint
315+ run : ruff extra_tests wasm examples --exclude='./.*',./Lib,./vm/Lib,./benches/ --select=E9,F63,F7,F82 --show-source
377316 - name : install prettier
378317 run : yarn global add prettier && echo "$(yarn global bin)" >>$GITHUB_PATH
379318 - name : check wasm code with prettier
380319 # prettier doesn't handle ignore files very well: https://github.com/prettier/prettier/issues/8506
381320 run : cd wasm && git ls-files -z | xargs -0 prettier --check -u
382- - name : Check update_asdl.sh consistency
383- run : bash scripts/update_asdl.sh && git diff --exit-code
321+ # - name: Check update_asdl.sh consistency
322+ # run: bash scripts/update_asdl.sh && git diff --exit-code
384323
385324 miri :
386325 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
387326 name : Run tests under miri
388- needs : lalrpop
389327 runs-on : ubuntu-latest
390328 steps :
391329 - uses : actions/checkout@v3
392- - name : Cache generated parser
393- uses : actions/cache@v3
394- with :
395- path : compiler/parser/python.rs
396- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
397330 - uses : dtolnay/rust-toolchain@master
398331 with :
399332 toolchain : nightly
@@ -408,15 +341,9 @@ jobs:
408341 wasm :
409342 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
410343 name : Check the WASM package and demo
411- needs : lalrpop
412344 runs-on : ubuntu-latest
413345 steps :
414346 - uses : actions/checkout@v3
415- - name : Cache generated parser
416- uses : actions/cache@v3
417- with :
418- path : compiler/parser/python.rs
419- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
420347 - uses : dtolnay/rust-toolchain@stable
421348
422349 - uses : Swatinem/rust-cache@v2
@@ -462,15 +389,9 @@ jobs:
462389 wasm-wasi :
463390 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
464391 name : Run snippets and cpython tests on wasm-wasi
465- needs : lalrpop
466392 runs-on : ubuntu-latest
467393 steps :
468394 - uses : actions/checkout@v3
469- - name : Cache generated parser
470- uses : actions/cache@v3
471- with :
472- path : compiler/parser/python.rs
473- key : lalrpop-${{ hashFiles('compiler/parser/python.lalrpop') }}
474395 - uses : dtolnay/rust-toolchain@stable
475396 with :
476397 target : wasm32-wasi
0 commit comments