Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteio committed Dec 13, 2024
1 parent e0d0d4b commit 7e4bea1
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions src/ci/scripts/free-disk-space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# MACROS
# ======

list_installed_dpkg() {
dpkg --get-selections $@ | grep -v deinstall | awk '{print $1}'
}

# macro to print a line of equals
# # (silly but works)
printSeparationLine() {
Expand Down Expand Up @@ -150,18 +154,25 @@ printSavedSpace $SAVED "Haskell runtime"

BEFORE=$(getAvailableSpace)

sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y microsoft-edge-stable --fix-missing || echo "::debug::The command [sudo apt-get remove -y microsoft-edge-stable --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get remove -y snapd --fix-missing || echo "::debug::The command [sudo apt-get remove -y snapd --fix-missing] failed to complete successfully. Proceeding..."
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
pkgs=$(list_installed_dpkg \
'aspnetcore-*' \
'dotnet-*' \
'llvm-*' \
'*php*' \
'mongodb-*' \
'mysql-*' \
'azure-cli' \
'google-chrome-stable' \
'firefox' \
'powershell' \
'mono-devel' \
'libgl1-mesa-dri' \
'google-cloud-*' \
'gcloud-*' \
'microsoft-edge-*' \
'snapd' \
|| true)
sudo apt-get remove --autoremove -y $pkgs || echo "::warning::The command [sudo apt-get remove -y] failed to complete successfully. Proceeding..."

Check failure on line 175 in src/ci/scripts/free-disk-space.sh

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

line longer than 100 chars
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."

Check failure on line 176 in src/ci/scripts/free-disk-space.sh

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

line longer than 100 chars

AFTER=$(getAvailableSpace)
Expand Down

0 comments on commit 7e4bea1

Please sign in to comment.