Skip to content

Commit a7a2e89

Browse files
committed
CI: caching: build once a day
Recently there is a lot of PRs/builds from internal repo branches. Repo cache has 10G pool limit & PR caches are not shared between PRs, but main branch cache is. Rebuilding it once a day ensures that if internal branch PRs pushed main state out of the pool - it gets reinstituted. *afaik* there is no way to prioritize main branch cache better, since GitHub CI FIFO caches out of the pool by build time.
1 parent ff770e0 commit a7a2e89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/caching.yml

+9
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ on:
3030
push:
3131
branches:
3232
- master
33+
schedule:
34+
# Refresh snapshot every day at 08:25 UTC (~00:25 in California)
35+
# Why: GitHub repo has 10G pool & on overflow GitHub removes caches in FIFO manner.
36+
# When internal branche PRs save into the same pool -
37+
# their cache is accessible only inside of the scope of the PR.
38+
# If main cache is forced out - there are no cache shared between PRs,
39+
# which implies all PRs would start to create & save their cache.
40+
# Reinstitution of the main chache once a day allows to put it back so it gets shared across all PRs.
41+
- cron: "25 8 * * *"
3342

3443
env:
3544
cabalBuild: "v2-build all --enable-tests --enable-benchmarks"

0 commit comments

Comments
 (0)