From 26bdf76fa06c9ea6f039f683a2165476f3692899 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Tue, 21 May 2024 04:39:11 +0000 Subject: [PATCH] ci: free disk space on necessary Signed-off-by: zhangzujian --- .github/workflows/build-x86-image.yaml | 63 ++++++++++++++------------ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-x86-image.yaml b/.github/workflows/build-x86-image.yaml index 13680c545af..35842ffeba4 100644 --- a/.github/workflows/build-x86-image.yaml +++ b/.github/workflows/build-x86-image.yaml @@ -34,16 +34,6 @@ jobs: outputs: build-base: ${{ steps.check.outputs.build-base }} steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - uses: actions/checkout@v4 with: fetch-depth: 2 @@ -57,6 +47,17 @@ jobs: echo build-base=1 >> "$GITHUB_OUTPUT" fi + - uses: jlumbroso/free-disk-space@v1.3.1 + if: steps.check.outputs.build-base == 1 + with: + android: true + dotnet: true + haskell: true + docker-images: false + large-packages: false + tool-cache: false + swap-storage: false + - uses: docker/setup-buildx-action@v3 if: steps.check.outputs.build-base == 1 @@ -80,16 +81,6 @@ jobs: outputs: build-dpdk-base: ${{ steps.check.outputs.build-dpdk-base }} steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - uses: actions/checkout@v4 with: fetch-depth: 2 @@ -103,6 +94,17 @@ jobs: echo build-dpdk-base=1 >> "$GITHUB_OUTPUT" fi + - uses: jlumbroso/free-disk-space@v1.3.1 + if: steps.check.outputs.build-dpdk-base == 1 + with: + android: true + dotnet: true + haskell: true + docker-images: false + large-packages: false + tool-cache: false + swap-storage: false + - uses: docker/setup-buildx-action@v3 if: steps.check.outputs.build-dpdk-base == 1 @@ -263,16 +265,6 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 15 steps: - - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: true - dotnet: true - haskell: true - docker-images: false - large-packages: false - tool-cache: false - swap-storage: false - - uses: actions/checkout@v4 - name: Create the default branch directory @@ -316,6 +308,17 @@ jobs: restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- lookup-only: true + - uses: jlumbroso/free-disk-space@v1.3.1 + if: steps.lookup-go-cache.outputs.cache-hit != 'true' + with: + android: true + dotnet: true + haskell: true + docker-images: false + large-packages: false + tool-cache: false + swap-storage: false + - name: Go cache if: steps.lookup-go-cache.outputs.cache-hit != 'true' uses: actions/cache@v4