From 7498d0fa2f94997b9451f30326a98f0a33b77ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20P=C3=BCschel?= Date: Tue, 8 Oct 2024 20:15:05 +0200 Subject: [PATCH] ci: free unnecessary files We're running out of disk space, so free any files we don't absolutely need. --- .github/workflows/rust.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0627d784..78a98e17 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,6 +13,19 @@ jobs: os: [ubuntu, macos, windows] steps: - uses: actions/checkout@v2 + + # from: https://github.com/google/oss-fuzz/blob/7c3fe25727d36308fc32d34b1bd83895e52e1d44/.github/workflows/project_tests.yml#L65-L74 + - name: Clear unnecessary files + run: | + df -h + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + docker rmi $(docker images -a -q) + df -h + echo "Remove large unused folders, inspired by https://github.com/apache/flink/blame/master/tools/azure-pipelines/free_disk_space.sh" + sudo bash -c '(ionice -c 3 nice -n 19 rm -rf /usr/share/dotnet/ /usr/local/graalvm/ /usr/local/.ghcup/ /usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/android /usr/local/lib/node_modules)&' + - run: sudo apt install llvm if: matrix.os == 'ubuntu' - run: rustup default ${{ matrix.channel }}