-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workaround to prevent "no space left on device" error (#3172)
The error had been occurring for a few weeks when running e2e tests for Chrome on Ubuntu. Remove some cached tools to free up space as suggested in the official "runner-images" repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Free disk space on Ubuntu runner' | ||
description: 'Remove unused cached tools, to free disk space' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# | ||
# https://github.com/actions/runner-images/issues/2840#issuecomment-2272410832 (2024-08-07), taking implementation done in https://github.com/cilium/cilium/commit/e553bd23443ef14c8cbbeeafa7ebab3bb30c3fac and remove only tools that we don't use | ||
# We may also use https://github.com/jlumbroso/free-disk-space mentioned in https://github.com/actions/runner-images/issues/2875#issuecomment-1163363045 | ||
- name: Free up disk space | ||
shell: bash | ||
run: | | ||
echo "Disk space before cleanup..." | ||
df -kh | ||
echo "Removing unnecessary files to free up disk space..." | ||
sudo rm -rf \ | ||
"$AGENT_TOOLSDIRECTORY" \ | ||
/opt/microsoft/powershell \ | ||
/opt/pipx \ | ||
/usr/lib/mono \ | ||
/usr/local/julia* \ | ||
/usr/local/lib/android \ | ||
/usr/local/share/powershell \ | ||
/usr/share/dotnet \ | ||
/usr/share/swift | ||
echo "Disk space after cleanup..." | ||
df -kh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Log disk space' | ||
description: 'Log disk space (for troubleshooting)' | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Log disk space on Unix based OS | ||
shell: bash | ||
if: runner.os != 'Windows' | ||
run: df -kh | ||
- name: Log disk space on Windows | ||
shell: pwsh | ||
if: runner.os == 'Windows' | ||
run: Get-Volume | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters