Skip to content

Commit

Permalink
github: use relaim-disk-space action from LXD repo
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Oct 23, 2024
1 parent 1180386 commit fad2bcb
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,35 +186,9 @@ jobs:
# disable dpkg from calling sync()
echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io
- name: Reclaim some space
- name: Reclaim disk space
if: ${{ matrix.test == 'conversion' || startsWith(matrix.test, 'storage-') || matrix.test == 'vm-nesting' }}
run: |
set -eux
df -h
# Purge older snap revisions that are disabled/superseded by newer revisions of the same snap
snap list --all | while read -r name _ rev _ _ notes _; do
[[ "${notes}" =~ disabled$ ]] && sudo snap remove "${name}" --revision "${rev}" --purge
done || true
# Remove leftover home directories
sudo rm -rf /home/linuxbrew /home/runneradmin
# Remove unneeded directories
sudo rm -rf /opt/google/chrome
sudo rm -rf /opt/hostedtoolcache/CodeQL /opt/hostedtoolcache/PyPy /opt/hostedtoolcache/Python
sudo rm -rf /opt/microsoft/msedge /opt/microsoft/msodbcsql* /opt/microsoft/powershell
sudo rm -rf /root/.sbt
# This was inspired from https://github.com/easimon/maximize-build-space
df -h
# dotnet
sudo rm -rf /usr/share/dotnet
# android
sudo rm -rf /usr/local/lib/android
# haskell
sudo rm -rf /opt/ghc
df -h
uses: canonical/lxd/.github/actions/reclaim-disk-space@main

- name: Remove docker
run: |
Expand Down

0 comments on commit fad2bcb

Please sign in to comment.