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

Use cargo-binstall batching mode #54

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Use cargo-binstall batching mode #54

merged 1 commit into from
Jan 16, 2023

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jan 15, 2023

Closes #44

@taiki-e taiki-e force-pushed the binstall branch 2 times, most recently from a5c162b to 05a746c Compare January 15, 2023 12:38
@taiki-e
Copy link
Owner Author

taiki-e commented Jan 15, 2023

hmm https://github.com/taiki-e/install-action/actions/runs/3923398658/jobs/6706983450

WARN The package watchexec-cli v1.21.0 will be installed from source (with cargo)

@NobodyXu
Copy link
Collaborator

hmm https://github.com/taiki-e/install-action/actions/runs/3923398658/jobs/6706983450

WARN The package watchexec-cli v1.21.0 will be installed from source (with cargo)

That could be switched off using --disable-strategies compile

@NobodyXu
Copy link
Collaborator

hmm https://github.com/taiki-e/install-action/actions/runs/3923398658/jobs/6706983450

WARN The package watchexec-cli v1.21.0 will be installed from source (with cargo)

That's really strange because watchexec-cli v1.21.0 indeed provides musl build for x86_64.

@NobodyXu
Copy link
Collaborator

@taiki-e I tried installing this from my own laptop and it works fine:

❯ cargo binstall watchexec-cli --targets x86_64-unknown-linux-musl
 INFO resolve: Resolving package: 'watchexec-cli'
 WARN The package watchexec-cli v1.21.0 will be downloaded from github.com
 INFO This will install the following binaries:
 INFO   - watchexec (watchexec -> /Users/nobodyxu/.cargo/bin/watchexec-v1.21.0)
 INFO And create (or update) the following symlinks:
 INFO   - watchexec (/Users/nobodyxu/.cargo/bin/watchexec -> watchexec-v1.21.0)
Do you wish to continue? yes/[no]
? no
 WARN Installation cancelled

@taiki-e
Copy link
Owner Author

taiki-e commented Jan 15, 2023

That could be switched off using --disable-strategies compile

Hmm, it would be a breaking change...

That said, if installing from source, it is better to cache the binaries, so the fallback that installs from source is not very good to me.

So I'm considering outputting info message suggesting cache-cargo-install-action in all officially unsupported cases. (Originally, I was considering outputting it when the installation fails)

Ideally, I would like to merge cache-cargo-install-action into install-action, run cargo-binstall with --disable-strategies compile, and use cache-cargo-install-action when the installation fails, though...

@NobodyXu
Copy link
Collaborator

Hmm, it would be a breaking change...

Yes, so better to fix it in cargo-binstall.

Ideally, I would like to merge cache-cargo-install-action into install-action, run cargo-binstall with --disable-strategies compile, and use cache-cargo-install-action when the installation fails, though...

That sounds awesome!

@taiki-e taiki-e marked this pull request as ready for review January 16, 2023 10:55
@taiki-e taiki-e changed the title Try cargo-binstall batching mode Use cargo-binstall batching mode Jan 16, 2023
@taiki-e taiki-e merged commit ad8540a into main Jan 16, 2023
@taiki-e taiki-e deleted the binstall branch January 16, 2023 10:56
@taiki-e taiki-e mentioned this pull request Feb 8, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use cargo-binstall batching mode?
2 participants