From a4989b98aac94ecc794b757bab4461cb53cf2282 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 6 Mar 2023 10:33:46 +0000 Subject: [PATCH] Free up additional disk space on GitHub runner Building with coverage support creates large binaries as well as coverage records, all of which consume considerable disk space. 2cee3b182fd appears to have pushed this over the top for it creates a library archive consuming another 2.2 GB of disk space. This additional build step cleans out binaries that we do not need, such as Haskell, .NET, or Android SDKs. This frees up 28 GB of memory (out of a total of 84 GB). --- .github/workflows/pull-request-checks.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pull-request-checks.yaml b/.github/workflows/pull-request-checks.yaml index f889e423e1f..7c76651ddc8 100644 --- a/.github/workflows/pull-request-checks.yaml +++ b/.github/workflows/pull-request-checks.yaml @@ -910,6 +910,12 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + - name: Remove unnecessary software to free up disk space + run: | + # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml + df -h + sudo rm -rf /usr/share/dotnet /usr/local/lib/* /opt/* + df -h - name: Download testing and coverage dependencies env: # This is needed in addition to -yq to prevent apt-get from asking for