From c393831e5e9c44f21dd8bf6a7dc6d881554f2100 Mon Sep 17 00:00:00 2001 From: Gregor Haas Date: Fri, 29 Mar 2024 14:20:35 -0700 Subject: [PATCH] Clean up unneeded packages on runner --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e60cf726..fe0578d95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,6 +64,25 @@ jobs: rm -rf buildroot/dl* rm -rf buildroot-ccache* + - name: Clear storage space + run: | + # Miscellaneous chunky packages + sudo apt remove -y 'dotnet*' 'temurin*' '*llvm*' '*libclang*' '*mono*' \ + 'google-cloud-cli' 'azure-cli' 'powershell' 'msbuild' \ + 'microsoft-edge-stable' 'google-chrome-stable' 'firefox' 'nginx-core' + + sudo apt autoremove + dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge + + # 8.4G: Contains a bunch of cached tools (none of which we use) + sudo rm -rf /opt/hostedtoolcache + + # 10.1G: Android and javascript + sudo rm -rf /usr/local/lib/{android,node_modules} + + # 1.9G: Powrshell documentation?? + sudo rm -rf /usr/local/share/powershell + # Install build dependencies - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y cpio rsync bc makeself