22
33set -ex
44
5- cargo test --target $TARGET --no-run
5+ # For musl on CI always use openssl-src dependency and build from there.
6+ if [ " $TARGET " = " x86_64-unknown-linux-musl" ]; then
7+ features=" --features static-ssl"
8+ fi
9+
10+ cargo test --target $TARGET --no-run $features
611# First test with no extra protocols enabled.
7- cargo test --target $TARGET --no-run --features static-curl
12+ cargo test --target $TARGET --no-run --features static-curl $features
813# Then with rustls TLS backend.
914#
1015# Note: Cross-compiling rustls on windows doesn't work due to requiring some
@@ -16,22 +21,22 @@ cargo test --target $TARGET --no-run --features static-curl
1621# inconvenience for me.
1722if [ " $TARGET " != " x86_64-pc-windows-gnu" ] && [ " $TARGET " != " i686-pc-windows-msvc" ]
1823then
19- cargo test --target $TARGET --no-run --features rustls,static-curl
24+ cargo test --target $TARGET --no-run --features rustls,static-curl $features
2025fi
2126# Then with all extra protocols enabled.
22- cargo test --target $TARGET --no-run --features static-curl,protocol-ftp,ntlm
27+ cargo test --target $TARGET --no-run --features static-curl,protocol-ftp,ntlm $features
2328if [ -z " $NO_RUN " ]; then
24- cargo test --target $TARGET
25- cargo test --target $TARGET --features static-curl
26- cargo test --target $TARGET --features static-curl,protocol-ftp
29+ cargo test --target $TARGET $features
30+ cargo test --target $TARGET --features static-curl $features
31+ cargo test --target $TARGET --features static-curl,protocol-ftp $features
2732
2833 # Note that `-Clink-dead-code` is passed here to suppress `--gc-sections` to
2934 # help confirm that we're compiling everything necessary for curl itself.
3035 RUSTFLAGS=-Clink-dead-code \
31- cargo run --manifest-path systest/Cargo.toml --target $TARGET
36+ cargo run --manifest-path systest/Cargo.toml --target $TARGET $features
3237 RUSTFLAGS=-Clink-dead-code \
33- cargo run --manifest-path systest/Cargo.toml --target $TARGET --features curl-sys/static-curl,curl-sys/protocol-ftp
38+ cargo run --manifest-path systest/Cargo.toml --target $TARGET --features curl-sys/static-curl,curl-sys/protocol-ftp $features
3439
35- cargo doc --no-deps --target $TARGET
36- cargo doc --no-deps -p curl-sys --target $TARGET
40+ cargo doc --no-deps --target $TARGET $features
41+ cargo doc --no-deps -p curl-sys --target $TARGET $features
3742fi
0 commit comments