Skip to content

Commit 9548e04

Browse files
pks-tgitster
authored andcommitted
github: convert all Linux jobs to be containerized
We have split the CI jobs in GitHub Workflows into two categories: - Those running on a machine pool directly. - Those running in a container on the machine pool. The latter is more flexible because it allows us to freely pick whatever container image we want to use for a specific job, while the former only allows us to pick from a handful of different distros. The containerized jobs do not have any significant downsides to the best of my knowledge: - They aren't significantly slower to start up. A quick comparison by Peff shows that the difference is mostly lost in the noise: job | old | new --------------------|------|------ linux-TEST-vars 11m30s 10m54s linux-asan-ubsan 30m26s 31m14s linux-gcc 9m47s 10m6s linux-gcc-default 9m47s 9m41s linux-leaks 25m50s 25m21s linux-meson 10m36s 10m41s linux-reftable 10m25s 10m23s linux-reftable-leaks 27m18s 27m28s linux-sha256 9m54s 10m31s Some jobs are a bit faster, some are a bit slower, but there does not seem to be any significant change. - Containerized jobs run as root, which keeps a couple of tests from running. This has been addressed in the preceding commit though, where we now use setpriv(1) to run tests as a separate user. - GitHub injects a Node binary into containerized jobs, which is dynamically linked. This has led to some issues in the past [1], but only for our 32 bit jobs. The issues have since been resolved. Overall there seem to be no downsides, but the upside is that we have more control over the exact image that these jobs use. Convert the Linux jobs accordingly. [1]: https://lore.kernel.org/git/[email protected]/ Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2a21098 commit 9548e04

File tree

1 file changed

+39
-29
lines changed

1 file changed

+39
-29
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -259,20 +259,6 @@ jobs:
259259
fail-fast: false
260260
matrix:
261261
vector:
262-
- jobname: linux-sha256
263-
cc: clang
264-
pool: ubuntu-latest
265-
- jobname: linux-reftable
266-
cc: clang
267-
pool: ubuntu-latest
268-
- jobname: linux-gcc
269-
cc: gcc
270-
cc_package: gcc-8
271-
pool: ubuntu-20.04
272-
- jobname: linux-TEST-vars
273-
cc: gcc
274-
cc_package: gcc-8
275-
pool: ubuntu-20.04
276262
- jobname: osx-clang
277263
cc: clang
278264
pool: macos-13
@@ -285,21 +271,6 @@ jobs:
285271
- jobname: osx-meson
286272
cc: clang
287273
pool: macos-13
288-
- jobname: linux-gcc-default
289-
cc: gcc
290-
pool: ubuntu-latest
291-
- jobname: linux-leaks
292-
cc: gcc
293-
pool: ubuntu-latest
294-
- jobname: linux-reftable-leaks
295-
cc: gcc
296-
pool: ubuntu-latest
297-
- jobname: linux-asan-ubsan
298-
cc: clang
299-
pool: ubuntu-latest
300-
- jobname: linux-meson
301-
cc: gcc
302-
pool: ubuntu-latest
303274
env:
304275
CC: ${{matrix.vector.cc}}
305276
CC_PACKAGE: ${{matrix.vector.cc_package}}
@@ -342,6 +313,44 @@ jobs:
342313
fail-fast: false
343314
matrix:
344315
vector:
316+
- jobname: linux-sha256
317+
image: ubuntu:latest
318+
cc: clang
319+
distro: ubuntu-latest
320+
- jobname: linux-reftable
321+
image: ubuntu:latest
322+
cc: clang
323+
distro: ubuntu-latest
324+
- jobname: linux-gcc
325+
image: ubuntu:20.04
326+
cc: gcc
327+
cc_package: gcc-8
328+
distro: ubuntu-20.04
329+
- jobname: linux-TEST-vars
330+
image: ubuntu:20.04
331+
cc: gcc
332+
cc_package: gcc-8
333+
distro: ubuntu-20.04
334+
- jobname: linux-gcc-default
335+
image: ubuntu:latest
336+
cc: gcc
337+
distro: ubuntu-latest
338+
- jobname: linux-leaks
339+
image: ubuntu:latest
340+
cc: gcc
341+
distro: ubuntu-latest
342+
- jobname: linux-reftable-leaks
343+
image: ubuntu:latest
344+
cc: gcc
345+
distro: ubuntu-latest
346+
- jobname: linux-asan-ubsan
347+
image: ubuntu:latest
348+
cc: clang
349+
distro: ubuntu-latest
350+
- jobname: linux-meson
351+
image: ubuntu:latest
352+
cc: gcc
353+
distro: ubuntu-latest
345354
- jobname: linux-musl
346355
image: alpine
347356
distro: alpine-latest
@@ -363,6 +372,7 @@ jobs:
363372
env:
364373
jobname: ${{matrix.vector.jobname}}
365374
distro: ${{matrix.vector.distro}}
375+
CC: ${{matrix.vector.cc}}
366376
runs-on: ubuntu-latest
367377
container: ${{matrix.vector.image}}
368378
steps:

0 commit comments

Comments
 (0)