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

Target directory cleaned even though cache-targets: true #171

Open
fooblahblah opened this issue Oct 11, 2023 · 0 comments
Open

Target directory cleaned even though cache-targets: true #171

fooblahblah opened this issue Oct 11, 2023 · 0 comments

Comments

@fooblahblah
Copy link

I'm probably doing something wrong, but it appears when cache-targets: true is specified and I'm running from an empty cache state, I see a cleaning step before the save of target. This ends up failing the subsequent run(s) which depend on the target dir to be cached with the generated binaries.

My cargo-cache action is as follows:

      - id: cargo-cache
        name: cache
        uses: Swatinem/rust-cache@v2
        with:
          key: ci-${{ runner.os }}
          cache-targets: true

However, when the cache is in the post build cache phase I see the following:
image

Is there any workaround I can try like specifying the target dir in the keys?

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

1 participant