Skip to content

Commit be198cd

Browse files
committed
ci: add timeout limits
So that they fail early instead of letting them run indefinitely when there are problems with the CI infrastructure. Use 5 minutes for the jobs that usually complete in under a minute (check-profiles and codespell) and 10 minutes for the rest (most jobs usually take 1-3 minutes).
1 parent 5604a72 commit be198cd

File tree

8 files changed

+22
-0
lines changed

8 files changed

+22
-0
lines changed

.github/workflows/build-extra.yml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
4141
jobs:
4242
build-clang:
4343
runs-on: ubuntu-22.04
44+
timeout-minutes: 10
4445
steps:
4546
- name: Harden Runner
4647
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
5757
jobs:
5858
build:
5959
runs-on: ubuntu-22.04
60+
timeout-minutes: 10
6061
steps:
6162
- name: Harden Runner
6263
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895

.github/workflows/check-c.yml

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
4343
jobs:
4444
scan-build:
4545
runs-on: ubuntu-22.04
46+
timeout-minutes: 10
4647
steps:
4748
- name: Harden Runner
4849
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895
@@ -74,6 +75,7 @@ jobs:
7475

7576
cppcheck:
7677
runs-on: ubuntu-22.04
78+
timeout-minutes: 10
7779
steps:
7880
- name: Harden Runner
7981
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895
@@ -101,6 +103,7 @@ jobs:
101103
# scan all files also with older cppcheck version from ubuntu 20.04.
102104
cppcheck_old:
103105
runs-on: ubuntu-20.04
106+
timeout-minutes: 10
104107
steps:
105108
- name: Harden Runner
106109
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895
@@ -129,6 +132,7 @@ jobs:
129132
contents: read
130133
security-events: write
131134
runs-on: ubuntu-latest
135+
timeout-minutes: 10
132136

133137
steps:
134138
- name: Harden Runner

.github/workflows/check-profiles.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ permissions: # added using https://github.com/step-security/secure-workflows
2929
jobs:
3030
profile-checks:
3131
runs-on: ubuntu-latest
32+
timeout-minutes: 5
33+
3234
steps:
3335
- name: Harden Runner
3436
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895

.github/workflows/check-python.yml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
contents: read
2828
security-events: write
2929
runs-on: ubuntu-latest
30+
timeout-minutes: 10
3031

3132
steps:
3233
- name: Harden Runner

.github/workflows/codespell.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
2121
jobs:
2222
codespell:
2323
runs-on: ubuntu-22.04
24+
timeout-minutes: 5
2425
steps:
2526
- name: Harden Runner
2627
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895

.github/workflows/test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ permissions: # added using https://github.com/step-security/secure-workflows
4949
jobs:
5050
test-main:
5151
runs-on: ubuntu-22.04
52+
timeout-minutes: 10
5253
env:
5354
SHELL: /bin/bash
5455
steps:
@@ -96,6 +97,7 @@ jobs:
9697

9798
test-fs:
9899
runs-on: ubuntu-22.04
100+
timeout-minutes: 10
99101
env:
100102
SHELL: /bin/bash
101103
steps:
@@ -134,6 +136,7 @@ jobs:
134136

135137
test-environment:
136138
runs-on: ubuntu-22.04
139+
timeout-minutes: 10
137140
env:
138141
SHELL: /bin/bash
139142
steps:
@@ -172,6 +175,7 @@ jobs:
172175

173176
test-utils:
174177
runs-on: ubuntu-22.04
178+
timeout-minutes: 10
175179
env:
176180
SHELL: /bin/bash
177181
steps:
@@ -212,6 +216,7 @@ jobs:
212216

213217
test-network:
214218
runs-on: ubuntu-22.04
219+
timeout-minutes: 10
215220
env:
216221
SHELL: /bin/bash
217222
steps:

.gitlab-ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
build_ubuntu_package:
1010
image: ubuntu:rolling
11+
timeout: 10 minutes
1112
variables:
1213
DEBIAN_FRONTEND: noninteractive
1314
script:
@@ -24,6 +25,7 @@ build_ubuntu_package:
2425

2526
build_debian_package:
2627
image: debian:buster
28+
timeout: 10 minutes
2729
variables:
2830
DEBIAN_FRONTEND: noninteractive
2931
script:
@@ -40,6 +42,7 @@ build_debian_package:
4042

4143
build_redhat_package:
4244
image: almalinux:latest
45+
timeout: 10 minutes
4346
script:
4447
- dnf update -y
4548
- dnf install -y rpm-build gcc make
@@ -51,6 +54,7 @@ build_redhat_package:
5154

5255
build_fedora_package:
5356
image: fedora:latest
57+
timeout: 10 minutes
5458
script:
5559
- dnf update -y
5660
- dnf install -y rpm-build gcc make
@@ -62,6 +66,7 @@ build_fedora_package:
6266

6367
build_src_package:
6468
image: alpine:latest
69+
timeout: 10 minutes
6570
script:
6671
- apk update
6772
- apk upgrade
@@ -74,6 +79,7 @@ build_src_package:
7479

7580
build_no_apparmor:
7681
image: ubuntu:latest
82+
timeout: 10 minutes
7783
variables:
7884
DEBIAN_FRONTEND: noninteractive
7985
script:
@@ -92,6 +98,7 @@ build_no_apparmor:
9298

9399
debian_ci:
94100
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
101+
timeout: 10 minutes
95102
variables:
96103
DEBFULLNAME: "$GITLAB_USER_NAME"
97104
DEBEMAIL: "$GITLAB_USER_EMAIL"

0 commit comments

Comments
 (0)