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

Allow usage of cargo-codspeed with sccache #55

Open
danking opened this issue Sep 17, 2024 · 1 comment
Open

Allow usage of cargo-codspeed with sccache #55

danking opened this issue Sep 17, 2024 · 1 comment

Comments

@danking
Copy link

danking commented Sep 17, 2024

Hey all,

I want to use codspeed to benchmark spiraldb/vortex. You can see the code for the workflow here: https://github.com/spiraldb/vortex/pull/848/files . The setup-rust action sets three environment variables which I've confirmed are set in the GitHub Action step that runs cargo codspeed build:

SCCACHE_GHA_ENABLED=true
RUSTC_WRAPPER=sccache
CARGO_INCREMENTAL=0

We also have sccache enabled for our CI build. You can see the logs for the CI build on the PR that adds codspeed here. It compiles much faster (~4 minutes, including running tests etc.). In contrast, cargo codspeed build takes ~20 minutes. Have I done something wrong? How do I properly convey the RUSTC_WRAPPER information to cargo when it is run by CodSpeed? (Docs about RUSTC_WRAPPER and sccache are here).

@art049
Copy link
Member

art049 commented Sep 26, 2024

Hello @danking, I think this might be caused by the way we interact with cargo through the API; thus, the RUSTC_WRAPPER might not be passed/used.

Fixing #50 would probably make using sccache usable. I'll mark this issue as related. In the meantime, are the benches usable?

@art049 art049 changed the title cargo codspeed build appears to not propagate environment variables to cargo? Allow usage of cargo-codspeed with sccache Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants