Skip to content

Commit 58becf5

Browse files
authored
Merge pull request #6192 from trws/matrix-timeouts
matrix/actions: add per-target timeout-minutes
2 parents 29b93f6 + d5d7b44 commit 58becf5

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ jobs:
141141
DOCKER_USERNAME: travisflux
142142
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_TRAVISFLUX_TOKEN }}
143143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144-
timeout-minutes: 120
145144
strategy:
146145
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
147146
fail-fast: false
@@ -199,6 +198,7 @@ jobs:
199198
docker run --rm --privileged aptman/qus -s -- -p --credential aarch64
200199
201200
- name: docker-run-checks
201+
timeout-minutes: ${{matrix.timeout_minutes}}
202202
env: ${{matrix.env}}
203203
run: ${{matrix.command}}
204204

@@ -254,7 +254,7 @@ jobs:
254254
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
255255
docker manifest create fluxrm/flux-core:bookworm fluxrm/flux-core:bookworm-amd64 fluxrm/flux-core:bookworm-386 fluxrm/flux-core:bookworm-arm64
256256
docker manifest push fluxrm/flux-core:bookworm
257-
for d in el9 noble alpine ; do
257+
for d in el9 noble alpine fedora40 ; do
258258
docker manifest create fluxrm/flux-core:$d fluxrm/flux-core:$d-amd64 fluxrm/flux-core:$d-arm64
259259
docker manifest push fluxrm/flux-core:$d
260260
done

src/test/generate-matrix.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Generate a build matrix for use with github workflows
44
#
55

6+
from copy import deepcopy
67
import json
78
import os
89
import re
@@ -30,6 +31,7 @@ def on_master_or_tag(matrix):
3031
"when": on_master_or_tag,
3132
"suffix": " - arm64",
3233
"command_args": "--install-only ",
34+
"timeout_minutes": 90,
3335
},
3436
"linux/amd64": {"when": lambda _: True},
3537
}
@@ -92,6 +94,7 @@ def add_build(
9294
recheck=True,
9395
platform=None,
9496
command_args="",
97+
timeout_minutes=60,
9598
):
9699
"""Add a build to the matrix.include array"""
97100

@@ -150,6 +153,7 @@ def add_build(
150153
"docker_tag": docker_tag,
151154
"needs_buildx": needs_buildx,
152155
"create_release": create_release,
156+
"timeout_minutes": timeout_minutes,
153157
}
154158
)
155159

@@ -171,6 +175,7 @@ def add_multiarch_build(
171175
docker_tag=docker_tag,
172176
image=image if image is not None else name,
173177
command_args=args.get("command_args", ""),
178+
timeout_minutes=args.get("timeout_minutes", 30),
174179
**kwargs,
175180
)
176181

@@ -184,7 +189,7 @@ def __str__(self):
184189
matrix = BuildMatrix()
185190

186191
# Multi-arch builds, arm only builds on
187-
bookworm_platforms = dict(DEFAULT_MULTIARCH_PLATFORMS)
192+
bookworm_platforms = deepcopy(DEFAULT_MULTIARCH_PLATFORMS)
188193
bookworm_platforms["linux/386"] = {"when": lambda _: True, "suffix": " - 32 bit"}
189194
common_args = (
190195
"--prefix=/usr"
@@ -203,46 +208,44 @@ def __str__(self):
203208
TEST_INSTALL="t",
204209
),
205210
)
211+
fedora40_platforms = deepcopy(DEFAULT_MULTIARCH_PLATFORMS)
212+
fedora40_platforms["linux/arm64"]["timeout_minutes"] = 240
206213
matrix.add_multiarch_build(
207-
name="noble",
214+
name="fedora40",
208215
default_suffix=" - test-install",
209216
args=common_args,
217+
platforms=fedora40_platforms,
210218
env=dict(
211219
TEST_INSTALL="t",
212220
),
221+
docker_tag=True,
213222
)
223+
214224
matrix.add_multiarch_build(
215-
name="el9",
225+
name="noble",
216226
default_suffix=" - test-install",
217227
args=common_args,
218228
env=dict(
219229
TEST_INSTALL="t",
220230
),
221231
)
222232
matrix.add_multiarch_build(
223-
name="alpine",
233+
name="el9",
224234
default_suffix=" - test-install",
225-
args=(
226-
"--prefix=/usr"
227-
" --sysconfdir=/etc"
228-
" --with-systemdsystemunitdir=/etc/systemd/system"
229-
" --localstatedir=/var"
230-
" --with-flux-security"
231-
),
235+
args=common_args,
232236
env=dict(
233237
TEST_INSTALL="t",
234238
),
235239
)
236-
237-
# single arch builds that still produce a container
238-
matrix.add_build(
239-
name="fedora40 - test-install",
240+
matrix.add_multiarch_build(
241+
name="alpine",
242+
default_suffix=" - test-install",
240243
args=common_args,
241244
env=dict(
242245
TEST_INSTALL="t",
243246
),
244-
docker_tag=True,
245247
)
248+
# single arch builds that still produce a container
246249
# Ubuntu: TEST_INSTALL
247250
matrix.add_build(
248251
name="jammy - test-install",

0 commit comments

Comments
 (0)