2
2
3
3
set -ex
4
4
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
6
11
# 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
8
13
# Then with rustls TLS backend.
9
14
#
10
15
# 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
16
21
# inconvenience for me.
17
22
if [ " $TARGET " != " x86_64-pc-windows-gnu" ] && [ " $TARGET " != " i686-pc-windows-msvc" ]
18
23
then
19
- cargo test --target $TARGET --no-run --features rustls,static-curl
24
+ cargo test --target $TARGET --no-run --features rustls,static-curl $features
20
25
fi
21
26
# 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
23
28
if [ -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
27
32
28
33
# Note that `-Clink-dead-code` is passed here to suppress `--gc-sections` to
29
34
# help confirm that we're compiling everything necessary for curl itself.
30
35
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
32
37
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
34
39
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
37
42
fi
0 commit comments