From e07e57368e9fab8ecfc140d44aef7db9b23c7ce0 Mon Sep 17 00:00:00 2001 From: will Date: Tue, 30 Sep 2025 13:40:08 +0100 Subject: [PATCH] ci: clear out space on centos job Clear out space on the centos job be deleteing unnecessary files. Raised by #33293 which pointed to a solution like https://github.com/google/oss-fuzz/commit/b7f04d782277638a67bc44865de445977eed4708 Only runs when cache provider (runner) is `gha`, and on the CentOS job. --- .github/actions/clear-files/action.yml | 12 ++++++++++++ .github/workflows/ci.yml | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 .github/actions/clear-files/action.yml diff --git a/.github/actions/clear-files/action.yml b/.github/actions/clear-files/action.yml new file mode 100644 index 00000000000..0008f825ff0 --- /dev/null +++ b/.github/actions/clear-files/action.yml @@ -0,0 +1,12 @@ +name: 'Clear unnecessary files' +description: 'Clear out unnecessary files to make space on the VM' +runs: + using: 'composite' + steps: + - name: Clear unnecessary files + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + run: | + set +o errexit + 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)&' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23e2f927444..0f504481d29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -582,6 +582,10 @@ jobs: with: cache-provider: ${{ matrix.provider || needs.runners.outputs.provider }} + - name: Clear unnecessary files + if: ${{ needs.runners.outputs.provider == 'gha' && true || false }} # Only needed on GHA runners + uses: ./.github/actions/clear-files + - name: Enable bpfcc script if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }} # In the image build step, no external environment variables are available,