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

Add caching dupe change #835

Merged
merged 9 commits into from
Feb 13, 2024
Merged

Conversation

dorryspears
Copy link
Contributor

This closes #340. I tried putting the yaml in the workflow folder for the new cache job but it wasn't able to find it, so I made it an action.

@joshlf
Copy link
Member

joshlf commented Feb 11, 2024

Thanks for this, @dorryspears !

I'm not a GitHub Actions expert, so I may be off the mark here, but will making this a "step" rather than a needs dependency mean that this action is executed multiple times? Currently (on main), it executes once at the beginning of the job run and then the results are re-used by all steps, which helps things run faster.

@dorryspears
Copy link
Contributor Author

@joshlf You are right. I now understand what the CI was doing. I rearranged my code and added back the generate cache step. That action just replaces the

- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
      with:
        path: |
          ~/.cargo/
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

step in the existing jobs.

Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay awesome, thanks! A few nits regarding stray whitespace, but this looks good!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@joshlf joshlf added this pull request to the merge queue Feb 13, 2024
Merged via the queue into google:main with commit 76f5e49 Feb 13, 2024
209 checks passed
dorryspears added a commit to dorryspears/zerocopy that referenced this pull request Feb 20, 2024
* fixed cache dupe call

* add shell

* Removed duplicate calls for caching in CI. Resolves google#340

* fixed multiple runs

* removed whitespace .github/workflows/ci.yml

Co-authored-by: Joshua Liebow-Feeser <[email protected]>

* removed whitespace .github/workflows/ci.yml

Co-authored-by: Joshua Liebow-Feeser <[email protected]>

* removed whitespace .github/workflows/ci.yml

Co-authored-by: Joshua Liebow-Feeser <[email protected]>

---------

Co-authored-by: Joshua Liebow-Feeser <[email protected]>
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.

[CI] Deduplicate actions/cache directives
2 participants