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
This commit is contained in:
Lucas.Xu 2024-02-27 20:41:47 +07:00 committed by GitHub
parent f36ca3777b
commit d67e904f56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,17 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: 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 - name: Maximize build space
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
run: | run: |
@ -50,6 +60,9 @@ jobs:
sudo rm -rf ${GITHUB_WORKSPACE}/.git sudo rm -rf ${GITHUB_WORKSPACE}/.git
sudo rm -rf $ANDROID_HOME/ndk sudo rm -rf $ANDROID_HOME/ndk
- name: Check storage space
run: df -h
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -59,7 +72,6 @@ jobs:
with: with:
channel: "stable" channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }} flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- uses: nttld/setup-ndk@v1 - uses: nttld/setup-ndk@v1
id: setup-ndk id: setup-ndk
@ -71,12 +83,6 @@ jobs:
with: with:
gradle-version: 7.6.3 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 - uses: davidB/rust-cargo-make@v1
with: with:
version: "0.36.6" version: "0.36.6"