From b37e92987053bb50b2736c204a471c6e04faa406 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 20 Apr 2020 16:55:44 -0700 Subject: [PATCH] ;ci: linux: free and show disk space To help with disk space failures in the last couple of PR builds. Seems to be https://github.com/actions/virtual-environments/issues/709. --- .github/workflows/linux.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3fc6b90ee..6d853846a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -128,6 +128,26 @@ jobs: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.key }} ${{ runner.os }}-hledger-web-stack-work + - name: Free disk space + run: | + df -h / + sudo swapoff -a + df -h / + ls -lh /swapfile + sudo rm -f /swapfile + df -h / + sudo apt clean + df -h / + docker image ls -aq + docker rmi $(docker image ls -aq) + df -h / + find ~/work/_temp -name "cache.tgz" -exec rm -f {} \; + df -h / + sudo rm -rf "/usr/local/share/boost" + df -h / + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -h / + # actions - name: Install stack @@ -140,7 +160,10 @@ jobs: - name: Install GHC run: | + df -h stack $ARGS setup --install-ghc + df -h + env: ARGS: ${{ matrix.plan.args }}