44
55: " ${TARGET?The TARGET environment variable must be set.} "
66
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
815if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ]; then
916 FEATURES=" ${FEATURES} ,nightly"
1017 export RUSTFLAGS=" $RUSTFLAGS -D warnings"
@@ -19,18 +26,17 @@ if [ "${CROSS}" = "1" ]; then
1926 CARGO=cross
2027fi
2128
22- export RUSTFLAGS=" $RUSTFLAGS --cfg hashbrown_deny_warnings"
23-
2429# 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
2632
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} "
2935
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} "
3238
33- if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ]; then
39+ if [ " ${TRAVIS_RUST_VERSION} " = " nightly" ] && [ " ${NO_STD} " != 1 ] ; then
3440 # Run benchmark on native targets, build them on non-native ones:
3541 NO_RUN=" "
3642 if [ " ${CROSS} " = " 1" ]; then
0 commit comments