Skip to content

Commit 7df3b63

Browse files
author
Matthias Koeppe
committed
.github/workflows/docker.yml: Interrupt the build before it gets canceled at 6 hours
1 parent 4430e4c commit 7df3b63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ on:
7878
free_disk_space:
7979
default: false
8080
type: boolean
81+
timeout:
82+
description: 'Elapsed time (seconds) at which to kill the build'
83+
default: 20000
84+
type: number
8185
#
8286
# Publishing to GitHub Packages
8387
#
@@ -224,6 +228,7 @@ jobs:
224228
if: inputs.free_disk_space
225229
- name: Configure and build Sage distribution within a Docker container
226230
run: |
231+
(sleep ${{ inputs.timeout }}; for id in $(docker ps -q); do docker exec $id pkill make; done) &
227232
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::|;"
228233
- name: Copy logs from the Docker image or build container
229234
run: |

0 commit comments

Comments
 (0)