taiki-e / install-action

GitHub Action for installing development tools (mainly from GitHub Releases).
Apache License 2.0
274 stars 33 forks source link

Failed to install cargo-nextest in Alpine Linux container #11

Closed messense closed 2 years ago

messense commented 2 years ago

Rust/Cargo is installed using apk: apk add cargo, cargo-nextest x86_64 Linux musl pre-built binary added in https://github.com/nextest-rs/nextest/pull/399.

https://github.com/PyO3/maturin/runs/7496518643?check_suite_focus=true

info: installing nextest@latest
tar: can't change directory to '/github/home/.cargo/bin': No such file or directory
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination

After setting CARGO_HOME to /usr/local: https://github.com/PyO3/maturin/runs/7496660018?check_suite_focus=true

info: installing nextest@latest
info: nextest installed at 
+ cargo nextest --version
error: could not execute process `/usr/local/bin/cargo-nextest nextest --version` (never executed)
Caused by:
  No such file or directory (os error 2)

try set CARGO_HOME to /usr: https://github.com/PyO3/maturin/runs/7496734873?check_suite_focus=true

info: installing nextest@latest
+ cargo nextest --version
info: nextest installed at 
error: could not execute process `/usr/bin/cargo-nextest nextest --version` (never executed)
Caused by:
  No such file or directory (os error 2)
messense commented 2 years ago

FYI.

$ curl -I https://get.nexte.st/latest/linux-musl
HTTP/2 302
age: 0
cache-control: public, max-age=0, must-revalidate
content-type: text/plain; charset=utf-8
date: Mon, 25 Jul 2022 09:12:12 GMT
location: https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-0.9.29/cargo-nextest-0.9.29-x86_64-unknown-linux-musl.tar.gz
server: Netlify
strict-transport-security: max-age=31536000
x-nf-request-id: 01G8TA1NPBJFYJRKR302MP5K3T
content-length: 145
NobodyXu commented 2 years ago

Just

mkdir /github/home/.cargo/bin

and then it should work.

taiki-e commented 2 years ago

Fixed in 1.6.0 (when CARGO_HOME is set correctly). Thanks for the report!

info: downloading https://get.nexte.st/latest/linux-musl
taiki-e commented 2 years ago

Also, in 1.7.0, it now works (on unix-like platforms) even if CARGO_HOME is not correctly set.