Merge branch 'ps/gitlab-ci-windows-improvements' into jch

GitLab CI improvements.

* ps/gitlab-ci-windows-improvements:
  t8020: fix test failure due to indeterministic tag sorting
  gitlab-ci: upload Meson test logs as JUnit reports
  gitlab-ci: drop workaround for Python certificate store on Windows
  gitlab-ci: ignore failures to disable realtime monitoring
  gitlab-ci: dedup instructions to disable realtime monitoring
seen
Junio C Hamano 2025-10-06 10:25:22 -07:00
commit 47c90ae878
2 changed files with 36 additions and 27 deletions

View File

@ -70,6 +70,8 @@ test:linux:
artifacts:
paths:
- t/failed-test-artifacts
reports:
junit: build/meson-logs/testlog.junit.xml
when: on_failure

test:osx:
@ -110,8 +112,16 @@ test:osx:
artifacts:
paths:
- t/failed-test-artifacts
reports:
junit: build/meson-logs/testlog.junit.xml
when: on_failure

.windows_before_script: &windows_before_script
# Disabling realtime monitoring fails on some of the runners, but it
# significantly speeds up test execution in the case where it works. We thus
# try our luck, but ignore any failures.
- Set-MpPreference -DisableRealtimeMonitoring $true; $true

build:mingw64:
stage: build
tags:
@ -119,7 +129,7 @@ build:mingw64:
variables:
NO_PERL: 1
before_script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- *windows_before_script
- ./ci/install-sdk.ps1 -directory "git-sdk"
script:
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
@ -136,7 +146,7 @@ test:mingw64:
- job: "build:mingw64"
artifacts: true
before_script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- *windows_before_script
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
- New-Item -Path .git/info -ItemType Directory
- New-Item .git/info/exclude -ItemType File -Value "/git-sdk"
@ -150,18 +160,10 @@ test:mingw64:
tags:
- saas-windows-medium-amd64
before_script:
- Set-MpPreference -DisableRealtimeMonitoring $true
- choco install -y git meson ninja openssl
- *windows_before_script
- choco install -y git meson ninja
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
- refreshenv
# The certificate store for Python on Windows is broken and fails to fetch
# certificates, see https://bugs.python.org/issue36011. This seems to
# mostly be an issue with how the GitLab image is set up as it is a
# non-issue on GitHub Actions. Work around the issue by importing
# cetrificates manually.
- Invoke-WebRequest https://curl.haxx.se/ca/cacert.pem -OutFile cacert.pem
- openssl pkcs12 -export -nokeys -in cacert.pem -out certs.pfx -passout "pass:"
- Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath certs.pfx

build:msvc-meson:
extends: .msvc-meson
@ -183,6 +185,9 @@ test:msvc-meson:
script:
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
parallel: 10
artifacts:
reports:
junit: build/meson-logs/testlog.junit.xml

test:fuzz-smoke-tests:
image: ubuntu:latest

View File

@ -33,7 +33,6 @@ check_last_modified() {
done &&

cat >expect &&
test_when_finished "rm -f tmp.*" &&
git ${indir:+-C "$indir"} last-modified "$@" >tmp.1 &&
git name-rev --annotate-stdin --name-only --tags \
<tmp.1 >tmp.2 &&
@ -128,20 +127,25 @@ test_expect_success 'only last-modified files in the current tree' '
EOF
'

test_expect_success 'last-modified with subdir and criss-cross merge' '
git checkout -b branch-k1 1 &&
mkdir -p a k &&
test_commit k1 a/file2 &&
git checkout -b branch-k2 &&
test_commit k2 k/file2 &&
git checkout branch-k1 &&
test_merge km2 branch-k2 &&
test_merge km3 3 &&
test_expect_success 'subdirectory modified via merge' '
test_when_finished rm -rf repo &&
git init repo &&
(
cd repo &&
test_commit base &&
git switch --create left &&
mkdir subdir &&
test_commit left subdir/left &&
git switch --create right base &&
mkdir subdir &&
test_commit right subdir/right &&
git switch - &&
test_merge merge right &&
check_last_modified <<-\EOF
km3 a
k2 k
1 file
merge subdir
base base.t
EOF
)
'

test_expect_success 'cross merge boundaries in blaming' '