From 32ccac2950601ea4cb04f1acd43445c10cefb8d5 Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Thu, 8 Aug 2024 09:45:59 +0800 Subject: [PATCH] fix: Optimize CI machine disk cleanup method to avoid no space left Signed-off-by: tao.yang --- .github/workflows/e2e-init.yaml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-init.yaml b/.github/workflows/e2e-init.yaml index 62c7261acd..fc668f79b7 100644 --- a/.github/workflows/e2e-init.yaml +++ b/.github/workflows/e2e-init.yaml @@ -55,15 +55,22 @@ jobs: echo "=========Current system kernel=================" uname -r - - name: Free disk space + - name: Free Disk Space (Ubuntu) + # https://github.com/spidernet-io/spiderpool/issues/3277 # https://github.com/actions/virtual-environments/issues/709 - run: | - echo "=========original CI disk space" - df -h - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - echo "=========after clean up, the left CI disk space" - df -h + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: Prepare id: prepare