From 5f7b2aefb12e494edf94aad725993422afdad98c Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Thu, 29 Aug 2024 09:30:17 -0400 Subject: [PATCH] [ci] Check and free disk space on macos (#7014) --- .github/workflows/gradle.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fca9e037c08..39bf1bdacfa 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -135,6 +135,21 @@ jobs: - name: Check disk free space (Windows) run: wmic logicaldisk get caption, freespace if: matrix.os == 'windows-2022' + - name: Check disk free space pre-cleanup (macOS) + run: df -h . + if: matrix.os == 'macOS-14' + - name: Cleanup disk space + # CodeQL: 5G + # go: 748M + # Android: 12G + run: | + rm -rf /Users/runner/hostedtoolcache/CodeQL + rm -rf /Users/runner/hostedtoolcache/go + rm -rf /Users/runner/Library/Android + if: matrix.os == 'macOS-14' + - name: Check disk free space post-cleanup (macOS) + run: df -h . + if: matrix.os == 'macOS-14' - name: Build with Gradle run: ./gradlew ${{ matrix.task }} --build-cache -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} ${{ env.EXTRA_GRADLE_ARGS }} env: @@ -148,6 +163,9 @@ jobs: - name: Check disk free space (Windows) run: wmic logicaldisk get caption, freespace if: matrix.os == 'windows-2022' + - name: Check disk free space (macOS) + run: df -h . + if: matrix.os == 'macOS-14' - uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact-name }}