Skip to content

Commit

Permalink
github: Use reclaim-disk-space action
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline committed Sep 12, 2024
1 parent 59be543 commit 0e928a2
Showing 1 changed file with 4 additions and 43 deletions.
47 changes: 4 additions & 43 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,29 +276,8 @@ jobs:
# disable dpkg from calling sync()
echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io
- name: Reclaim some space
run: |
set -eux
sudo snap remove lxd --purge
# 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$ ]] && snap remove "${name}" --revision "${rev}" --purge
done || true
# 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
# codeql
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h /
- name: Reclaim disk space
uses: ./.github/actions/reclaim-disk-space

- name: Remove docker
run: |
Expand Down Expand Up @@ -491,26 +470,8 @@ jobs:
# disable dpkg from calling sync()
echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io
- name: Reclaim some space
run: |
set -eux
# Purge snaps and snapd.
sudo snap remove --purge $(snap list | awk '!/^Name|^core|^snapd/ {print $1}') && sudo apt-get autopurge -y snapd
# 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
# codeql
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h /
- name: Reclaim disk space
uses: ./.github/actions/reclaim-disk-space

- name: Remove docker
run: |
Expand Down

0 comments on commit 0e928a2

Please sign in to comment.