We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 692a12c commit a355a68Copy full SHA for a355a68
.github/workflows/rust.yml
@@ -45,6 +45,7 @@ jobs:
45
- name: Running test script
46
env:
47
DO_FMT: true
48
+ DO_BENCH: true
49
run: ./contrib/test.sh
50
51
MSRV:
contrib/test.sh
@@ -67,4 +67,16 @@ if [ "$MIN_VERSION" != true ]; then
67
check "std arrayvec"
68
fi
69
70
+# Bench if told to.
71
+if [ "$DO_BENCH" = true ]
72
+then
73
+ # Technically we could use beta too but we only run this in CI using nightly.
74
+ if [ "$NIGHTLY" = false ]; then
75
+ echo "DO_BENCH requires a nightly toolchain (consider using RUSTUP_TOOLCHAIN=nightly)"
76
+ exit 1
77
+ fi
78
+
79
+ RUSTFLAGS='--cfg=bench' cargo bench
80
+fi
81
82
exit 0
0 commit comments