Git fork

gitlab-ci: disable realtime monitoring to unbreak Windows jobs

The GitLab CI runners using Windows machines have realtime monitoring
via Windows Defender enabled by default. This has just now started to
cause issues in our CI jobs using Microsoft Visual Studio:

Program 'meson.exe' failed to run: Operation did not complete successfully because the file contains a virus or
potentially unwanted softwareAt line:356 char:1
+ meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:356 char:1
+ meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed

The detected issue is more likely than not completely bogus, but it
breaks the jobs.

Fix the issue by disabling realtime monitoring. Besides unbreaking CI,
it also improves our build times a bit:

- Building Git goes from 26 to 22 minutes.

- Executing tests goes from ~1h for one slice of tests to ~30 minutes.

This is still painfully slow, but the issue here is that the Windows
runners on GitLab CI are quite underwhelming overall.

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

authored by

Patrick Steinhardt and committed by
Junio C Hamano
608cf5b7 f368df43

+3
+3
.gitlab-ci.yml
··· 119 119 variables: 120 120 NO_PERL: 1 121 121 before_script: 122 + - Set-MpPreference -DisableRealtimeMonitoring $true 122 123 - ./ci/install-sdk.ps1 -directory "git-sdk" 123 124 script: 124 125 - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts' ··· 135 136 - job: "build:mingw64" 136 137 artifacts: true 137 138 before_script: 139 + - Set-MpPreference -DisableRealtimeMonitoring $true 138 140 - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz' 139 141 - New-Item -Path .git/info -ItemType Directory 140 142 - New-Item .git/info/exclude -ItemType File -Value "/git-sdk" ··· 148 150 tags: 149 151 - saas-windows-medium-amd64 150 152 before_script: 153 + - Set-MpPreference -DisableRealtimeMonitoring $true 151 154 - choco install -y git meson ninja openssl 152 155 - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 153 156 - refreshenv