Skip to content

Commit a824708

Browse files
authored
[build] Clean extra tools from GHA runner to free disk space (#17360)
1 parent eb42722 commit a824708

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/bazel.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ jobs:
9696
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
9797
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
9898
steps:
99+
- name: Remove extra tools to free disk space
100+
if: inputs.os == 'ubuntu'
101+
run: |
102+
echo "Removing extra tools to free disk space..."
103+
echo "Space before: $(df -BG / | tail -1 | awk '{print $4}')"
104+
sudo rm -rf /opt/ghc || true
105+
sudo rm -rf /usr/local/.ghcup || true
106+
sudo rm -rf /usr/local/share/boost || true
107+
sudo rm -rf /usr/share/swift || true
108+
sudo rm -rf /usr/local/julia* || true
109+
sync
110+
after=$(df -BG / | tail -1 | awk '{print $4}')
111+
echo "Space after: ${after}"
99112
- name: Calculate fetch depth
100113
id: depth
101114
shell: bash

0 commit comments

Comments
 (0)