mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-09 22:30:28 +00:00
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Only use musl binaries for nextest if glibc isn't available. See [#13](https://github.com/taiki-e/install-action/issues/13) for more.
|
||||||
|
|
||||||
## [1.7.0] - 2022-07-25
|
## [1.7.0] - 2022-07-25
|
||||||
|
|
||||||
- Install Rust-related binaries to `/usr/local/bin` when `$CARGO_HOME/bin` and `$HOME/.cargo/bin` is not available.
|
- Install Rust-related binaries to `/usr/local/bin` when `$CARGO_HOME/bin` and `$HOME/.cargo/bin` is not available.
|
||||||
|
|||||||
19
main.sh
19
main.sh
@@ -63,13 +63,18 @@ download() {
|
|||||||
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
|
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
|
||||||
| tar "${tar_args[@]}" -C "${bin_dir}" "${bin}"
|
| tar "${tar_args[@]}" -C "${bin_dir}" "${bin}"
|
||||||
}
|
}
|
||||||
|
host_triple() {
|
||||||
|
if [[ -z "${host:-}" ]]; then
|
||||||
|
host="$(rustc -vV | grep host | cut -c 7-)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
install_cargo_binstall() {
|
install_cargo_binstall() {
|
||||||
if [[ ! -f "${cargo_bin}/cargo-binstall" ]]; then
|
if [[ ! -f "${cargo_bin}/cargo-binstall" ]]; then
|
||||||
info "installing cargo-binstall"
|
info "installing cargo-binstall"
|
||||||
|
|
||||||
target="$(rustc -vV | grep host | cut -c 7-)"
|
host_triple
|
||||||
base_url=https://github.com/ryankurte/cargo-binstall/releases/latest/download/cargo-binstall
|
base_url=https://github.com/ryankurte/cargo-binstall/releases/latest/download/cargo-binstall
|
||||||
case "${target}" in
|
case "${host}" in
|
||||||
x86_64-unknown-linux-gnu) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
x86_64-unknown-linux-gnu) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
||||||
x86_64-unknown-linux-musl) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
x86_64-unknown-linux-musl) url="${base_url}-x86_64-unknown-linux-musl.tgz" ;;
|
||||||
|
|
||||||
@@ -82,10 +87,10 @@ install_cargo_binstall() {
|
|||||||
x86_64-pc-windows-gnu) url="${base_url}-x86_64-pc-windows-msvc.zip" ;;
|
x86_64-pc-windows-gnu) url="${base_url}-x86_64-pc-windows-msvc.zip" ;;
|
||||||
|
|
||||||
x86_64-apple-darwin | aarch64-apple-darwin | x86_64-pc-windows-msvc)
|
x86_64-apple-darwin | aarch64-apple-darwin | x86_64-pc-windows-msvc)
|
||||||
url="${base_url}-${target}.zip"
|
url="${base_url}-${host}.zip"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) bail "unsupported target '${target}' for cargo-binstall" ;;
|
*) bail "unsupported target '${host}' for cargo-binstall" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
|
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
|
||||||
@@ -192,9 +197,9 @@ for tool in "${tools[@]}"; do
|
|||||||
# https://nexte.st/book/pre-built-binaries.html
|
# https://nexte.st/book/pre-built-binaries.html
|
||||||
case "${OSTYPE}" in
|
case "${OSTYPE}" in
|
||||||
linux*)
|
linux*)
|
||||||
# musl binaries are available on 0.9.29+.
|
host_triple
|
||||||
case "${version}" in
|
case "${host}" in
|
||||||
0.[1-8].* | 0.9.[0-9] | 0.9.[0-1][0-9] | 0.9.2[0-8]) url="https://get.nexte.st/${version}/linux" ;;
|
*-linux-gnu*) url="https://get.nexte.st/${version}/linux" ;;
|
||||||
*) url="https://get.nexte.st/${version}/linux-musl" ;;
|
*) url="https://get.nexte.st/${version}/linux-musl" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user