From 9f91342e2359dd3727eb1ee632b66f315e403779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Va=C5=A1ko?= Date: Tue, 3 Sep 2024 12:13:44 +0200 Subject: [PATCH 1/2] fix: Prevent no disk space left on device by removing usused SDKs --- .github/workflows/test-unit.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 41794af096..2634bdbeca 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -53,6 +53,24 @@ jobs: docker-images: false swap-storage: false + # To free up disk space to not run out during the run + - name: Delete unused SDKs MacOS + if: matrix.name == 'mac-os' + run: | + echo "BEFORE CLEAN-UP:" + df -hI /dev/disk3s1s1 + sudo rm -rf /Applications/Xcode_14.3.1.app + sudo rm -rf /Applications/Xcode_15.0.1.app + sudo rm -rf /Applications/Xcode_15.1.app + sudo rm -rf /Applications/Xcode_15.2.app + sudo rm -rf /Applications/Xcode_15.3.app + #sudo rm -rf ~/.dotnet + #sudo rm -rf /Library/Android + #sudo rm -rf /Library/Developer/CoreSimulator + echo "AFTER CLEAN-UP:" + df -hI /dev/disk3s1s1 + continue-on-error: true + - name: Setup Go, tools and caching uses: ./.github/actions/go-setup with: From 731bc2ca0d2e58d89dc9feae95bb7170293fb8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Va=C5=A1ko?= Date: Tue, 3 Sep 2024 12:52:54 +0200 Subject: [PATCH 2/2] fix: Add wildcard for deleting. Remove unnecessary deletes --- .github/workflows/test-unit.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 2634bdbeca..76f5ef021a 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -59,14 +59,7 @@ jobs: run: | echo "BEFORE CLEAN-UP:" df -hI /dev/disk3s1s1 - sudo rm -rf /Applications/Xcode_14.3.1.app - sudo rm -rf /Applications/Xcode_15.0.1.app - sudo rm -rf /Applications/Xcode_15.1.app - sudo rm -rf /Applications/Xcode_15.2.app - sudo rm -rf /Applications/Xcode_15.3.app - #sudo rm -rf ~/.dotnet - #sudo rm -rf /Library/Android - #sudo rm -rf /Library/Developer/CoreSimulator + sudo rm -rf /Applications/Xcode_*.app echo "AFTER CLEAN-UP:" df -hI /dev/disk3s1s1 continue-on-error: true