Use cargo-binstall to install nextest

This commit is contained in:
Taiki Endo
2023-08-04 22:44:41 +09:00
parent c25f50bacd
commit 1cdb36bf16
7 changed files with 28 additions and 845 deletions

22
main.sh
View File

@@ -178,21 +178,6 @@ read_manifest() {
# TODO: However, a warning may make sense.
host_platform="${host_arch}_linux_gnu"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
elif [[ "${host_env}" == "gnu" ]]; then
# TODO: don't hardcode tool name and use 'prefer_linux_gnu' field in base manifest.
case "${tool}" in
cargo-nextest | nextest)
# TODO: don't hardcode required glibc version
required_glibc_version=2.27
higher_glibc_version=$(sort <<<"${required_glibc_version}"$'\n'"${host_glibc_version}" -Vu | tail -1)
if [[ "${higher_glibc_version}" == "${host_glibc_version}" ]]; then
# musl build of nextest is slow, so use glibc build if host_env is gnu.
# https://github.com/taiki-e/install-action/issues/13
host_platform="${host_arch}_linux_gnu"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
fi
;;
esac
fi
;;
macos | windows)
@@ -364,13 +349,6 @@ exe=""
case "$(uname -s)" in
Linux)
host_os=linux
ldd_version=$(ldd --version 2>&1 || true)
if grep <<<"${ldd_version}" -q 'musl'; then
host_env="musl"
else
host_env="gnu"
host_glibc_version=$(grep <<<"${ldd_version}" -E "GLIBC|GNU libc" | sed "s/.* //g")
fi
if grep -q '^ID_LIKE=' /etc/os-release; then
base_distro="$(grep '^ID_LIKE=' /etc/os-release | sed 's/^ID_LIKE=//')"
case "${base_distro}" in