Commit 522ac1c 2 people authored and committed
1 parent 47540b8 commit 522ac1c Copy full SHA for 522ac1c
File tree 2 files changed +62
-3
lines changed
2 files changed +62
-3
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,58 @@ jobs:
318
318
# 1.49.
319
319
CARGO_PRIMARY_PACKAGE : 1
320
320
321
+ valgrind :
322
+ needs : [fmt]
323
+ runs-on : ubuntu-latest
324
+ steps :
325
+ - uses : actions/checkout@v3
326
+ - uses : actions/setup-python@v4
327
+ with :
328
+ python-version : " 3.10"
329
+ - uses : Swatinem/rust-cache@v1
330
+ with :
331
+ key : cargo-valgrind
332
+ continue-on-error : true
333
+ - uses : actions-rs/toolchain@v1
334
+ with :
335
+ # FIXME(adamreichold): Switch to stable when Valgrind understands DWARF5 as generated by LLVM 14,
336
+ # c.f. https://bugs.kde.org/show_bug.cgi?id=452758#c35
337
+ toolchain : 1.61.0
338
+ override : true
339
+ profile : minimal
340
+ - uses : taiki-e/install-action@valgrind
341
+ - run : python -m pip install -U pip nox
342
+ - run : nox -s test-rust -- release skip-full
343
+ env :
344
+ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER : valgrind --leak-check=no --error-exitcode=1
345
+ RUST_BACKTRACE : 1
346
+ TRYBUILD : overwrite
347
+
348
+ careful :
349
+ needs : [fmt]
350
+ runs-on : ubuntu-latest
351
+ steps :
352
+ - uses : actions/checkout@v3
353
+ - uses : actions/setup-python@v4
354
+ with :
355
+ python-version : " 3.10"
356
+ - uses : Swatinem/rust-cache@v1
357
+ with :
358
+ key : cargo-careful
359
+ continue-on-error : true
360
+ - uses : actions-rs/toolchain@v1
361
+ with :
362
+ toolchain : nightly
363
+ override : true
364
+ profile : minimal
365
+ components : rust-src
366
+ - run : cargo install cargo-careful
367
+ - run : python -m pip install -U pip nox
368
+ - run : nox -s test-rust -- careful skip-full
369
+ env :
370
+ RUST_BACKTRACE : 1
371
+ TRYBUILD : overwrite
372
+
321
373
coverage :
322
374
needs : [fmt]
323
375
name : coverage-${{ matrix.os }}
Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ def test_rust(session: nox.Session):
27
27
28
28
_run_cargo_test (session )
29
29
_run_cargo_test (session , features = "abi3" )
30
- _run_cargo_test (session , features = "full" )
31
- _run_cargo_test (session , features = "abi3 full" )
30
+ if not "skip-full" in session .posargs :
31
+ _run_cargo_test (session , features = "full" )
32
+ _run_cargo_test (session , features = "abi3 full" )
32
33
33
34
34
35
@nox .session (name = "test-py" , venv_backend = "none" )
@@ -235,6 +236,7 @@ def address_sanitizer(session: nox.Session):
235
236
"cargo" ,
236
237
"+nightly" ,
237
238
"test" ,
239
+ "-Zbuild-std" ,
238
240
f"--target={ _get_rust_target ()} " ,
239
241
"--" ,
240
242
"--test-threads=1" ,
@@ -289,7 +291,12 @@ def _run_cargo_test(
289
291
package : Optional [str ] = None ,
290
292
features : Optional [str ] = None ,
291
293
) -> None :
292
- command = ["cargo" , "test" ]
294
+ command = ["cargo" ]
295
+ if "careful" in session .posargs :
296
+ command .append ("careful" )
297
+ command .append ("test" )
298
+ if "release" in session .posargs :
299
+ command .append ("--release" )
293
300
if package :
294
301
command .append (f"--package={ package } " )
295
302
if features :
You can’t perform that action at this time.
0 commit comments