This repository was archived by the owner on Nov 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 79
79
env :
80
80
DO_FEATURE_MATRIX : true
81
81
DO_SCHEMARS_TESTS : ${{matrix.rust != '1.29.0'}}
82
+ DO_ALLOC_TESTS : ${{matrix.rust != '1.29.0'}}
82
83
run : ./contrib/test.sh
83
84
84
85
Embedded :
Original file line number Diff line number Diff line change 1
1
#! /bin/sh -ex
2
2
3
- FEATURES=" serde serde-std"
3
+ FEATURES=" serde serde-std std"
4
+
5
+ if [ " $DO_ALLOC_TESTS " = true ]; then
6
+ FEATURES=" $FEATURES alloc"
7
+ fi
4
8
5
9
# Use toolchain if explicitly specified
6
10
if [ -n " $TOOLCHAIN " ]
@@ -30,6 +34,11 @@ if [ "$DO_FEATURE_MATRIX" = true ]; then
30
34
do
31
35
cargo build --all --no-default-features --features=" $feature "
32
36
cargo test --all --features=" $feature "
37
+ # All combos of two features
38
+ for featuretwo in ${FEATURES} ; do
39
+ cargo build --all --no-default-features --features=" $feature $featuretwo "
40
+ cargo test --all --features=" $feature $featuretwo "
41
+ done
33
42
done
34
43
35
44
# Other combos
Original file line number Diff line number Diff line change 39
39
40
40
#[ cfg( any( test, feature="std" ) ) ] extern crate core;
41
41
#[ cfg( feature="core2" ) ] extern crate core2;
42
- #[ cfg( any ( feature = "alloc" ) ) ] extern crate alloc;
43
- #[ cfg( any ( feature = "std" ) ) ] use std as alloc;
42
+ #[ cfg( feature = "alloc" ) ] extern crate alloc;
43
+ #[ cfg( all ( not ( feature = "alloc" ) , feature = "std" ) ) ] use std as alloc;
44
44
#[ cfg( feature="serde" ) ] pub extern crate serde;
45
45
#[ cfg( all( test, feature="serde" ) ) ] extern crate serde_test;
46
46
You can’t perform that action at this time.
0 commit comments