@@ -14,7 +14,7 @@ concurrency:
14
14
15
15
env :
16
16
CARGO_ARGS : --features ssl,jit
17
- NON_WASM_PACKAGES : >
17
+ NON_WASM_PACKAGES : >-
18
18
-p rustpython-bytecode
19
19
-p rustpython-common
20
20
-p rustpython-compiler
52
52
fail-fast : false
53
53
steps :
54
54
- uses : actions/checkout@v2
55
- - uses : actions-rs/ toolchain@v1
55
+ - uses : dtolnay/rust- toolchain@stable
56
56
- name : Set up the Windows environment
57
57
shell : bash
58
58
run : |
@@ -64,26 +64,17 @@ jobs:
64
64
if : runner.os == 'macOS'
65
65
- uses : Swatinem/rust-cache@v1
66
66
- name : run rust tests
67
- uses : actions-rs/cargo@v1
68
- with :
69
- command : test
70
- args : --workspace --exclude rustpython_wasm --verbose ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
67
+ run : cargo test --workspace --exclude rustpython_wasm --verbose ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
71
68
- name : check compilation without threading
72
- uses : actions-rs/cargo@v1
73
- with :
74
- command : check
75
- args : ${{ env.CARGO_ARGS }} --no-default-features
69
+ run : cargo check ${{ env.CARGO_ARGS }} --no-default-features
76
70
77
71
- name : prepare AppleSilicon build
78
- uses : actions-rs/ toolchain@v1
72
+ uses : dtolnay/rust- toolchain@stable
79
73
with :
80
74
target : aarch64-apple-darwin
81
75
if : runner.os == 'macOS'
82
76
- name : Check compilation for Apple Silicon
83
- uses : actions-rs/cargo@v1
84
- with :
85
- command : check
86
- args : --target aarch64-apple-darwin
77
+ run : cargo check --target aarch64-apple-darwin
87
78
if : runner.os == 'macOS'
88
79
89
80
exotic_targets :
@@ -92,67 +83,49 @@ jobs:
92
83
steps :
93
84
- uses : actions/checkout@v2
94
85
95
- - uses : actions-rs/ toolchain@v1
86
+ - uses : dtolnay/rust- toolchain@stable
96
87
with :
97
88
target : i686-unknown-linux-gnu
98
89
99
90
- name : Install gcc-multilib and musl-tools
100
91
run : sudo apt-get update && sudo apt-get install gcc-multilib musl-tools
101
92
- name : Check compilation for x86 32bit
102
- uses : actions-rs/cargo@v1
103
- with :
104
- command : check
105
- args : --target i686-unknown-linux-gnu
93
+ run : cargo check --target i686-unknown-linux-gnu
106
94
107
- - uses : actions-rs/ toolchain@v1
95
+ - uses : dtolnay/rust- toolchain@stable
108
96
with :
109
97
target : aarch64-linux-android
110
98
111
99
- name : Check compilation for android
112
- uses : actions-rs/cargo@v1
113
- with :
114
- command : check
115
- args : --target aarch64-linux-android
100
+ run : cargo check --target aarch64-linux-android
116
101
117
- - uses : actions-rs/ toolchain@v1
102
+ - uses : dtolnay/rust- toolchain@stable
118
103
with :
119
104
target : i686-unknown-linux-musl
120
105
121
106
- name : Check compilation for musl
122
- uses : actions-rs/cargo@v1
123
- with :
124
- command : check
125
- args : --target i686-unknown-linux-musl
107
+ run : cargo check --target i686-unknown-linux-musl
126
108
127
- - uses : actions-rs/ toolchain@v1
109
+ - uses : dtolnay/rust- toolchain@stable
128
110
with :
129
111
target : x86_64-unknown-freebsd
130
112
131
113
- name : Check compilation for freebsd
132
- uses : actions-rs/cargo@v1
133
- with :
134
- command : check
135
- args : --target x86_64-unknown-freebsd
114
+ run : cargo check --target x86_64-unknown-freebsd
136
115
137
- - uses : actions-rs/ toolchain@v1
116
+ - uses : dtolnay/rust- toolchain@stable
138
117
with :
139
118
target : wasm32-unknown-unknown
140
119
141
120
- name : Check compilation for wasm32
142
- uses : actions-rs/cargo@v1
143
- with :
144
- command : check
145
- args : --target wasm32-unknown-unknown --no-default-features
121
+ run : cargo check --target wasm32-unknown-unknown --no-default-features
146
122
147
- - uses : actions-rs/ toolchain@v1
123
+ - uses : dtolnay/rust- toolchain@stable
148
124
with :
149
125
target : x86_64-unknown-freebsd
150
126
151
127
- name : Check compilation for freeBSD
152
- uses : actions-rs/cargo@v1
153
- with :
154
- command : check
155
- args : --target x86_64-unknown-freebsd
128
+ run : cargo check --target x86_64-unknown-freebsd
156
129
157
130
- name : Prepare repository for redox compilation
158
131
run : bash scripts/redox/uncomment-cargo.sh
@@ -173,7 +146,7 @@ jobs:
173
146
fail-fast : false
174
147
steps :
175
148
- uses : actions/checkout@v2
176
- - uses : actions-rs/ toolchain@v1
149
+ - uses : dtolnay/rust- toolchain@stable
177
150
- uses : actions/setup-python@v2
178
151
with :
179
152
python-version : " 3.10"
@@ -188,22 +161,12 @@ jobs:
188
161
if : runner.os == 'macOS'
189
162
- uses : Swatinem/rust-cache@v1
190
163
- name : build rustpython
191
- uses : actions-rs/cargo@v1
192
- with :
193
- command : build
194
- args : --release --verbose ${{ env.CARGO_ARGS }}
164
+ run : cargo build --release --verbose ${{ env.CARGO_ARGS }}
195
165
- uses : actions/setup-python@v2
196
166
with :
197
167
python-version : " 3.10"
198
- - name : Install pipenv
199
- run : |
200
- python -V
201
- python -m pip install --upgrade pip
202
- python -m pip install pipenv
203
- - run : pipenv install --python "3.10"
204
- working-directory : ./extra_tests
205
168
- name : run snippets
206
- run : pipenv run pytest -v
169
+ run : python -m pip install -r requirements.txt && pytest -v
207
170
working-directory : ./extra_tests
208
171
- if : runner.os == 'Linux'
209
172
name : run cpython platform-independent tests
@@ -244,26 +207,15 @@ jobs:
244
207
runs-on : ubuntu-latest
245
208
steps :
246
209
- uses : actions/checkout@v2
247
- - uses : actions-rs/ toolchain@v1
210
+ - uses : dtolnay/rust- toolchain@stable
248
211
with :
249
- profile : minimal
250
212
components : rustfmt, clippy
251
- override : true
252
213
- name : run rustfmt
253
- uses : actions-rs/cargo@v1
254
- with :
255
- command : fmt
256
- args : --all -- --check
214
+ run : cargo fmt --all -- --check
257
215
- name : run clippy
258
- uses : actions-rs/cargo@v1
259
- with :
260
- command : clippy
261
- args : ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} -- -Dwarnings
216
+ run : cargo clippy ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} -- -Dwarnings
262
217
- name : run clippy on wasm
263
- uses : actions-rs/cargo@v1
264
- with :
265
- command : clippy
266
- args : --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings
218
+ run : cargo clippy --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings
267
219
- uses : actions/setup-python@v2
268
220
with :
269
221
python-version : " 3.10"
@@ -281,12 +233,10 @@ jobs:
281
233
runs-on : ubuntu-latest
282
234
steps :
283
235
- uses : actions/checkout@v2
284
- - uses : actions-rs/ toolchain@v1
236
+ - uses : dtolnay/rust- toolchain@master
285
237
with :
286
- profile : minimal
287
238
toolchain : nightly
288
239
components : miri
289
- override : true
290
240
- uses : Swatinem/rust-cache@v1
291
241
- name : Run tests under miri
292
242
# miri-ignore-leaks because the type-object circular reference means that there will always be
@@ -299,7 +249,7 @@ jobs:
299
249
runs-on : ubuntu-latest
300
250
steps :
301
251
- uses : actions/checkout@v2
302
- - uses : actions-rs/ toolchain@v1
252
+ - uses : dtolnay/rust- toolchain@stable
303
253
- name : Cache cargo dependencies
304
254
uses : actions/cache@v2
305
255
with :
@@ -320,12 +270,7 @@ jobs:
320
270
- uses : actions/setup-python@v2
321
271
with :
322
272
python-version : " 3.10"
323
- - name : Install pipenv
324
- run : |
325
- python -V
326
- python -m pip install --upgrade pip
327
- python -m pip install pipenv
328
- - run : pipenv install
273
+ - run : python -m pip install -r requirements.txt
329
274
working-directory : ./wasm/tests
330
275
- uses : actions/setup-node@v1
331
276
- name : run test
@@ -355,11 +300,9 @@ jobs:
355
300
runs-on : ubuntu-latest
356
301
steps :
357
302
- uses : actions/checkout@v2
358
- - uses : actions-rs/ toolchain@v1
303
+ - uses : dtolnay/rust- toolchain@stable
359
304
with :
360
- toolchain : stable
361
305
target : wasm32-wasi
362
- override : true
363
306
- name : Setup Wasmer
364
307
uses : wasmerio/setup-wasmer@v1
365
308
- name : Install clang
@@ -375,9 +318,6 @@ jobs:
375
318
restore-keys : |
376
319
${{ runner.os }}-debug_opt3-${{ hashFiles('**/Cargo.lock') }}
377
320
- name : build rustpython
378
- uses : actions-rs/cargo@v1
379
- with :
380
- command : build
381
- args : --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose
321
+ run : cargo build --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose
382
322
- name : run snippets
383
323
run : wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- extra_tests/snippets/stdlib_random.py
0 commit comments