Skip to content

Commit bac83d3

Browse files
committed
Merge branch 'ps/ci-misc-updates' into seen
* ps/ci-misc-updates: ci: remove stale code for Azure Pipelines ci: use latest Ubuntu release ci: stop special-casing for Ubuntu 16.04 gitlab-ci: add linux32 job testing against i386 gitlab-ci: remove the "linux-old" job github: simplify computation of the job's distro github: convert all Linux jobs to be containerized github: adapt containerized jobs to be rootless t7422: fix flaky test caused by buffered stdout t0060: fix EBUSY in MinGW when setting up runtime prefix
2 parents 760f0c2 + 3f4f7d4 commit bac83d3

File tree

7 files changed

+63
-89
lines changed

7 files changed

+63
-89
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -259,19 +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-breaking-changes
269-
cc: gcc
270-
pool: ubuntu-20.04
271-
- jobname: linux-TEST-vars
272-
cc: gcc
273-
cc_package: gcc-8
274-
pool: ubuntu-20.04
275262
- jobname: osx-clang
276263
cc: clang
277264
pool: macos-13
@@ -284,23 +271,11 @@ jobs:
284271
- jobname: osx-meson
285272
cc: clang
286273
pool: macos-13
287-
- jobname: linux-leaks
288-
cc: gcc
289-
pool: ubuntu-latest
290-
- jobname: linux-reftable-leaks
291-
cc: gcc
292-
pool: ubuntu-latest
293-
- jobname: linux-asan-ubsan
294-
cc: clang
295-
pool: ubuntu-latest
296-
- jobname: linux-meson
297-
cc: gcc
298-
pool: ubuntu-latest
299274
env:
300275
CC: ${{matrix.vector.cc}}
301276
CC_PACKAGE: ${{matrix.vector.cc_package}}
302277
jobname: ${{matrix.vector.jobname}}
303-
distro: ${{matrix.vector.pool}}
278+
CI_JOB_IMAGE: ${{matrix.vector.pool}}
304279
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
305280
runs-on: ${{matrix.vector.pool}}
306281
steps:
@@ -338,27 +313,48 @@ jobs:
338313
fail-fast: false
339314
matrix:
340315
vector:
316+
- jobname: linux-sha256
317+
image: ubuntu:rolling
318+
cc: clang
319+
- jobname: linux-reftable
320+
image: ubuntu:rolling
321+
cc: clang
322+
- jobname: linux-TEST-vars
323+
image: ubuntu:20.04
324+
cc: gcc
325+
cc_package: gcc-8
326+
- jobname: linux-breaking-changes
327+
cc: gcc
328+
image: ubuntu:rolling
329+
- jobname: linux-leaks
330+
image: ubuntu:rolling
331+
cc: gcc
332+
- jobname: linux-reftable-leaks
333+
image: ubuntu:rolling
334+
cc: gcc
335+
- jobname: linux-asan-ubsan
336+
image: ubuntu:rolling
337+
cc: clang
338+
- jobname: linux-meson
339+
image: ubuntu:rolling
340+
cc: gcc
341341
- jobname: linux-musl
342-
image: alpine
343-
distro: alpine-latest
342+
image: alpine:latest
344343
# Supported until 2025-04-02.
345344
- jobname: linux32
346345
image: i386/ubuntu:focal
347-
distro: ubuntu32-20.04
348346
- jobname: pedantic
349-
image: fedora
350-
distro: fedora-latest
347+
image: fedora:latest
351348
# A RHEL 8 compatible distro. Supported until 2029-05-31.
352349
- jobname: almalinux-8
353350
image: almalinux:8
354-
distro: almalinux-8
355351
# Supported until 2026-08-31.
356352
- jobname: debian-11
357353
image: debian:11
358-
distro: debian-11
359354
env:
360355
jobname: ${{matrix.vector.jobname}}
361-
distro: ${{matrix.vector.distro}}
356+
CC: ${{matrix.vector.cc}}
357+
CI_JOB_IMAGE: ${{matrix.vector.image}}
362358
runs-on: ubuntu-latest
363359
container: ${{matrix.vector.image}}
364360
steps:
@@ -367,10 +363,12 @@ jobs:
367363
run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
368364
- uses: actions/checkout@v4
369365
- run: ci/install-dependencies.sh
370-
- run: ci/run-build-and-tests.sh
366+
- run: useradd builder --create-home
367+
- run: chown -R builder .
368+
- run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh
371369
- name: print test failures
372370
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
373-
run: ci/print-test-failures.sh
371+
run: sudo --preserve-env --set-home --user=builder ci/print-test-failures.sh
374372
- name: Upload failed tests' directories
375373
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
376374
uses: actions/upload-artifact@v4

.gitlab-ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,11 @@ test:linux:
3636
fi
3737
parallel:
3838
matrix:
39-
- jobname: linux-old
40-
image: ubuntu:20.04
41-
CC: gcc
4239
- jobname: linux-sha256
43-
image: ubuntu:latest
40+
image: ubuntu:rolling
4441
CC: clang
4542
- jobname: linux-reftable
46-
image: ubuntu:latest
43+
image: ubuntu:rolling
4744
CC: clang
4845
- jobname: linux-breaking-changes
4946
image: ubuntu:20.04
@@ -53,20 +50,22 @@ test:linux:
5350
CC: gcc
5451
CC_PACKAGE: gcc-8
5552
- jobname: linux-leaks
56-
image: ubuntu:latest
53+
image: ubuntu:rolling
5754
CC: gcc
5855
- jobname: linux-reftable-leaks
59-
image: ubuntu:latest
56+
image: ubuntu:rolling
6057
CC: gcc
6158
- jobname: linux-asan-ubsan
62-
image: ubuntu:latest
59+
image: ubuntu:rolling
6360
CC: clang
6461
- jobname: pedantic
6562
image: fedora:latest
6663
- jobname: linux-musl
6764
image: alpine:latest
65+
- jobname: linux32
66+
image: i386/ubuntu:20.04
6867
- jobname: linux-meson
69-
image: ubuntu:latest
68+
image: ubuntu:rolling
7069
CC: gcc
7170
artifacts:
7271
paths:

ci/install-dependencies.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ alpine-*)
3131
;;
3232
fedora-*|almalinux-*)
3333
dnf -yq update >/dev/null &&
34-
dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
34+
dnf -yq install shadow-utils sudo make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
3535
;;
36-
ubuntu-*|ubuntu32-*|debian-*)
36+
ubuntu-*|i386/ubuntu-*|debian-*)
3737
# Required so that apt doesn't wait for user input on certain packages.
3838
export DEBIAN_FRONTEND=noninteractive
3939

@@ -42,7 +42,7 @@ ubuntu-*|ubuntu32-*|debian-*)
4242
SVN='libsvn-perl subversion'
4343
LANGUAGES='language-pack-is'
4444
;;
45-
ubuntu32-*)
45+
i386/ubuntu-*)
4646
SVN=
4747
LANGUAGES='language-pack-is'
4848
;;

ci/lib.sh

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,7 @@ export TERM=${TERM:-dumb}
206206
# Clear MAKEFLAGS that may come from the outside world.
207207
export MAKEFLAGS=
208208

209-
if test -n "$SYSTEM_COLLECTIONURI" || test -n "$SYSTEM_TASKDEFINITIONSURI"
210-
then
211-
CI_TYPE=azure-pipelines
212-
# We are running in Azure Pipelines
213-
CI_BRANCH="$BUILD_SOURCEBRANCH"
214-
CI_COMMIT="$BUILD_SOURCEVERSION"
215-
CI_JOB_ID="$BUILD_BUILDID"
216-
CI_JOB_NUMBER="$BUILD_BUILDNUMBER"
217-
CI_OS_NAME="$(echo "$AGENT_OS" | tr A-Z a-z)"
218-
test darwin != "$CI_OS_NAME" || CI_OS_NAME=osx
219-
CI_REPO_SLUG="$(expr "$BUILD_REPOSITORY_URI" : '.*/\([^/]*/[^/]*\)$')"
220-
CC="${CC:-gcc}"
221-
222-
# use a subdirectory of the cache dir (because the file share is shared
223-
# among *all* phases)
224-
cache_dir="$HOME/test-cache/$SYSTEM_PHASENAME"
225-
226-
GIT_TEST_OPTS="--write-junit-xml"
227-
JOBS=10
228-
elif test true = "$GITHUB_ACTIONS"
209+
if test true = "$GITHUB_ACTIONS"
229210
then
230211
CI_TYPE=github-actions
231212
CI_BRANCH="$GITHUB_REF"
@@ -246,6 +227,8 @@ then
246227

247228
GIT_TEST_OPTS="--github-workflow-markup"
248229
JOBS=10
230+
231+
distro=$(echo "$CI_JOB_IMAGE" | tr : -)
249232
elif test true = "$GITLAB_CI"
250233
then
251234
CI_TYPE=gitlab-ci
@@ -267,7 +250,7 @@ then
267250
CI_OS_NAME=osx
268251
JOBS=$(nproc)
269252
;;
270-
*,alpine:*|*,fedora:*|*,ubuntu:*)
253+
*,alpine:*|*,fedora:*|*,ubuntu:*|*,i386/ubuntu:*)
271254
CI_OS_NAME=linux
272255
JOBS=$(nproc)
273256
;;
@@ -340,14 +323,7 @@ ubuntu-*)
340323
fi
341324
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
342325

343-
case "$distro" in
344-
ubuntu-16.04)
345-
# Apache is too old for HTTP/2.
346-
;;
347-
*)
348-
export GIT_TEST_HTTPD=true
349-
;;
350-
esac
326+
export GIT_TEST_HTTPD=true
351327

352328
# The Linux build installs the defined dependency versions below.
353329
# The OS X build installs much more recent versions, whichever

ci/print-test-failures.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ do
3939
test_name="${test_name##*/}"
4040
trash_dir="trash directory.$test_name"
4141
case "$CI_TYPE" in
42-
azure-pipelines)
43-
mkdir -p failed-test-artifacts
44-
mv "$trash_dir" failed-test-artifacts
45-
continue
46-
;;
4742
github-actions)
4843
mkdir -p failed-test-artifacts
4944
echo "FAILED_TEST_ARTIFACTS=${TEST_OUTPUT_DIRECTORY:t}/failed-test-artifacts" >>$GITHUB_ENV

t/t0060-path-utils.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,17 +592,19 @@ test_lazy_prereq CAN_EXEC_IN_PWD '
592592
./git rev-parse
593593
'
594594

595+
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'setup runtime prefix' '
596+
mkdir -p pretend/bin &&
597+
cp "$GIT_EXEC_PATH"/git$X pretend/bin/
598+
'
599+
595600
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
596-
mkdir -p pretend/bin pretend/libexec/git-core &&
601+
mkdir -p pretend/libexec/git-core &&
597602
echo "echo HERE" | write_script pretend/libexec/git-core/git-here &&
598-
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
599603
GIT_EXEC_PATH= ./pretend/bin/git here >actual &&
600604
echo HERE >expect &&
601605
test_cmp expect actual'
602606

603607
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
604-
mkdir -p pretend/bin &&
605-
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
606608
git config yes.path "%(prefix)/yes" &&
607609
GIT_EXEC_PATH= ./pretend/bin/git config --path yes.path >actual &&
608610
echo "$(pwd)/pretend/yes" >expect &&

t/t7422-submodule-output.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,13 @@ do
166166
'
167167
done
168168

169-
test_expect_success !MINGW 'git submodule status --recursive propagates SIGPIPE' '
170-
{ git submodule status --recursive 2>err; echo $?>status; } |
171-
grep -q X/S &&
169+
test_lazy_prereq STDBUF '
170+
stdbuf --version
171+
'
172+
173+
test_expect_success !MINGW,STDBUF 'git submodule status --recursive propagates SIGPIPE' '
174+
{ stdbuf -oL git submodule status --recursive 2>err; echo $?>status; } |
175+
stdbuf -i0 grep -q X/S &&
172176
test_must_be_empty err &&
173177
test_match_signal 13 "$(cat status)"
174178
'

0 commit comments

Comments
 (0)