-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI ccache on every push to develop (#2865)
Build times are increasing faster than I expected, so it's clear that to be effective the ccache needs to be kept up to date. This needs to happen automatically so we can forget about it. Github caching behaviour is to fail the save operation if a hit occurred on primary key. In other words, a cache entry will never be overwritten (updated). There is no provision for a cache update as such: actions/cache#342 The workaround is fairly easy though: break into discrete restore/delete/save steps. Only the cache for the current branch is deleted, using the `--branch` option to `gh action-cache delete`. This prevents pull requests from contributors with repo write access from deleting the main `develop` cache. This table shows the intended progression of cache updates, starting from an empty cache: | Event | Branch | Restore | Delete | Save | | ------- | ------------ | -------- | ------- | ------------ | | PR | feature/new | - | - | feature/new | | PR | feature/new | feature/new | - | - | | Merge | develop | - | - | develop | | PR | fix/lwip | develop | - | - | | Merge | develop | develop | develop | develop | So always save if (event.branch == develop) or no cache hit
- Loading branch information
Showing
3 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters