Skip to content

Commit 6e024fc

Browse files
CI: Free up disk space for Android CI
1 parent 6edd77e commit 6e024fc

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ jobs:
248248

249249
steps:
250250
- uses: actions/checkout@v4
251+
- name: Free up disk space
252+
run: ./CI/gha-free-disk-space.sh
251253
- name: Run Tests on Android emulator
252254
uses: skiptools/swift-android-action@v2
253255
with:

CI/gha-free-disk-space.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -euxo pipefail
4+
5+
echo "===== Checking disk space before cleanup ====="
6+
7+
df -h
8+
9+
echo "===== Cleaning up unused files to free disk space ====="
10+
11+
sudo rm -rf \
12+
/usr/share/dotnet \
13+
/opt/ghc \
14+
/opt/hostedtoolcache/CodeQL
15+
16+
docker image prune --all --force
17+
docker builder prune -a
18+
19+
echo "===== Checking disk space after cleanup ====="
20+
df -h

0 commit comments

Comments
 (0)