Skip to content

Commit 7bcf19b

Browse files
committed
CI: Kill CI Test after 2 hours
CI Test will sometimes run for 6 hours (before getting auto-terminated by GitHub): - apache#14808 - apache#14680 This is a problem because: - It will increase our usage of GitHub Runners. Which may overrun the [GitHub Actions Budget](https://infra.apache.org/github-actions-policy.html) allocated by ASF. - Suppose right after CI Test there's another build. If CI Test runs for all 6 hours, then the build after CI Test will never run. For this PR: We assume that Every CI Job (e.g. risc-v-05) will complete normally within 2 hours. If any CI Job exceeds 2 hours: This PR will kill the CI Test Process `pytest` and allow the next build to run.
1 parent af5252c commit 7bcf19b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ jobs:
184184
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
185185
./cibuild.sh -c -A -N -R --codechecker testlist/${{matrix.boards}}.dat
186186
else
187+
( sleep 7200 ; echo Killing pytest after timeout... ; pkill -f pytest )&
187188
./cibuild.sh -c -A -N -R -S testlist/${{matrix.boards}}.dat
188189
fi
189190

0 commit comments

Comments
 (0)