Skip to content

Commit c1e15ab

Browse files
authored
CP-35266: remove some unused files to free disk space in CI (#548)
The disk being almost full was causing some tests to fail in CI. This just deletes some stuff we don't use (like .NET and GHC) before running the smoke tests.
1 parent afa925a commit c1e15ab

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/golang-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,28 @@ jobs:
212212
- name: Install dependencies in tests directory
213213
run: go -C tests mod tidy
214214

215+
# Free up disk space to prevent Docker overlay FS from exceeding 85%
216+
- name: Free up disk space
217+
run: |
218+
echo "=== Cleaning up disk space ==="
219+
220+
# Remove Docker images and build cache
221+
docker system prune -af --volumes
222+
223+
# Clean apt cache
224+
sudo apt-get clean
225+
sudo rm -rf /var/lib/apt/lists/*
226+
227+
# Remove large tools we don't need
228+
# Android SDK, .NET, etc. are often pre-installed but unused
229+
sudo rm -rf /usr/share/dotnet
230+
sudo rm -rf /usr/local/lib/android
231+
sudo rm -rf /opt/ghc
232+
233+
echo ""
234+
echo "=== Disk Usage After Cleanup ==="
235+
df -h / | tail -1
236+
215237
# smoke tests hit alfa.
216238
- name: Run smoke tests
217239
run: GO="$(which go)" sudo -E make test-smoke

0 commit comments

Comments
 (0)