Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fetch smoke test. #9921

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions ci/fetch-smoke-test.sh
Original file line number Diff line number Diff line change
@@ -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