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: create cache always in main, skip saving cache in PRs #10560

Merged
merged 1 commit into from
May 11, 2021

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented May 10, 2021

This PR improves the CI cache in the following ways:

  • main branch always creates fresh ./target cache (The cache key has github.sha at the end)
  • PR branch uses the latest main branch cache.

With this change, main branch always creates fresh cache and PR branches can use the latest one. So the PR branch's build amount should be consistently minimal.


Note1: This change prevents the false detection of stale files, which, for example, happened in this run https://github.com/denoland/deno/runs/2462335233 where only one markdown file was changed, but 45 files were considered 'stale' at mtime restore step.

Note2: This PR uses actions/cache@03e00da99d75a2204924908e1cca7902cafce66b which is the merge head of actions/cache#489 . cf git ls-remote https://github.com/actions/cache.git | grep 489/merge

@ry ry requested a review from piscisaureus May 10, 2021 20:12
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.

None yet

2 participants