From 56fea16f7bfcea7c734a828d83e90401b4a04b3f Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 9 Aug 2026 21:55:50 +0200 Subject: [PATCH] fix(ci): reclaim disk before Android build --- .gitea/workflows/pixel10.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitea/workflows/pixel10.yml b/.gitea/workflows/pixel10.yml index e78c65b9..d6151217 100644 --- a/.gitea/workflows/pixel10.yml +++ b/.gitea/workflows/pixel10.yml @@ -143,6 +143,28 @@ jobs: # otherwise labels every one of those harmless lines as "ERROR". run: melos run build-go-runtime --no-select 2>&1 + - name: Reclaim disk before Android build + shell: bash + run: | + set -euo pipefail + + # These inputs and compiler caches are only needed to create the AAR + # installed by the previous step. Cargokit, Gradle and artifact upload + # need the reclaimed space later in the same job container. + rm -rf \ + "$RUNNER_TEMP/sing-box" \ + "$RUNNER_TEMP/IPtProxy" \ + native/go_mobile_runtime/.work/android + go clean -cache -modcache + + available_kib="$(df -Pk / | awk 'NR == 2 { print $4 }')" + minimum_kib=$((8 * 1024 * 1024)) + df -h / + if (( available_kib < minimum_kib )); then + echo "At least 8 GiB of free runner disk is required before the Android build; only $((available_kib / 1024 / 1024)) GiB is available." >&2 + exit 1 + fi + - name: Build and verify Pixel 10 APK env: GRADLE_OPTS: >-