From 7df3b6349e844df8caff699c18a84b9ff8fdb30c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 10 Nov 2023 17:21:50 -0800 Subject: [PATCH] .github/workflows/docker.yml: Interrupt the build before it gets canceled at 6 hours --- .github/workflows/docker.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3f5bf2e592c..cf1a04f6447 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -78,6 +78,10 @@ on: free_disk_space: default: false type: boolean + timeout: + description: 'Elapsed time (seconds) at which to kill the build' + default: 20000 + type: number # # Publishing to GitHub Packages # @@ -224,6 +228,7 @@ jobs: if: inputs.free_disk_space - name: Configure and build Sage distribution within a Docker container run: | + (sleep ${{ inputs.timeout }}; for id in $(docker ps -q); do docker exec $id pkill make; done) & 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::|;" - name: Copy logs from the Docker image or build container run: |