Skip to content

Commit 5f78308

Browse files
committed
Remove unused GHCup caches in CI
Helps us to avoid running out of disk space during a CI job.
1 parent 6f6f75b commit 5f78308

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/actions/setup-build/action.yml

+14
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,17 @@ runs:
116116
- name: "Remove freeze file"
117117
run: rm -f cabal.project.freeze
118118
shell: bash
119+
120+
# Make sure the clear all ghcup caches.
121+
# At some point, we were running out of disk space, see issue
122+
# https://github.com/haskell/haskell-language-server/issues/4386
123+
#
124+
# Using "printf" debugging (`du -sh *` and `df -h /`), we figured out that
125+
# `ghcup` caches are taking up a sizable portion of the disk space.
126+
# Thus, we remove anything we don't need, especially caches and temporary files.
127+
# For got measure, we also make sure no other tooling versions are
128+
# installed besides the ones we explicitly want.
129+
- name: "Remove ghcup caches"
130+
if: runner.os == 'Linux'
131+
run: ghcup gc --ghc-old --share-dir --hls-no-ghc --cache --tmpdirs --unset
132+
shell: bash

0 commit comments

Comments
 (0)