-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- we are running out of cache space and the default GitHub eviction policy is not ideal - these jobs should make the caching more optimal for our use-case Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,7 @@ | |
"htmlcov", | ||
"ldflags", | ||
"mypy", | ||
"opengrabeso", | ||
"prettytable", | ||
"stretchr", | ||
"unxz", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Docs: https://github.com/OpenGrabeso/clean-cache | ||
# Keep only most recent cache while working on a branch | ||
name: cache cleanup branch | ||
on: | ||
push: | ||
branches: ['**'] | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
cache-cleanup-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: opengrabeso/clean-cache@v1 | ||
with: | ||
post: true | ||
keep: 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# Docs: https://github.com/OpenGrabeso/clean-cache | ||
# | ||
# As we are using caches more and more, we are getting over the GitHubs 10 GB limit. | ||
# Unfortunately GitHub does does not have very smart cache eviction policy | ||
# Docs: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy | ||
# | ||
# Each pre-compiled coreboot toolchain takes up around 500 MB. | ||
# The most space at the time of writing is taken up by coreboot toolchains. At the time of writing we | ||
# have 7 coreboot versions, each for x86 and arm64, resulting in 7*2*500=7 GB. | ||
# Thankfully the coreboot toolchains are not re-built that often, but they do take almost 1 hour to build - hence | ||
# caching is a good idea. | ||
# To make sure that the toolchains remain available as long as possible, we should start manually cleaning up the | ||
# cache - making the eviction logic smarter. | ||
|
||
name: cache cleanup pull request | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
cache-cleanup-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clean cache for the closed/merged PR | ||
uses: opengrabeso/clean-cache@v1 |