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

feat: use install-action to speed up installation of cargo tools #146

Merged
merged 4 commits into from
May 31, 2024

Conversation

joshka
Copy link
Contributor

@joshka joshka commented May 28, 2024

Fixes: #145

joshka added a commit to joshka/tui-big-text that referenced this pull request May 28, 2024
joshka added a commit to joshka/tui-big-text that referenced this pull request May 28, 2024
joshka added a commit to joshka/tui-big-text that referenced this pull request May 28, 2024
joshka added a commit to joshka/tui-big-text that referenced this pull request May 28, 2024
@joshka
Copy link
Contributor Author

joshka commented May 28, 2024

Testing - https://github.com/joshka/tui-big-text/actions/runs/9276630769/job/25524107004

Tue, 28 May 2024 21:32:06 GMT
Run joshka/release-plz-action@c39e7f1959e30f3d0178027328895055a74aa955
Tue, 28 May 2024 21:32:06 GMT
Run taiki-e/install-action@v2
Tue, 28 May 2024 21:32:06 GMT
Run bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
Tue, 28 May 2024 21:32:06 GMT info: host platform: x86_64_linux
Tue, 28 May 2024 21:32:06 GMT info: install-action does not support [email protected],[email protected]; fallback to cargo-binstall
Tue, 28 May 2024 21:32:06 GMT info: installing cargo-binstall@latest (1.6.8)
Tue, 28 May 2024 21:32:07 GMT info: downloading https://github.com/cargo-bins/cargo-binstall/releases/download/v1.6.8/cargo-binstall-x86_64-unknown-linux-musl.tgz
Tue, 28 May 2024 21:32:07 GMT info: verifying sha256 checksum for cargo-binstall-x86_64-unknown-linux-musl.tgz
Tue, 28 May 2024 21:32:07 GMT info: cargo-binstall installed at /home/runner/.cargo/bin/cargo-binstall
Tue, 28 May 2024 21:32:07 GMT + cargo-binstall binstall -V
Tue, 28 May 2024 21:32:07 GMT 1.6.8
Tue, 28 May 2024 21:32:11 GMT  INFO resolve: Resolving package: 'release-plz@=0.3.70'
Tue, 28 May 2024 21:32:11 GMT  INFO resolve: Resolving package: 'cargo-semver-checks@=0.31.0'
Tue, 28 May 2024 21:32:13 GMT  WARN The package cargo-semver-checks v0.31.0 (x86_64-unknown-linux-gnu) has been downloaded from github.com
Tue, 28 May 2024 21:32:13 GMT  INFO This will install the following binaries:
Tue, 28 May 2024 21:32:13 GMT  INFO   - cargo-semver-checks (cargo-semver-checks -> /home/runner/.cargo/bin/cargo-semver-checks)
Tue, 28 May 2024 21:32:13 GMT  WARN The package release-plz v0.3.70 (x86_64-unknown-linux-gnu) has been downloaded from github.com
Tue, 28 May 2024 21:32:13 GMT  INFO This will install the following binaries:
Tue, 28 May 2024 21:32:13 GMT  INFO   - release-plz (release-plz -> /home/runner/.cargo/bin/release-plz)
Tue, 28 May 2024 21:32:13 GMT  INFO Installing binaries...
Tue, 28 May 2024 21:32:13 GMT  INFO Installing binaries...
Tue, 28 May 2024 21:32:13 GMT  INFO Done in 1.946029985s

@joshka joshka marked this pull request as ready for review May 28, 2024 21:35
action.yml Show resolved Hide resolved
action.yml Outdated
Comment on lines 23 to 25
# TODO fix this
description: "Release-plz version to use. It must be an existing git tag name. For example `release-plz-v0.2.45`. (Default: `latest`)."
default: "release-plz-v0.3.70"
default: "0.3.70"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is already a bit weird. You're making a release tool, for releasing crate versions, then publishing that tool to crates.io, but then installing it from your git repo via a specific tag version...

I suppose this makes sense if you're wanting to test out new versions of the tool in an action against a not yet released version of release-plz. I'm not sure if binstall supports some sort of git-tag version specifier.

I suspect this might break some small amount of workflows that specify this, but maybe the logic below can detect this and chop out the release-plz-v prefix somehow?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but then installing it from your git repo via a specific tag version

yes, this is because I was using an action that wasn't integrated with crates.io.

I suspect this might break some small amount of workflows

I'm not aware of any. This new approach should work well :)

For testing, typically I use cargo install because I don't tag "dev" versions in release-plz repo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this might break some small amount of workflows that specify this,

Now that I think about it. Yes, I think I broke some people GitHub actions. This should have been a 0.6.0 D:

@marcoieni
Copy link
Member

The updater script is broken now. But I would like to experiment with a new "release" approach.
Now, when a new release-plz version is available, it is immediately available in the Action (because we are using 0.3, not 0.3.70), I don't need to release a new version of the action.
Let's see how it goes 👍

@marcoieni marcoieni enabled auto-merge (squash) May 31, 2024 17:16
@marcoieni marcoieni merged commit ea6c6be into release-plz:main May 31, 2024
1 check passed
joshka added a commit to joshka/tui-big-text that referenced this pull request May 31, 2024
This reverts commit 617abcd.
The faster approach is now part of the main release-plz action.
Fixed in: release-plz/action#146
@joshka
Copy link
Contributor Author

joshka commented May 31, 2024

Tested in https://github.com/joshka/tui-big-text/actions/runs/9325690976/job/25673100085
This was effectively a noop change that reverts the github workflow changes I made to point to my fork
Total run time: 8s :)

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.

Installation part of the workflow is slow (by 2 orders of magnitude)
2 participants