Fixes for the CI (#242)

This commit is contained in:
Félix Saparelli 2022-07-24 20:33:56 +12:00 committed by GitHub
parent 450e29d9cc
commit 51b300d29e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 375 additions and 276 deletions

37
ci-scripts/tests.sh Executable file
View file

@ -0,0 +1,37 @@
#!/bin/bash
set -euxo pipefail
bins="cargo-deb cargo-llvm-cov cargo-binstall"
test_bins="cargo-deb cargo-llvm-cov"
unset CARGO_INSTALL_ROOT
unset CARGO_HOME
# Install binaries using cargo-binstall
# shellcheck disable=SC2086
"./$1" binstall --log-level debug --no-confirm $bins
# Test that the installed binaries can be run
for bin in $test_bins; do
"$HOME/.cargo/bin/$bin" --version
done
cargo binstall --help >/dev/null
# Install binaries using `--manifest-path`
"./$1" binstall --log-level debug --manifest-path . --no-confirm cargo-binstall
# Test that the installed binaries can be run
cargo binstall --help >/dev/null
# Install binaries using secure mode
min_tls=1.3
[[ "${2:-}" == "Windows" ]] && min_tls=1.2 # WinTLS on GHA doesn't support 1.3 yet
"./$1" binstall \
--log-level debug \
--secure \
--min-tls-version $min_tls \
--no-confirm \
cargo-binstall
# Test that the installed binaries can be run
cargo binstall --help >/dev/null