4
4
5
5
: " ${TARGET?The TARGET environment variable must be set.} "
6
6
7
- FEATURES=" rayon,serde,rustc-internal-api"
7
+ if [ " ${NO_STD} " = " 1" ]; then
8
+ # Unfortunately serde currently doesn't work without std due to a cargo bug.
9
+ FEATURES=" rustc-internal-api"
10
+ OP=" build"
11
+ else
12
+ FEATURES=" rustc-internal-api,serde,rayon"
13
+ OP=" test"
14
+ fi
8
15
if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ]; then
9
16
FEATURES=" ${FEATURES} ,nightly"
10
17
export RUSTFLAGS=" $RUSTFLAGS -D warnings"
@@ -19,18 +26,17 @@ if [ "${CROSS}" = "1" ]; then
19
26
CARGO=cross
20
27
fi
21
28
22
- export RUSTFLAGS=" $RUSTFLAGS --cfg hashbrown_deny_warnings"
23
-
24
29
# Make sure we can compile without the default hasher
25
- " ${CARGO} " -vv check --target=" ${TARGET} " --no-default-features
30
+ " ${CARGO} " -vv build --target=" ${TARGET} " --no-default-features
31
+ " ${CARGO} " -vv build --target=" ${TARGET} " --release --no-default-features
26
32
27
- " ${CARGO} " -vv test --target=" ${TARGET} "
28
- " ${CARGO} " -vv test --target=" ${TARGET} " --features " ${FEATURES} "
33
+ " ${CARGO} " -vv ${OP} --target=" ${TARGET} "
34
+ " ${CARGO} " -vv ${OP} --target=" ${TARGET} " --features " ${FEATURES} "
29
35
30
- " ${CARGO} " -vv test --target=" ${TARGET} " --release
31
- " ${CARGO} " -vv test --target=" ${TARGET} " --release --features " ${FEATURES} "
36
+ " ${CARGO} " -vv ${OP} --target=" ${TARGET} " --release
37
+ " ${CARGO} " -vv ${OP} --target=" ${TARGET} " --release --features " ${FEATURES} "
32
38
33
- if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ]; then
39
+ if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ] && [ " ${NO_STD} " != 1 ] ; then
34
40
# Run benchmark on native targets, build them on non-native ones:
35
41
NO_RUN=" "
36
42
if [ " ${CROSS} " = " 1" ]; then
0 commit comments