forked from NVIDIA/NeMo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix "No space left on device" error (NVIDIA#281)
* Add action to free up disk space * Free up disk space before running lint and format --------- Signed-off-by: Christian Kadner <ckadner@us.ibm.com>
- Loading branch information
Showing
2 changed files
with
38 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,35 @@ | ||
name: "Free up disk space" | ||
description: "Removes non-essential tools, libraries and cached files from GitHub action runner node" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Remove non-essential tools and libraries" | ||
shell: bash | ||
run: | | ||
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | ||
echo "Disk usage before cleanup:" | ||
df -h | ||
echo "Removing non-essential tools and libraries ..." | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/local/share/boost | ||
echo "Deleting libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G) ..." | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL" | ||
sudo rm -rf /usr/local/share/powershell | ||
sudo rm -rf /usr/share/swift | ||
echo "Disk usage after cleanup:" | ||
df -h | ||
- name: "Prune docker images" | ||
shell: bash | ||
run: | | ||
echo "Pruning docker images ..." | ||
docker image prune -a -f | ||
docker system df | ||
echo "Disk usage after pruning docker images:" | ||
df -h |
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