Skip to content

Add manual workflow for flushing CI cache #8097

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/flush-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Based on https://github.com/actions/cache/issues/2#issuecomment-1098723830
# This seems to be the only way to flush GitHub Actions cache without changing
# the cache key every time.
# It looks like this has to be run a couple of times in a row to work.
on:
workflow_dispatch:
pull_request: # temporary, remove before merging if this works
jobs:
flush-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: /tmp/flush
key: ${{ github.run_id }}-${{ github.run_attempt }}
# 10 GB is the max cache size. Anything over that will be evicted.
# Data is zstd-compressed, so we can't fallocate it.
- run: dd if=/dev/urandom of=/tmp/flush bs=1M count=10000
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ failures:
If none of these let you reproduce, there might be some race condition
or continuous integration breakage; please file a bug.

If all PRs are failing with a cache-related error, ask the maintainers to
manually trigger the `flush-cache` GitHub Actions Workflow a couple of times.

**Running tests locally.**
To run tests locally with `v2-build`, you will need to know the
name of the test suite you want. Cabal and cabal-install have
Expand Down