From 90b2ef02d1a28cb5ddf682fa0adb08e64e460c42 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 18 Sep 2021 18:10:16 -0700 Subject: [PATCH] Add fetch smoke test. --- .github/workflows/main.yml | 2 ++ ci/fetch-smoke-test.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 ci/fetch-smoke-test.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 838bc03bb8d..f5e1163545d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,8 @@ jobs: if: matrix.os == 'macos-latest' - run: cargo build --manifest-path crates/credential/cargo-credential-wincred/Cargo.toml if: matrix.os == 'windows-latest' + - name: Fetch smoke test + run: ci/fetch-smoke-test.sh resolver: runs-on: ubuntu-latest diff --git a/ci/fetch-smoke-test.sh b/ci/fetch-smoke-test.sh new file mode 100755 index 00000000000..17993d1fdb7 --- /dev/null +++ b/ci/fetch-smoke-test.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# This script builds with static curl, and verifies that fetching works. + +set -ex + +if [[ -z "$RUNNER_TEMP" ]] +then + echo "RUNNER_TEMP must be set" + exit 1 +fi + +if [ ! -f Cargo.toml ]; then + echo "Must be run from root of project." + exit 1 +fi + + +# Building openssl on Windows is a pain. +if [[ $(rustc -Vv | grep host:) != *windows* ]]; then + FEATURES='vendored-openssl,curl-sys/static-curl,curl-sys/force-system-lib-on-osx' + export LIBZ_SYS_STATIC=1 +fi + +cargo build --features "$FEATURES" +export CARGO_HOME=$RUNNER_TEMP/chome +target/debug/cargo fetch +rm -rf $CARGO_HOME