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

ci: improve caching of build artifacts #41

Merged
merged 2 commits into from
Feb 13, 2023
Merged

ci: improve caching of build artifacts #41

merged 2 commits into from
Feb 13, 2023

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Feb 13, 2023

  • ci: add --target to cargo test
  • ci: build all targets (bins, libs, tests, etc.)

I noticed in GH Action output that `cargo test` is compiling our
dependencies again. Maybe it is not correctly reusing the cache?

In this commit, I am adding `--target` flag to `cargo test`, using
the same value that was provided to `cargo build` which is producing
the build artifacts saved to the cache.

Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
I noticed in GH Action output that `cargo test` is compiling our
dependencies again. Maybe the build step did not compile everything
that's needed by our tests?

In this commit, I am adding `--all-targets` flag to `cargo build`,
hoping that the subsequent `cargo test` will not need to compile
anything.

Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@bajtos bajtos merged commit a2361da into main Feb 13, 2023
@bajtos bajtos deleted the ci-test-with-target branch February 13, 2023 12:50
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.

1 participant