- 
                Notifications
    You must be signed in to change notification settings 
- Fork 617
chore(ci): add compilation cache of main branch #3198
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
base: main
Are you sure you want to change the base?
chore(ci): add compilation cache of main branch #3198
Conversation
…ntelemetry-js-contrib into ci-add-compile-cache-main
| # Note: we restore the last compilation form main branch | ||
| # so NX will only compile what has changed since then. | ||
| # Cache action is used because can be restores from dfferen workfow runs | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Note: we restore the last compilation form main branch | |
| # so NX will only compile what has changed since then. | |
| # Cache action is used because can be restores from dfferen workfow runs | |
| # Restore the nx compilation cache for the latest commit to main. | |
| # The subsequent 'npm run compile' should only need to compile changed packages. | 
| # so NX will only compile what has changed since then. | ||
| # Cache action is used because can be restores from dfferen workfow runs | ||
| - name: Compile Cache Lookup | ||
| uses: actions/cache/restore@v4 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to consider not using the cache for pushes to "main"?
IIUC, the way it is now, that compile-cache-main will never start fresh. After a year, it will have a year of possible cruft in it, right?  I realize that would mean doing a full clean npm run compile for pushes to main, but we'd still get the benefit of the cache for the more common updates to PRs.
Which problem is this PR solving?
Improve compilation times by adding a compilation cache which contains the artefacts form the last commit in main. Ref: #3136 (comment)
Short description of the changes