Skip to content

Commit 5b9abe5

Browse files
author
Matthias Koeppe
committed
1 parent 1bdb658 commit 5b9abe5

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/docker.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,24 +144,23 @@ jobs:
144144
EXTRA_CONFIGURE_ARGS: --enable-fat-binary
145145
EXTRA_SAGE_PACKAGES: ${{ inputs.extra_sage_packages }}
146146
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
147158
- name: Check out SageMath
148159
uses: actions/checkout@v4
149160
with:
150161
repository: ${{ inputs.sage_repo }}
151162
ref: ${{ inputs.sage_ref }}
152163
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
165164
- name: Download upstream artifact
166165
uses: actions/download-artifact@v3
167166
with:
@@ -216,7 +215,10 @@ jobs:
216215
.ci/merge-fixes.sh
217216
env:
218217
GH_TOKEN: ${{ github.token }}
219-
218+
- name: Show disk space
219+
run: |
220+
df -h
221+
if: inputs.free_disk_space
220222
- name: Configure and build Sage distribution within a Docker container
221223
run: |
222224
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

Comments
 (0)