Skip to content

Commit

Permalink
add action to free up disk space for cuda test
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Jan 25, 2025
1 parent ce96f80 commit 6ae4264
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/actions/free-space-ubuntu/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Free space on Ubuntu VMs
description: Frees disk space on GitHub Actions Ubuntu VMs

runs:
using: composite
steps:
- id: show-space-initial
run: df -h
shell: bash
- id: list-largest-packages
run: |
dpkg-query -W --showformat='${Package} ${Installed-Size}\n' | sort -k2 -n -r | awk 'NR <= 20'
shell: bash
- id: uninstall-packages
run: |
sudo apt-get purge -y azure-cli --fix-missing
sudo apt-get purge -y microsoft-edge-stable --fix-missing
sudo apt-get purge -y google-cloud-sdk --fix-missing
sudo apt-get purge -y google-cloud-cli --fix-missing
sudo apt-get purge -y '^dotnet-sdk-.*' --fix-missing
sudo apt-get purge -y google-chrome-stable --fix-missing
sudo apt-get purge -y '^temurin-.*' --fix-missing
sudo apt-get purge -y hhvm --fix-missing
sudo apt-get purge -y '^mongodb-.*' --fix-missing
sudo apt-get purge -y 'llvm-.*' --fix-missing
sudo apt-get purge -y esl-erlang --fix-missing
sudo apt-get purge -y '^mysql-.*' --fix-missing
sudo apt-get purge -y powershell --fix-missing
sudo apt-get autoremove -y
sudo apt-get update
sudo apt-get clean
sudo docker image prune --all --force || true
shell: bash
- id: list-largest-packages-remaining
run: |
dpkg-query -W --showformat='${Package} ${Installed-Size}\n' | sort -k2 -n -r | awk 'NR <= 20'
shell: bash
- id: remove-directories
run: |
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
shell: bash
- id: show-space-final
run: df -h
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/cuda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Free up disk space
uses: ./.github/actions/free-space-ubuntu
- name: Prepare CUDA environment
run: Submodules/AMReX/.github/workflows/dependencies/dependencies_nvcc.sh ${{matrix.cuda_ver}}
- name: Install CCache
Expand Down

0 comments on commit 6ae4264

Please sign in to comment.