From 1ffdffff50699c74d48704abada62ad8a1be09b0 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos <6349682+vaind@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:01:40 +0200 Subject: [PATCH] ci: free up disk space for android build (#4028) * ci: free up disk space for android build * tmp * free disk space * move to reusable action * add cleanup to other workflows --- .github/actions/disk-cleanup/action.yml | 19 +++++++++++++++++++ .github/workflows/e2e.yml | 9 +++++++++ .github/workflows/native-tests.yml | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 .github/actions/disk-cleanup/action.yml diff --git a/.github/actions/disk-cleanup/action.yml b/.github/actions/disk-cleanup/action.yml new file mode 100644 index 000000000..2f6b5a854 --- /dev/null +++ b/.github/actions/disk-cleanup/action.yml @@ -0,0 +1,19 @@ +name: Disk cleanup +description: Free disk space + +runs: + using: composite + + steps: + - shell: bash + run: | + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/.ghcup + sudo rm -rf /usr/share/swift + sudo rm -rf /usr/lib/google-cloud-sdk + sudo rm -rf /usr/local/aws* + sudo rm -rf /usr/local/julia* + sudo rm -rf /usr/local/share/chromium + df -h diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b4c2ea074..a8d8f4f0c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -50,6 +50,9 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/disk-cleanup + if: ${{ matrix.platform == 'android' }} + - run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer if: ${{ matrix.platform == 'ios' }} @@ -217,6 +220,9 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/disk-cleanup + if: ${{ matrix.platform == 'android' }} + - name: Sentry Release run: | SENTRY_RELEASE_CANDIDATE=$(echo 'e2e/${{ github.ref }}' | perl -pe 's/\//-/g') @@ -365,6 +371,9 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/disk-cleanup + if: ${{ matrix.platform == 'android' }} + - name: Setup Global Xcode Tools if: ${{ matrix.platform == 'ios' }} run: which xcbeautify || brew install xcbeautify diff --git a/.github/workflows/native-tests.yml b/.github/workflows/native-tests.yml index 209a9ad4a..2b741cd99 100644 --- a/.github/workflows/native-tests.yml +++ b/.github/workflows/native-tests.yml @@ -63,6 +63,8 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/disk-cleanup + - uses: actions/setup-java@v4 with: java-version: '17'