Skip to content

Commit 1bf57a7

Browse files
committed
Add manual workflow for flushing CI cache
1 parent f90d541 commit 1bf57a7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/flush-cache.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Based on https://github.com/actions/cache/issues/2#issuecomment-1098723830
2+
# This seems to be the only way to flush GitHub Actions cache without changing
3+
# the cache key every time.
4+
# It looks like this has to be run a couple of times in a row to work.
5+
on:
6+
workflow_dispatch:
7+
pull_request: # temporary, remove before merging if this works
8+
jobs:
9+
flush-cache:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/cache@v2
13+
with:
14+
path: /tmp/flush
15+
key: ${{ github.run_id }}-${{ github.run_attempt }}
16+
# 10 GB is the max cache size. Anything over that will be evicted.
17+
# Data is zstd-compressed, so we can't fallocate it.
18+
- run: dd if=/dev/urandom of=/tmp/flush bs=1M count=10000

CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ failures:
7575
If none of these let you reproduce, there might be some race condition
7676
or continuous integration breakage; please file a bug.
7777

78+
If all PRs are failing with a cache-related error, ask the maintainers to
79+
manually trigger the `flush-cache` GitHub Actions Workflow a couple of times.
80+
7881
**Running tests locally.**
7982
To run tests locally with `v2-build`, you will need to know the
8083
name of the test suite you want. Cabal and cabal-install have

0 commit comments

Comments
 (0)