Skip to content

Clear GHCup caches in CI to not run out of space in CI #4382

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

Merged
merged 1 commit into from
Aug 20, 2024
Merged
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
15 changes: 15 additions & 0 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,18 @@ runs:
- name: "Remove freeze file"
run: rm -f cabal.project.freeze
shell: bash

# Make sure to clear all unneeded `ghcup`` caches.
# At some point, we were running out of disk space, see issue
# https://github.com/haskell/haskell-language-server/issues/4386 for details.
#
# Using "printf" debugging (`du -sh *` and `df -h /`) and binary searching,
# we figured out that `ghcup` caches are taking up a sizable portion of the
# disk space.
# Thus, we remove anything we don't need, especially caches and temporary files.
# For got measure, we also make sure no other tooling versions are
# installed besides the ones we explicitly want.
- name: "Remove ghcup caches"
if: runner.os == 'Linux'
run: ghcup gc --ghc-old --share-dir --hls-no-ghc --cache --tmpdirs --unset
shell: bash
Loading