Skip to content

Conversation

@PythonGermany
Copy link
Contributor

Only build the binary once and cache it to speed up subsequent workflow runs.

@marcoieni
Copy link
Member

can you post some screenshots that show the performance improvement?

@PythonGermany
Copy link
Contributor Author

image
With cache step but no prebuilt binary available:
image
With cache and prebuilt binary available

@PythonGermany
Copy link
Contributor Author

There are other solutions I also tried out. Like using binstall, but I don't like the idea of introducing another 3rd party dependency if simple caching is also possible.

@PythonGermany
Copy link
Contributor Author

One thing I am still not sure about if there could be any problems is if the newest version of cargo-audit changes

@marcoieni
Copy link
Member

One thing I am still not sure about if there could be any problems is if the newest version of cargo-audit changes

oh you are right! Maybe using https://github.com/Swatinem/rust-cache would help here?
I.e. we cache rust artifacts instead of the binary.

@PythonGermany PythonGermany marked this pull request as ready for review March 15, 2025 21:45
@marcoieni marcoieni enabled auto-merge (squash) March 15, 2025 23:25
@marcoieni marcoieni merged commit 475b9b4 into rust-github:main Mar 15, 2025
1 check passed
@PythonGermany PythonGermany deleted the cache-cargo-audit-binary branch March 16, 2025 11:43
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.

2 participants