Skip to content

Commit 3b378e3

Browse files
[copilot] move gradle cache to /mnt (#10609)
Context: https://github.com/dotnet/android/actions/runs/19573553991/job/56052798645 Copilot is running out of disk space again, and I noticed that the gradle cache is on `/home/runner/.gradle/`, which has limited space. Moving it to `/mnt`, which has more space, should help alleviate this issue.
1 parent e397464 commit 3b378e3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ jobs:
2727
sudo mkdir -p /mnt/android-archives
2828
sudo mkdir -p /mnt/android-toolchain
2929
sudo mkdir -p /mnt/bin
30-
sudo chown $USER:$USER /mnt/android-archives /mnt/android-toolchain /mnt/bin
30+
sudo mkdir -p /mnt/gradle
31+
sudo chown $USER:$USER /mnt/android-archives /mnt/android-toolchain /mnt/bin /mnt/gradle
3132
3233
# Remove bin directory if it exists and create symlink to use the secondary disk
3334
rm -rf ./bin
3435
ln -s /mnt/bin ./bin
3536
37+
# Move Gradle cache to secondary disk to prevent "No space left on device" during Gradle operations
38+
mkdir -p /mnt/gradle
39+
ln -s /mnt/gradle $HOME/.gradle
40+
3641
echo "Android toolchain directories configured:"
3742
ls -la /mnt
3843
ls -lah bin
44+
ls -lah $HOME/.gradle
3945
df -h /mnt
4046
4147
- name: Setup .NET

0 commit comments

Comments
 (0)