-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Fixing the cache situation #2427
Fixing the cache situation #2427
Conversation
a45fcd4
to
38cd642
Compare
fc963d2
to
a241891
Compare
8087928
to
12c19ee
Compare
Current source caching works great: - name: Hackage sources cache
uses: actions/cache@v2
env:
cache-name: hackage-sources
with:
path: ${{ env.CABAL_PKGS_DIR }}
# 2021-12-01: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC.
key: ${{ env.cache-name }}-${{ env.HACKAGE_TIMESTAMP }}
restore-keys: ${{ env.cache-name }}- All GHCs use one But depending on the library versions supporting particular The most ideal way to cache is to differentiate on GHC versions: - name: Hackage sources cache
uses: actions/cache@v2
env:
cache-name: hackage-sources
with:
path: ${{ env.CABAL_PKGS_DIR }}
# 2021-12-01: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, but can depend on `base`.
key: ${{ env.cache-name }}-${{ matrix.ghc }}-${{ env.HACKAGE_TIMESTAMP }}
restore-keys: |
${{ env.cache-name }}-${{ matrix.ghc }}-
${{ env.cache-name }}- But that means storing (6 GHCs) - 6 times more sources. So using 10% of the cache for it. Source caching is really to be done inside And if the person updates the Hackage pin - it anyway needs full redownload & rebuild, of caches also. So source caching is really only happens in I would keep it as it is & would put a statement to "think hard - that is a |
4e9d72c
to
4f0ae41
Compare
Since we now build all targets here - we may as well cache the `dist-newstyle` here.
Each `dist-newstyle` takes ~ >700Mb, having 17 builds to cache in matrix - it means that 10Gb pool would already start to delete other caches.
GitHub changed CI behaviour on me.
cheating with cache for faster retries
Seems like update should run after all caches are loaded.
be28896
to
b9af430
Compare
Closing in favour of #2446 continuation. |
Because the number of small things are addressed here - it is easier to make documentation in commits & address them in review mode.