Skip to content

Commit

Permalink
CI: Kill CI Test after 2 hours
Browse files Browse the repository at this point in the history
CI Test will sometimes run for 6 hours (before getting auto-terminated by GitHub):
- #14808
- #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.
  • Loading branch information
lupyuen authored and xiaoxiang781216 committed Nov 19, 2024
1 parent 9f835f6 commit 4cfdaa0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ jobs:
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
./cibuild.sh -c -A -N -R --codechecker testlist/${{matrix.boards}}.dat
else
( sleep 7200 ; echo Killing pytest after timeout... ; pkill -f pytest )&
./cibuild.sh -c -A -N -R -S testlist/${{matrix.boards}}.dat
fi
Expand Down

0 comments on commit 4cfdaa0

Please sign in to comment.