From db63e68b7e0790aa1fbeb4335d4cbcb36cc2c9d0 Mon Sep 17 00:00:00 2001 From: Ulrich Hornung Date: Sun, 4 Feb 2024 21:40:13 +0100 Subject: [PATCH] move ".android" (avd data) and "work" (tmp data) to data partition with more space --- .github/workflows/android.yml | 49 +++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cebf5d7827..c366c7172d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -54,12 +54,24 @@ jobs: run: | echo "AVD_CACHE_KEY=${{ matrix.os }}-${{ matrix.cores }}-${{ matrix.ram }}-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+${{ env.KEY_POSTFIX }}" >> $GITHUB_ENV - name: Collect information about runner + if: always() + continue-on-error: true run: | hostname uname -a free -mh - df -h + df -Th cat /proc/cpuinfo + - name: (Linux) create links from home to data partition + if: ${{ runner.os == 'Linux' }} + continue-on-error: true + run: | + ls -lah /mnt/ + cat /mnt/DATALOSS_WARNING_README.txt + sudo mkdir /mnt/data + sudo chmod a+rwx /mnt/data + mkdir /mnt/data/.android && ln -s /mnt/data/.android ~/.android + mkdir /mnt/data/work && ln -s /mnt/data/work ~/work - name: Enable KVM group perms (linux hardware acceleration) if: ${{ runner.os == 'Linux' }} run: | @@ -67,9 +79,16 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm - uses: actions/checkout@v4 + - name: Collect information about runner + if: always() + continue-on-error: true + run: | + free -mh + df -Th - name: Restore AVD cache uses: actions/cache/restore@v4 id: avd-cache + continue-on-error: true with: path: | ~/.android/avd/* @@ -77,12 +96,20 @@ jobs: ~/.android/adb* ~/__rustc_hash__ key: avd-${{ env.AVD_CACHE_KEY }} + - name: Collect information about runner after AVD cache + if: always() + continue-on-error: true + run: | + free -mh + df -Th + ls -lah /mnt/data + du -sch /mnt/data - name: Delete AVD Lockfile when run from cache if: steps.avd-cache.outputs.cache-hit == 'true' run: | rm -f \ ~/.android/avd/*.avd/*.lock \ - ~/.android/avd/*/*.lock + ~/.android/avd/*/*.lock - name: Create and cache emulator image if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2.30.1 @@ -123,6 +150,12 @@ jobs: # The version vX at the end of the key is just a development version to avoid conflicts in # the github cache during the development of this workflow key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3 + - name: Collect information about runner ressources + if: always() + continue-on-error: true + run: | + free -mh + df -Th - name: Build and Test uses: reactivecircus/android-emulator-runner@v2.30.1 with: @@ -144,6 +177,12 @@ jobs: util/android-commands.sh build util/android-commands.sh tests if [[ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]]; then util/android-commands.sh sync_image; fi; exit 0 + - name: Collect information about runner ressources + if: always() + continue-on-error: true + run: | + free -mh + df -Th - name: Save rust cache if: steps.rust-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 @@ -156,3 +195,9 @@ jobs: with: name: test_output_${{ env.AVD_CACHE_KEY }} path: output + - name: Collect information about runner ressources + if: always() + continue-on-error: true + run: | + free -mh + df -Th