Skip to content

Commit

Permalink
Cleanup some extra space before starting the build (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeage authored May 21, 2021
1 parent 29d3198 commit 1236d81
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,27 @@ jobs:


steps:
- name: Free extra space
# This takes several minutes, so we only do it where required
if: matrix.targetPlatform == 'Android'
run: |
echo "Initial free space"
df -h
sudo swapoff -a
sudo rm -f /swapfile
docker rmi $(docker image ls -aq)
#echo "Listing 100 largest packages"
#dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | head -n 100
echo "Removing large packages"
sudo apt-get remove -y '^ghc-8.*' '^dotnet-.*' azure-cli google-cloud-sdk 'adoptopenjdk-.*-hotspot' google-chrome-stable firefox 'php.*'
sudo apt-get autoremove -y
sudo apt-get clean
echo "Removing remaining large directories"
rm -rf /usr/share/dotnet/
rm -rf "$AGENT_TOOLSDIRECTORY"
echo "Disk space after cleanup"
df -h
- name: Checkout repository
uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 1236d81

Please sign in to comment.