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

Reusing artifacts in target from previous (CMake non-related) build #199

Closed
mladedav opened this issue Aug 6, 2022 · 3 comments
Closed

Comments

@mladedav
Copy link
Contributor

mladedav commented Aug 6, 2022

I am building my crate in CI and if that succeeds I build it again with CMake. I think there should be a way to skip this additional compilation by reusing the artifacts in the target directory.

This can probably be solved fairly easily once --out-dir is stabilized (context; this may not be stabilized ever) by allowing the user to specify a preexisting target directory while keeping just the output local to cmake.

But until then I'm not so sure. I know simply moving the target directory anywhere wouldn't work since there are absolute paths there based on which recompilation is triggered. I tried to test it and it triggered the compilation but honestly I'm still a bit confused sometimes when cargo decides to rebuild.

@jschwe
Copy link
Collaborator

jschwe commented Aug 6, 2022

Have you considered using "sccache" to cache your compilation results?

@Be-ing
Copy link

Be-ing commented Dec 14, 2022

We are using sccache on CXX-Qt's CI to cache both C++ and Rust and it works well.

@jschwe
Copy link
Collaborator

jschwe commented Feb 18, 2023

Closing in favor of issue #328, which would also address this issue.

@jschwe jschwe closed this as completed Feb 18, 2023
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

No branches or pull requests

3 participants