From patchwork Wed Oct 9 13:25:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13828438 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11215196C86 for ; Wed, 9 Oct 2024 13:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480323; cv=none; b=q2KJJHuwg8qpN//KlsZQSM/aIxodZdCb751nen1soa0iKSSeiSSQfWKsq0t2G2V+dSYpjxJRpLXKRk/UiZTOmqil2T5it/RUGLxDthLTEXp/JNsrouV4ZsC+BY4s2w+DbNX5F2nDc7hekK42sDIu/29/4vkqExZ4D6+zV4Fft2s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480323; c=relaxed/simple; bh=1yCIAfjhdKFTfj0dZfdiqbEjfI+ddB9eZ4/UfhxhG4c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XRE0dDz2aLbK3kP+glJ5pX2qKpsSekE5yRph96stDuYqS95oP1qCU1oNu3CwSD0p4WvdNHZ9bV0PnT3X6F+RLXAlnkTeo6rvf97Je1QnoKf97NFnZqsaTSEfRL6wU6CzrBnDFaoMPRI6vNCJdI3kDWYKGWGmf/fQPRFZanFVAKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=a1/zdaKZ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=F0athtRU; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="a1/zdaKZ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="F0athtRU" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2E3C81140126; Wed, 9 Oct 2024 09:25:21 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 09 Oct 2024 09:25:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1728480321; x=1728566721; bh=Pwhz13NUWE Z66UKZevT+M3aaoVZtSCY2uliqi+YYyXU=; b=a1/zdaKZfUywnhhfYFNkiuyqD6 FXItfww3v1DmJc/0lF4DInq2DByCgmEsdZx9ceUprZI9EOopfih2holTu88atLjA UISS6UorbpEE35zO0tFWRjUyBRzKMksdUpChBtpyC1e3c9CFOsTCmXRUYM/L3PWW fv8AxspTiGZ2HKQLmpnu6pV7wGm1Q7C/eoscTuj2rlfc4DYuT6+DPlOkvQ23MNHG RAD5x6qgMBbubRMxgCzV1Xv1G0eM0bGP0XVskyM/ZMI0tUSUH+1RfR+Ty8beq9HF VVx7y2KxyduShRbXzm39e2VALQBYM9EbueGMjswGECU67Mv2Mo2NVYJLt6EQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728480321; x=1728566721; bh=Pwhz13NUWEZ66UKZevT+M3aaoVZt SCY2uliqi+YYyXU=; b=F0athtRU9gaCL8SiPXx4aBVzY1cXanb84GeAjyL/Rtoe DPSE87wqGdSfj458M1AjTFLiPJbqec+cZ2FugEf23CKPovYx3HmnXvR2FD/DlSIl EBzmjQB9zXwAIpaHRDxGTJeKr8PFZcE4pkzaQPOJEzTTfrBqvr9zaHyNtIcmcre9 JZpTIeNFbsmEyhZlapsF3IMNWTMRi57DmCbqmmdUqv6syIvUu03IQ3cssp7zGKhI m2MQK7LRJfmMollg8aXvL6bUEtxOr8cS7mVWA9ejzLdM0XgzvgIR2oFPfE1S25tI KbchdnR1APAtqDjSXg7FMAhU3GHVP56+4AqSp79cGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimh eqnecuggftrfgrthhtvghrnhepveekkeffhfeitdeludeigfejtdetvdelvdduhefgueeg udfghfeukefhjedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprh gtphhtthhopehjohhhrghnnhgvshdrshgthhhinhguvghlihhnsehgmhigrdguvg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 09:25:20 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 6a860483 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 9 Oct 2024 13:24:17 +0000 (UTC) Date: Wed, 9 Oct 2024 15:25:18 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Johannes Schindelin Subject: [PATCH 1/5] t7300: work around platform-specific behaviour with long paths on MinGW Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Windows by default has a restriction in place to only allow paths up to 260 characters. This restriction can nowadays be lifted by setting a registry key, but is still active by default. In t7300 we have one test that exercises the behaviour of git-clean(1) with such long paths. Interestingly enough, this test fails on my system that uses Windows 10 with mingw-w64 installed via MSYS2: instead of observing ENAMETOOLONG, we observe ENOENT. This behaviour is consistent across multiple different environments I have tried. I cannot say why exactly we observe a different error here, but I would not be surprised if this was either dependent on the Windows version, the version of MinGW, the current working directory of Git or any kind of combination of these. Work around the issue by handling both errors. Signed-off-by: Patrick Steinhardt --- t/t7300-clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 0aae0dee67..12ab25296b 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -747,7 +747,7 @@ test_expect_success MINGW 'handle clean & core.longpaths = false nicely' ' test_must_fail git clean -xdf 2>.git/err && # grepping for a strerror string is unportable but it is OK here with # MINGW prereq - test_grep "too long" .git/err + test_grep -e "too long" -e "No such file or directory" .git/err ' test_expect_success 'clean untracked paths by pathspec' ' From patchwork Wed Oct 9 13:25:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13828439 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02E3F198A24 for ; Wed, 9 Oct 2024 13:25:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480325; cv=none; b=YPi1rmM6qk8tkFrsXO26E9vpyvhjf5TeCvO62z+9MjrTgFf7oGZQo7StqAlktNJEzWC2OgifulSGDwgun8LRTrUNxnkPZJjdVveUMz9LQ3dYoz/clNTq+R0sHDc+te8uTI2xkCYRoxHRw6Pqe4udHN0jN2XMab99sYTjR8F6VZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480325; c=relaxed/simple; bh=KrGVR2bjeKOoHiyyEm3ZL/GqOGrGyHJzuc8NN02ci34=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZLWxLbV+njyfIANVdJLeNlJrDmcXAOkLztAoIEEbHumgtQobAo523C2C6SKMFt1YwiDYDLzy59pxubVRukMrbXD+Fyxf39QvTcuy342gkvxZ8tPi7lNEBVzFNbdykJy7ivKXIDMveVubEIzrzRxiWwAa/nsaa6X2YT/5jWp0+CY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=HEgGfT2m; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Rg4gk1mr; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="HEgGfT2m"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Rg4gk1mr" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 33DB7114019F; Wed, 9 Oct 2024 09:25:23 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Wed, 09 Oct 2024 09:25:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1728480323; x=1728566723; bh=pdcBwyN1Vq F/f1ZAV1WTuvcdLJOvDh+mlvzrHHkLwdE=; b=HEgGfT2m4uy7Lw/B3qqFu6JEEJ FfLKbZxOuL4ZMD7KX1TA+mDcDL0z7CLV6bKOgQj0vHUWkKkxxgMOc9FeHWx9r2xG OK9MPmxH599G+H8LoGEi9VEKxTE6cfv+zYRoz7GhNYyVmKZdQWQJpAujt8gLkF7B QOMH79Di+BFB/tJWpPt3PPQ1pMqR/IZZE2Iz74LZ43eFKNorRzTGcB+tvs4zi/dC JlGIBqaiePb8/O2BbtlIVOlfa+Gw0DAYJEOXd948CFHvglY/AZN4vhPxrY1Z7NJn yV1JQmay94yB0cMlbj/mVUw6sZN9SPpa144WH4urS+5oOycxyrTvi1QErilA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728480323; x=1728566723; bh=pdcBwyN1VqF/f1ZAV1WTuvcdLJOv Dh+mlvzrHHkLwdE=; b=Rg4gk1mrHHp7MwS3YKfMXsWF+pDTQTLe/T5yJ73NWeCD HPT3TQcR+SAQA1nJoQaoK3CkAs+aOuufKLjK7RaywRAahT4wDsexOWb9KOu0Aoz6 oxq/dRz298qRPiiBL8zbcVUMU9OkHWXG5zpzuUTbBKUdWab1uuo5fkUMIGP4H7vW fSeKIIfQ5nzurxNeto9PAH0EIQl2AWhnRFGsSy08Xzw/RNylg2r/0YnLTBFVyy+s mFsn62lZuIqMWNYtj7B7dfV6CXRweh7ZOvCjpD/Uy9zMY0ahiYURytKMSl+WMLXA amcmaAHNPmjgA+Jda33b/SQMDlf3mqu7End/lq6yPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimh eqnecuggftrfgrthhtvghrnhephfeigfdvffdvtdeuhfelgfelhefgfeevueetffdugfeh tefgveelhfeuueevuedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhm pdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgih htsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjhhohhgrnhhnvghsrdhs tghhihhnuggvlhhinhesghhmgidruggv X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 09:25:22 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 410ad99b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 9 Oct 2024 13:24:19 +0000 (UTC) Date: Wed, 9 Oct 2024 15:25:21 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Johannes Schindelin Subject: [PATCH 2/5] ci: create script to set up Git for Windows SDK Message-ID: <9f36f2125f0f17b173aa0cf9ed2e7df66cd8e76f.1728480039.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In order to build and test Git, we have to first set up the Git for Windows SDK, which contains various required tools and libraries. The SDK is basically a clone of [1], but that repository is quite large due to all the binaries it contains. We thus use both shallow clones and sparse checkouts to speed up the setup. To handle this complexity we use a GitHub action that is hosted externally at [2]. Unfortunately, this makes it rather hard to reuse the logic for CI platforms other than GitHub Actions. After chatting with Johannes Schindelin we came to the conclusion that it would be nice if the Git for Windows SDK would regularly publish releases that one can easily download and extract, thus moving all of the complexity into that single step. Like this, all that a CI job needs to do is to fetch and extract the resulting archive. This published release comes in the form of a new "ci-artifacts" tag that gets updated regularly [3]. Implement a new script that knows how to fetch and extract that script and convert GitHub Actions to use it. [1]: https://github.com/git-for-windows/git-sdk-64/ [2]: https://github.com/git-for-windows/setup-git-for-windows-sdk/ [3]: https://github.com/git-for-windows/git-sdk-64/releases/tag/ci-artifacts/ Helped-by: Johannes Schindelin Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 16 ++++++++++------ ci/install-sdk.ps1 | 12 ++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100755 ci/install-sdk.ps1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 916a64b673..9301a1edd6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,13 +113,15 @@ jobs: cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} steps: - uses: actions/checkout@v4 - - uses: git-for-windows/setup-git-for-windows-sdk@v1 + - name: setup SDK + shell: powershell + run: ci/install-sdk.ps1 - name: build - shell: bash + shell: powershell env: HOME: ${{runner.workspace}} NO_PERL: 1 - run: . /etc/profile && ci/make-test-artifacts.sh artifacts + run: git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts' - name: zip up tracked files run: git archive -o artifacts/tracked.tar.gz HEAD - name: upload tracked files and build artifacts @@ -147,10 +149,12 @@ jobs: - name: extract tracked files and build artifacts shell: bash run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz - - uses: git-for-windows/setup-git-for-windows-sdk@v1 + - name: setup SDK + shell: powershell + run: ci/install-sdk.ps1 - name: test - shell: bash - run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10 + shell: powershell + run: git-sdk/usr/bin/bash.exe -l -c 'ci/run-test-slice.sh ${{matrix.nr}} 10' - name: print test failures if: failure() && env.FAILED_TEST_ARTIFACTS != '' shell: bash diff --git a/ci/install-sdk.ps1 b/ci/install-sdk.ps1 new file mode 100755 index 0000000000..66f24838a4 --- /dev/null +++ b/ci/install-sdk.ps1 @@ -0,0 +1,12 @@ +param( + [string]$directory='git-sdk', + [string]$url='https://github.com/git-for-windows/git-sdk-64/releases/download/ci-artifacts/git-sdk-x86_64-minimal.zip' +) + +Invoke-WebRequest "$url" -OutFile git-sdk.zip +Expand-Archive -LiteralPath git-sdk.zip -DestinationPath "$directory" +Remove-Item -Path git-sdk.zip + +New-Item -Path .git/info -ItemType Directory -Force +New-Item -Path .git/info/exclude -ItemType File -Force +Add-Content -Path .git/info/exclude -Value "/$directory" From patchwork Wed Oct 9 13:25:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13828440 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32024188008 for ; Wed, 9 Oct 2024 13:25:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480328; cv=none; b=ilY0/89/acbrAN6mCskXgHJjTTliFEMFi/A1MazAcHOd+4Z84MHRT1bY45uw+yBDLuK0sjkSvh3BS65oGTYKVWICMgP61Ugcx2FfOBuh89U4WX5FxiWCoz1z6h5Cz3xtK7nzEFoHfPUlY8zLOlm2kKc0tY3RQnlJcY/styl8ECs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480328; c=relaxed/simple; bh=buIPv8F7MkiDehp2BSZv+JBgUpUd52dsyg/ohZepuWw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=edMqF2NzWLNtIy8tLXS/ckC/N0BhH5vobimLyMeay0XnDn2U2dE9EtkbWv6P84lDOTEgqDqkdE+VaLGTtKOvTXWACYp3yhLfkVB+Cgu812iqC54nzAuhOzCktbXGjDfiZAQeL3v+UcgK5qlaFvIDMN1I3VsWDGc+0htxEKG2vj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=f+/AI5S2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Z76/2971; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="f+/AI5S2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Z76/2971" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 46A1713801C5; Wed, 9 Oct 2024 09:25:26 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Wed, 09 Oct 2024 09:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1728480326; x=1728566726; bh=PnOZ6LigEM rkcISLIHbFv+8rjTSzz7nFG3RIZchvzhE=; b=f+/AI5S2QY9warP6T1X2tJE+Hf m+fr+kX/ZdJOzMGUNfTwHJsl6blrNcxlNV2Zgs0prl0MItrAhpwY8bAq4gNbgpb7 c20jo+ztqxZ8+RG0aEZUWr9qhaFrwOcjKP9s2TeTuY+7vRfLDAjq8F97OkdeAidf dFwetY3nsJ670/DBSQ4Hu4fpdxcaYhNNzqjvkMPHbxEsWd81BhCRXGaWYcFdkuIS GiL1hKoplodsaKPmF4WaPWyMDOnWRCUUlwlG7FxFdz/8HvEy/PYYsdcBV/YNffKi N0S2H7eRaCR7EJZrP7XxY/yOAGmCw8OkrDQF5dDbVMj16Ex1TAARE0ZxxdDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728480326; x=1728566726; bh=PnOZ6LigEMrkcISLIHbFv+8rjTSz z7nFG3RIZchvzhE=; b=Z76/29715JxDMDi1x1vMIxwtRnjV3bdyxo18p1FJXH7k bDAgA3XvxjnjIKuw0hGAf7qiHpFA7YH/ONBjK/gp1KVkPidaKEOXmw5mukUsfoBh RwHiSswqzueYAIGnS3UwTuHSf0/vvgXcW9AYtMi2VPU16r8VQMXJIMP96ij3DsDP wNDiQ6m5gY8QGJZSRfNtzDAf4z44BtoczbPBernL1VRW135XqQSI1Ybegf8UbqAS 2xnKc9hKwCaE2rHbP1xX1ErJJdh5PNXEM/nh0QRFEj0kcrVlIWk+5/sJjSAE+N8K aiUuYghI9PfzvWlonEU2YctJXIcgJGKF1QHlQkhldQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimh eqnecuggftrfgrthhtvghrnhepveekkeffhfeitdeludeigfejtdetvdelvdduhefgueeg udfghfeukefhjedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprh gtphhtthhopehjohhhrghnnhgvshdrshgthhhinhguvghlihhnsehgmhigrdguvg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 09:25:25 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id fbd98c76 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 9 Oct 2024 13:24:22 +0000 (UTC) Date: Wed, 9 Oct 2024 15:25:23 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Johannes Schindelin Subject: [PATCH 3/5] ci: handle Windows-based CI jobs in GitLab CI Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We try to abstract away any differences between different CI platforms in "ci/lib.sh", such that knowledge specific to e.g. GitHub Actions or GitLab CI is neatly encapsulated in a single place. Next to some generic variables, we also set up some variables that are specific to the actual platform that the CI operates on, e.g. Linux or macOS. We do not yet support Windows runners on GitLab CI. Unfortunately, those systems do not use the same "CI_JOB_IMAGE" environment variable as both Linux and macOS do. Instead, we can use the "OS" variable, which should have a value of "Windows_NT" on Windows platforms. Handle the combination of "$OS,$CI_JOB_IMAGE" and introduce support for Windows. Signed-off-by: Patrick Steinhardt --- ci/lib.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index 74b430be23..95f39a26ea 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -250,8 +250,13 @@ then CI_TYPE=gitlab-ci CI_BRANCH="$CI_COMMIT_REF_NAME" CI_COMMIT="$CI_COMMIT_SHA" - case "$CI_JOB_IMAGE" in - macos-*) + + case "$OS,$CI_JOB_IMAGE" in + Windows_NT,*) + CI_OS_NAME=windows + JOBS=$NUMBER_OF_PROCESSORS + ;; + *,macos-*) # GitLab CI has Python installed via multiple package managers, # most notably via asdf and Homebrew. Ensure that our builds # pick up the Homebrew one by prepending it to our PATH as the @@ -259,9 +264,12 @@ then export PATH="$(brew --prefix)/bin:$PATH" CI_OS_NAME=osx + JOBS=$(nproc) + ;; + *,alpine:*|*,fedora:*|*,ubuntu:*) + CI_OS_NAME=linux + JOBS=$(nproc) ;; - alpine:*|fedora:*|ubuntu:*) - CI_OS_NAME=linux;; *) echo "Could not identify OS image" >&2 env >&2 @@ -272,6 +280,7 @@ then CI_JOB_ID="$CI_JOB_ID" CC="${CC_PACKAGE:-${CC:-gcc}}" DONT_SKIP_TAGS=t + handle_failed_tests () { create_failed_test_artifacts return 1 @@ -280,7 +289,6 @@ then cache_dir="$HOME/none" distro=$(echo "$CI_JOB_IMAGE" | tr : -) - JOBS=$(nproc) else echo "Could not identify CI type" >&2 env >&2 From patchwork Wed Oct 9 13:25:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13828441 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DEB1197A8F for ; Wed, 9 Oct 2024 13:25:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480330; cv=none; b=GKsOkUUfP8vpVB+CDwAQ+S3glNL8xo4NAhU5+vHe4vdnVpse/Kev8ND19LVSbKAaZLiMtK0IfMme16fdD4HEt22aeNHMIpNUdLUv87UJhWhrj5jFu544rFxTcY3vRYg+fjcKK5y6TeqeTFVM+gZBU+a7DLJ6w154Le3aCtSYIrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480330; c=relaxed/simple; bh=mSbQnWsBaBd2VMWDG8A528q99JLvTJMJ681u0w7agyI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H93I0ZzycY4O3qoTvBw/5Z51CrzVzXkS06biN4I82I/eXdnFeiw6UfGoEdQ5r18NGj9tvdoRSk9MkTjI4spWWGDcPNe/MCqj8rw84+WuQNYxKYb6GYqaEYUnSw/+EZWeK2cL0dKlAfyRyoc0aKr1jF2hUq5MktH83mHpp5eh8X4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=gidMSci3; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dRwkjnmp; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="gidMSci3"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dRwkjnmp" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5ADA41140122; Wed, 9 Oct 2024 09:25:28 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 09 Oct 2024 09:25:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1728480328; x=1728566728; bh=I1SRFazplQ CZroKhQ8qoUf1zvWTp/bdltE+1eVAUlaQ=; b=gidMSci3GpBbJMGuy+83rH1O8G UpsrL4dPbhyrWW1osF9qxOjVN2tOsXRU9W4o0HnwYO8rXlFfFxFXv88eTwm/fUKr Wv2xRjSPZYTCTqKFqxsv7iPLB+ddwTZnyBBcjakZ6Dsow4UmgoBv07749noLmMN6 ldgqRzv500x7w597FJ0BBxvmFMQ9WY4qmuC68Q3NKDmSncl3VoJ05TfifXWJQaVS sdbP6RPhJHrnZyW3hWpEvh1pjkcZVdiCrtH5A+9m9gmUtf59YKFTEOlR38IRId1J 6FlyMEJSjUzDMxZFfTiSCpdZLbPss+1XsC8T52kIplOD8bU6Cu50BodxABaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728480328; x=1728566728; bh=I1SRFazplQCZroKhQ8qoUf1zvWTp /bdltE+1eVAUlaQ=; b=dRwkjnmpGByXFKN7sfkjC91z+EmLcgFklBRmC7QPvAFq Agg/YOSiZVF6fStzduE/hrre+YLWNa6edRLXSL0rD4y+XpeLulzGcj889Ii/CeS9 03Ir0gF1JsSgV33x2NmBMHcUluW2j6Nf09A5I/uCmudjzfi64tJv6d4m144irVTP v5CRBHm5S0fOtfSNj/HRnEsD1cat0vbfg6txUQ7PBw7qrVXr8L/D6mv7Kbwbxivu k8k2Q6yAOTbmNzqDjfHN1aBaiK4RfUtl6qZmldVv2LhRKbyjqyvJnLba+mHIsb2r iH2hhsWNHIbDDGpxnncUYzsA2EEA76JYHGz3y7yzGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimh eqnecuggftrfgrthhtvghrnhepveekkeffhfeitdeludeigfejtdetvdelvdduhefgueeg udfghfeukefhjedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepjhhohhgrnhhnvghsrdhstghhihhnuggvlhhinhesgh hmgidruggvpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 09:25:27 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 374e4395 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 9 Oct 2024 13:24:25 +0000 (UTC) Date: Wed, 9 Oct 2024 15:25:26 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Johannes Schindelin Subject: [PATCH 4/5] gitlab-ci: introduce stages and dependencies Message-ID: <6ff5aabfe190dfc0e75c7b995a2a63e8f5cc640c.1728480039.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We're about to add a couple of jobs for Windows. As the Windows runners are quite slow, we will split those up across two stages: one stage to build the artifacts, and one stage that runs test slices in parallel. Introduce stages and "needs" dependencies for the preexisting jobs as a preparatory step. The stages will lead to a more natural representation of jobs in the UI, whereas the "needs" dependency ensures that jobs do not have to wait for all jobs in the preceding stage to finish. Signed-off-by: Patrick Steinhardt --- .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4abfbc3e20..e13e8b3866 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,10 @@ default: timeout: 2h +stages: + - test + - analyze + workflow: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" @@ -9,6 +13,8 @@ workflow: test:linux: image: $image + stage: test + needs: [ ] tags: - saas-linux-medium-amd64 variables: @@ -67,6 +73,8 @@ test:linux: test:osx: image: $image + stage: test + needs: [ ] tags: - saas-macos-medium-m1 variables: @@ -102,6 +110,8 @@ test:osx: test:fuzz-smoke-tests: image: ubuntu:latest + stage: test + needs: [ ] variables: CC: clang before_script: @@ -111,6 +121,8 @@ test:fuzz-smoke-tests: static-analysis: image: ubuntu:22.04 + stage: analyze + needs: [ ] variables: jobname: StaticAnalysis before_script: @@ -121,6 +133,8 @@ static-analysis: check-whitespace: image: ubuntu:latest + stage: analyze + needs: [ ] before_script: - ./ci/install-dependencies.sh # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged @@ -135,6 +149,8 @@ check-whitespace: check-style: image: ubuntu:latest + stage: analyze + needs: [ ] allow_failure: true variables: CC: clang @@ -153,6 +169,8 @@ check-style: documentation: image: ubuntu:latest + stage: analyze + needs: [ ] variables: jobname: Documentation before_script: From patchwork Wed Oct 9 13:25:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13828442 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F0C2197A8F for ; Wed, 9 Oct 2024 13:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480336; cv=none; b=JEnZLcSH70kCAV/UYannDUBEK++If8dhZ/bzGQSlEuukp11TvuDeXYMIckeW8olBXrUeVYIvFKjcxEnlU7y5R2k4YpuPfZpjHRICIZFEvYiMqxK5e79+iNhtNTzxoKqbP6vxft9XikGJartKmjgdAmncL3RrWnNQGZT3bjp8n6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728480336; c=relaxed/simple; bh=Iy8X2SUpuaVJsImwMkFXxzvGZa8AeB27ZsGN1QNwMqs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NdHZUUz4DRwUHUvRrsoPlI4hubL1769Wlb2DtRTL2yLHrd4GMWQ+knP0+lVrKPwEcp/S8wkuZXNc3antA8FO2+Ucpa57CAzBIlUUeCqNzKny5/E0IkWaPCdW4Rh8c3Z4173D23s2NFXZXTbO6YUBqmVLnSbEqKAijqmu/ejYTUs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=d/FJ/nn2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=MQMGYCS9; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="d/FJ/nn2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MQMGYCS9" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6958C1140122; Wed, 9 Oct 2024 09:25:34 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 09 Oct 2024 09:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1728480334; x=1728566734; bh=5wTs+YdBz+ i4Af878mYXh3lFiQ7KTi+pFV0y/9r2xyg=; b=d/FJ/nn2SQ/rUq//tqyVfxnUmE /xS7xhoXYMSDgoIXwSMcSgus4OeC9ropGblpzLb7tDt6Q+fIpgJKWSRi/WNkhT9f +kx9j8Jp/PegG7jPmVVfjUwXmlAkrb3Q3BX0StiVsj+HhBl59TSyzGz9Ey2RLqtr 773dOzdPJ3lFm5mxfJtJ9q4OI7h3WsGB68yy9CS/Hban9X/cxnLl2WZXLxpOXBUL C0cMCAq2gVFcNGKk1w4GdTKkmPfP2nznvuSMvvqcvfyG9xdtfYyVXBTDtmGE25wx YAtpmnN3c9FRlh6w1gXWa6FCYD003VJrPPq9tZDQupivdcbDb50lXW0MaSSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728480334; x=1728566734; bh=5wTs+YdBz+i4Af878mYXh3lFiQ7K Ti+pFV0y/9r2xyg=; b=MQMGYCS9CriC7LI3wHctgad4wKwV8v1jIC3KGOkAjNus DvgFGDnScYW5oIELF9qbmP/caO6DIv/lAvgIjU09QTg+yZ4zuWB3egR8Fy6JfYma Fcbs3P6HvLgbtMvW87GXiUekGOifwSCbveapBIMRJZTPT0rwIxkDMlX823qMMRy3 gU5piV634G1Enpz2lHnMDpi00hjbcpjKFuPgsnsJZz2o9VWWhQiF8hqEIHIT5zS9 5jI39fa5vnn50dVdQf0Mnp5WNN2DRikgIrfecj9ZCPJ8TvzVZ56intaGQb66dhsB ZzGFAL4cSMUR4pvp5fVp3EYpaPsIX788/2evqjk9nw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimh eqnecuggftrfgrthhtvghrnhepveekkeffhfeitdeludeigfejtdetvdelvdduhefgueeg udfghfeukefhjedvkedtnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrg hilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepjhhohhgrnhhnvghsrdhstghhihhnuggvlhhinhesgh hmgidruggvpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 09:25:33 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 2cb12b44 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 9 Oct 2024 13:24:30 +0000 (UTC) Date: Wed, 9 Oct 2024 15:25:29 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Johannes Schindelin Subject: [PATCH 5/5] gitlab-ci: exercise Git on Windows Message-ID: <15b79665ac35c29d1582eebdf0c223fec358f236.1728480039.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Add jobs that exercise Git on Windows. Unfortunately, building and especially testing Git on Windows is inherently slower compared to other Unix-like systems, mostly because spawning processes is way slower. We thus use the same layout as we use in GitHub Actions, where we have one build job, and then pass on the resulting build artifacts to ten test jobs that split up the work across each other. Unfortunately, the GitLab runners for Windows machines are embarassingly slow by themselves. So while this strategy leads to around 20 minutes of build time in GitHub Actions, the same pipeline takes around an hour in GitLab CI. Still, having late coverage is certainly better than having none at all. Signed-off-by: Patrick Steinhardt --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e13e8b3866..526ecfe030 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ default: timeout: 2h stages: + - build - test - analyze @@ -108,6 +109,38 @@ test:osx: - t/failed-test-artifacts when: on_failure +build:mingw64: + stage: build + tags: + - saas-windows-medium-amd64 + variables: + NO_PERL: 1 + before_script: + - ./ci/install-sdk.ps1 -directory "git-sdk" + script: + - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts' + artifacts: + paths: + - artifacts + - git-sdk + +test:mingw64: + stage: test + tags: + - saas-windows-medium-amd64 + needs: + - job: "build:mingw64" + artifacts: true + 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" + script: + - git-sdk/usr/bin/bash.exe -l -c "ci/run-test-slice.sh $CI_NODE_INDEX $CI_NODE_TOTAL" + after_script: + - git-sdk/usr/bin/bash.exe -l -c 'ci/print-test-failures.sh' + parallel: 10 + test:fuzz-smoke-tests: image: ubuntu:latest stage: test