@@ -144,24 +144,23 @@ jobs:
144
144
EXTRA_CONFIGURE_ARGS : --enable-fat-binary
145
145
EXTRA_SAGE_PACKAGES : ${{ inputs.extra_sage_packages }}
146
146
steps :
147
+ - name : Maximize build disk space
148
+ uses : easimon/maximize-build-space@v8
149
+ with :
150
+ # need space in /var for Docker images
151
+ root-reserve-mb : 40000
152
+ remove-dotnet : true
153
+ remove-android : true
154
+ remove-haskell : true
155
+ remove-codeql : true
156
+ remove-docker-images : true
157
+ if : inputs.free_disk_space
147
158
- name : Check out SageMath
148
159
uses : actions/checkout@v4
149
160
with :
150
161
repository : ${{ inputs.sage_repo }}
151
162
ref : ${{ inputs.sage_ref }}
152
163
fetch-depth : 10000
153
- - name : free disk space
154
- run : |
155
- df -h
156
- sudo swapoff -a
157
- sudo rm -f /swapfile
158
- sudo apt-get clean
159
- docker rmi $(docker image ls -aq)
160
- echo "Largest packages:"
161
- dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
162
- sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono|google-cloud-cli|microsoft-edge|azure-cli|temurin|llvm-|powershell|llvm-|r-base|postgresql)') || echo "(error ignored)"
163
- df -h
164
- if : inputs.free_disk_space
165
164
- name : Download upstream artifact
166
165
uses : actions/download-artifact@v3
167
166
with :
@@ -216,7 +215,10 @@ jobs:
216
215
.ci/merge-fixes.sh
217
216
env :
218
217
GH_TOKEN : ${{ github.token }}
219
-
218
+ - name : Show disk space
219
+ run : |
220
+ df -h
221
+ if : inputs.free_disk_space
220
222
- name : Configure and build Sage distribution within a Docker container
221
223
run : |
222
224
set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg NUMPROC=4 --build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
0 commit comments