mirror of
https://github.com/uutils/coreutils
synced 2024-10-02 22:13:37 +00:00
move ".android" (avd data) and "work" (tmp data) to data partition
with more space
This commit is contained in:
parent
96d96e7de3
commit
db63e68b7e
49
.github/workflows/android.yml
vendored
49
.github/workflows/android.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue