From d67e904f560f49997ec809898f4806911f9066e9 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Tue, 27 Feb 2024 20:41:47 +0700 Subject: [PATCH] chore: cleanup disk space before running mobile ci (#4744) * chore: use macos instead of linux in ci to avoid no spaces error * chore: optimize disk space --- .github/workflows/mobile_ci.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mobile_ci.yaml b/.github/workflows/mobile_ci.yaml index 702b7a523a..edb5b93f1e 100644 --- a/.github/workflows/mobile_ci.yaml +++ b/.github/workflows/mobile_ci.yaml @@ -37,7 +37,17 @@ jobs: runs-on: ${{ matrix.os }} steps: - # the following step is required to avoid running out of space + - name: Check storage space + run: df -h + + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 2048 + swap-size-mb: 1024 + remove-dotnet: 'true' + + # the following step is required to avoid running out of space - name: Maximize build space if: matrix.os == 'ubuntu-latest' run: | @@ -50,6 +60,9 @@ jobs: sudo rm -rf ${GITHUB_WORKSPACE}/.git sudo rm -rf $ANDROID_HOME/ndk + - name: Check storage space + run: df -h + - name: Checkout source code uses: actions/checkout@v4 @@ -59,7 +72,6 @@ jobs: with: channel: "stable" flutter-version: ${{ env.FLUTTER_VERSION }} - cache: true - uses: nttld/setup-ndk@v1 id: setup-ndk @@ -71,12 +83,6 @@ jobs: with: gradle-version: 7.6.3 - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.os }} - workspaces: | - frontend/rust-lib - - uses: davidB/rust-cargo-make@v1 with: version: "0.36.6"