File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 3434 upgrade-unity-version :
3535 name : Upgrade Unity version and packages to ${{ inputs.unityVersion }}
3636 runs-on : ubuntu-latest
37- strategy :
38- fail-fast : false
3937 steps :
4038 - name : Log input parameter
4139 run : |
7573 env :
7674 GIT_USER : ${{ github.actor }}
7775
76+ # Avoid running into space issues for github runners - Docker images can take up quite some space
77+ - name : Free Disk Space
78+ run : |
79+ echo "Disk space before cleanup:"
80+ df -h
81+ sudo rm -rf /usr/share/dotnet
82+ sudo rm -rf /opt/ghc
83+ sudo rm -rf /usr/local/share/boost
84+ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
85+ echo "Disk space after cleanup:"
86+ df -h
87+
7888 # Make sure the branch has the latest master changes in
7989 - name : Merge master into current branch
8090 if : ${{ inputs.mergeMaster }}
@@ -149,6 +159,18 @@ jobs:
149159 allowDirtyBuild : true
150160 manualExit : true
151161
162+ - name : Check Disk Space After Build
163+ if : ${{ !inputs.tagsOnly }}
164+ run : |
165+ echo "Disk space after build:"
166+ df -h
167+ AVAILABLE=$(df / | tail -1 | awk '{print $4}')
168+ AVAILABLE_GB=$(echo $AVAILABLE | sed 's/G//')
169+ echo "Available space: ${AVAILABLE_GB}GB"
170+ if (( $(echo "$AVAILABLE_GB < 1" | bc -l) )); then
171+ echo "::warning::Low disk space! Less than 1GB remaining."
172+ fi
173+
152174 - name : Delete build folder with elevated rights
153175 if : ${{ !inputs.tagsOnly }}
154176 run : sudo rm -rf ./build
You can’t perform that action at this time.
0 commit comments