Skip to content

Commit 0b744b0

Browse files
committed
Add step-level timeouts to prevent hung jobs
This adds timeout-minutes to all workflow steps to prevent individual steps from hanging and consuming runner resources for extended periods (default job timeout is 6 hours). This prevents scenarios where a hung step blocks the runner for hours, improving overall CI responsiveness and resource utilization.
1 parent 8dbf440 commit 0b744b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,20 @@ jobs:
4747
if: matrix.dependency != 'none'
4848
run: |
4949
sudo apt-get install -y ${{ matrix.dependency }}
50+
timeout-minutes: 5
5051
- name: default build
5152
run: make
5253
shell: bash
54+
timeout-minutes: 5
5355
- name: automated test
5456
run: .ci/autorun.sh
5557
shell: bash
58+
timeout-minutes: 10
5659
- name: netdev test
5760
run: .ci/test-netdev.sh
5861
shell: bash
5962
if: ${{ success() }}
63+
timeout-minutes: 10
6064

6165
semu-macOS:
6266
runs-on: macos-latest
@@ -87,9 +91,11 @@ jobs:
8791
- name: default build
8892
run: make
8993
shell: bash
94+
timeout-minutes: 20
9095
- name: automated test
9196
run: .ci/autorun.sh
9297
shell: bash
98+
timeout-minutes: 15
9399

94100
coding_style:
95101
runs-on: ubuntu-24.04
@@ -103,11 +109,13 @@ jobs:
103109
sudo apt-get update
104110
sudo apt-get install -q -y clang-format-18
105111
shell: bash
112+
timeout-minutes: 5
106113
- name: Setup reviewdog
107114
uses: reviewdog/action-setup@v1
108115
if: github.event_name == 'pull_request'
109116
with:
110117
reviewdog_version: latest
118+
timeout-minutes: 5
111119
- name: Run clang-format with reviewdog
112120
if: github.event_name == 'pull_request'
113121
env:
@@ -139,6 +147,8 @@ jobs:
139147
-fail-on-error=false \
140148
-level=warning || true
141149
shell: bash
150+
timeout-minutes: 5
142151
- name: Check formatting (fail on violations)
143152
run: .ci/check-format.sh
144153
shell: bash
154+
timeout-minutes: 5

0 commit comments

Comments
 (0)