From f75296e8fac7cb073b89a1508d058be4eb02c742 Mon Sep 17 00:00:00 2001 From: Artyom Savchenko Date: Tue, 18 Nov 2025 14:54:43 +0700 Subject: [PATCH 1/2] Free disk space for ui tests (#10225) * Free disk space for ui tests Signed-off-by: Artem Savchenko * Rollback space free Signed-off-by: Artem Savchenko * Add free space action Signed-off-by: Artem Savchenko * Remove temp Signed-off-by: Artem Savchenko * Fix free space Signed-off-by: Artem Savchenko * Add space check Signed-off-by: Artem Savchenko * Free temp only Signed-off-by: Artem Savchenko * Check root space Signed-off-by: Artem Savchenko * Extened cleanup Signed-off-by: Artem Savchenko * Do not remove temp Signed-off-by: Artem Savchenko --------- Signed-off-by: Artem Savchenko --- .github/actions/free-disk-space/action.yml | 17 +++++++++++++++++ .github/workflows/main.yml | 10 ++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/actions/free-disk-space/action.yml diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml new file mode 100644 index 0000000000..1eb453fa6e --- /dev/null +++ b/.github/actions/free-disk-space/action.yml @@ -0,0 +1,17 @@ +name: 'Free Space' +description: 'Free up disk space by removing files and directories that are not needed for tests.' +runs: + using: 'composite' + steps: + - name: Free space + shell: bash + run: | + echo "Disk space before cleanup:" + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/az_* + sudo rm -rf /opt/az + sudo rm -rf /usr/lib/google-cloud-sdk + echo "Disk space after cleanup:" + df -h diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd6150a0d0..260c59e71b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -240,7 +240,8 @@ jobs: with: username: hardcoreeng password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - + - name: Free space + uses: ./.github/actions/free-disk-space - name: Docker Build run: node common/scripts/install-run-rush.js docker env: @@ -371,7 +372,8 @@ jobs: with: username: hardcoreeng password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - + - name: Free space + uses: ./.github/actions/free-disk-space - name: Docker Build run: node common/scripts/install-run-rush.js docker env: @@ -467,6 +469,8 @@ jobs: with: username: hardcoreeng password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Free space + uses: ./.github/actions/free-disk-space - name: Docker Build run: node common/scripts/install-run-rush.js docker env: @@ -549,6 +553,8 @@ jobs: with: username: hardcoreeng password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + - name: Free space + uses: ./.github/actions/free-disk-space - name: Docker Build run: node common/scripts/install-run-rush.js docker env: From ea4e1c596dfa3b632a7a73cde36941eb62242cba Mon Sep 17 00:00:00 2001 From: Artyom Savchenko Date: Tue, 18 Nov 2025 16:29:37 +0700 Subject: [PATCH 2/2] Reuse and improve free space action (#10226) * Reuse and improve free space action Signed-off-by: Artem Savchenko * Checkout actions Signed-off-by: Artem Savchenko --------- Signed-off-by: Artem Savchenko --- .github/actions/free-disk-space/action.yml | 3 +++ .github/workflows/main.yml | 22 +++++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml index 1eb453fa6e..17164d82fb 100644 --- a/.github/actions/free-disk-space/action.yml +++ b/.github/actions/free-disk-space/action.yml @@ -13,5 +13,8 @@ runs: sudo rm -rf /usr/share/az_* sudo rm -rf /opt/az sudo rm -rf /usr/lib/google-cloud-sdk + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" echo "Disk space after cleanup:" df -h diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 260c59e71b..c57e37f938 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -612,16 +612,13 @@ jobs: timeout-minutes: 60 steps: # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 - - name: Free disk space - run: | - echo "Disk space before cleanup:" - df -h - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - echo "Disk space after cleanup:" - df -h + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + filter: tree:0 + submodules: recursive + - name: Free space + uses: ./.github/actions/free-disk-space - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Configure docker @@ -633,11 +630,6 @@ jobs: "containerd-snapshotter": true } } - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - filter: tree:0 - submodules: recursive - name: Checkout init repository run: |