Skip to content

Commit 3b71c9b

Browse files
free up disk space in CI runners
This change copies a script from :wq
1 parent 83efd9e commit 3b71c9b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@ inputs:
1212
runs:
1313
using: 'composite'
1414
steps:
15+
- name: Free up disk space
16+
shell: bash
17+
run: |
18+
# Source: https://github.com/apache/flink/blob/02d30ace69dc18555a5085eccf70ee884e73a16e/tools/azure-pipelines/free_disk_space.sh
19+
echo "=============================================================================="
20+
echo "Freeing up disk space on CI system"
21+
echo "=============================================================================="
22+
echo "Listing 100 largest packages"
23+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
24+
df -h
25+
echo "Removing large packages"
26+
sudo apt-get remove -y '^ghc-8.*'
27+
sudo apt-get remove -y '^dotnet-.*'
28+
sudo apt-get remove -y '^llvm-.*'
29+
sudo apt-get remove -y 'php.*'
30+
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
31+
sudo apt-get autoremove -y
32+
sudo apt-get clean
33+
df -h
34+
echo "Removing large directories"
35+
# deleting 15GB
36+
rm -rf /usr/share/dotnet/
37+
df -h
1538
- shell: bash
1639
run: |
1740
echo $HOME

0 commit comments

Comments
 (0)