]>
Commit | Line | Data |
---|---|---|
90b2ef02 EH |
1 | #!/bin/bash |
2 | # This script builds with static curl, and verifies that fetching works. | |
3 | ||
4 | set -ex | |
5 | ||
6 | if [[ -z "$RUNNER_TEMP" ]] | |
7 | then | |
8 | echo "RUNNER_TEMP must be set" | |
9 | exit 1 | |
10 | fi | |
11 | ||
12 | if [ ! -f Cargo.toml ]; then | |
13 | echo "Must be run from root of project." | |
14 | exit 1 | |
15 | fi | |
16 | ||
17 | ||
18 | # Building openssl on Windows is a pain. | |
19 | if [[ $(rustc -Vv | grep host:) != *windows* ]]; then | |
20 | FEATURES='vendored-openssl,curl-sys/static-curl,curl-sys/force-system-lib-on-osx' | |
21 | export LIBZ_SYS_STATIC=1 | |
22 | fi | |
23 | ||
24 | cargo build --features "$FEATURES" | |
25 | export CARGO_HOME=$RUNNER_TEMP/chome | |
26 | target/debug/cargo fetch | |
27 | rm -rf $CARGO_HOME |