]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitlab-ci: ignore failures to disable realtime monitoring
authorPatrick Steinhardt <ps@pks.im>
Thu, 2 Oct 2025 11:04:37 +0000 (13:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Oct 2025 16:44:41 +0000 (09:44 -0700)
We have recently introduced a change to disable realtime monitoring for
Windows job in GitLab CI. This change led (and still leads) to a quite
significant speedup.

But there's a catch: seemingly, some of the runners we use already have
realtime monitoring disabled. On such a machine, trying to disable the
feature again leads to an error that causes the whole job to fail.

Safeguard against such failures by explicitly ignoring them.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitlab-ci.yml

index 552c033fb0b72b108eeb2b243c38e39d1261393b..ed4dc9db94c23f640b58909825494d5c8d62f035 100644 (file)
@@ -113,7 +113,10 @@ test:osx:
     when: on_failure
 
 .windows_before_script: &windows_before_script
-  - Set-MpPreference -DisableRealtimeMonitoring $true
+  # 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