lordgamez commented on code in PR #1580:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1580#discussion_r1213073267
##########
.github/workflows/ci.yml:
##########
@@ -73,8 +74,15 @@ jobs:
run: git config --system core.longpaths true
- id: checkout
uses: actions/checkout@v3
- - name: Set up MSBuild
- uses: microsoft/[email protected]
+ - name: Run sccache-cache
+ uses: mozilla-actions/[email protected]
+ - name: sccache cache
+ uses: actions/cache@v3
+ with:
+ path: ~/AppData/Local/Mozilla/sccache/cache
+ key: ${{ runner.os }}-sccache
Review Comment:
Unfortunately that will not work due to the [caches being
immutable](https://github.com/actions/cache/blob/04f198bf0b2a39f7230a4304bf07747a0bddf146/tips-and-workarounds.md?plain=1#L11).
This is why it is stated in the documentation to use unique keys for cache
entries (using the SHA for example). Cache entries cannot be overwritten, so if
a key is set to save to an already existing cache entry key it is dropped and
the cache for that key will not be updated, it will produce the following
message:
```
Cache hit occurred on the primary key
ubuntu-20.04-ccache-refs/heads/MINIFICPP-2127_ci, not saving cache.
```
As you said it would be better to have a custom action to clean up old
unused caches, but not only for dropped branches but for the obsolete cache
entries in the same branch as well that has an updated cache entry present
already. For now it is better to have a unique identifier for the cache keys to
have more up to date entries, but we may figure out a way in the future to have
an automatic cache cleanup procedure for obsolete entries.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]