git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Sam James <sam@gentoo.org>,
	 Eli Schwartz <eschwartz@gentoo.org>,
	Thorsten Glaser <tg@debian.org>,
	 Peter Seiderer <ps.report@gmx.net>,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH v2 5/5] ci: use Visual Studio for win+meson job on GitHub Workflows
Date: Mon, 31 Mar 2025 10:33:11 +0200	[thread overview]
Message-ID: <20250331-b4-pks-collect-build-fixes-v2-5-6b06136808f3@pks.im> (raw)
In-Reply-To: <20250331-b4-pks-collect-build-fixes-v2-0-6b06136808f3@pks.im>

In 7304bd2bc39 (ci: wire up Visual Studio build with Meson, 2025-01-22)
we have wired up a new CI job that builds and tests Git with Meson on a
Windows machine. The expectation here was that this build uses the
Visual Studio toolchain to do so, and that is true on GitLab CI. But on
GitHub Workflows it is not the case because we've got GCC in our PATH,
and thus Meson favors that compiler toolchain over Visual Studio's.

Fix this by explicitly asking Meson to use the Visual Studio toolchain.
While this is only really required for GitHub Workflows, let's also pass
the flag in GitLab CI so that we don't implicitly assume the toolchain
that Meson is going to pick.

Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .github/workflows/main.yml | 2 +-
 .gitlab-ci.yml             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9959b61ece2..6a002485aeb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -265,7 +265,7 @@ jobs:
       run: pip install meson ninja
     - name: Setup
       shell: pwsh
-      run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred
+      run: meson setup build --vsenv -Dperl=disabled -Dcredential_helpers=wincred
     - name: Compile
       shell: pwsh
       run: meson compile -C build
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2805cdeecb6..4798b283745 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -164,7 +164,7 @@ build:msvc-meson:
   extends: .msvc-meson
   stage: build
   script:
-    - meson setup build -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
+    - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
     - meson compile -C build
   artifacts:
     paths:

-- 
2.49.0.604.gff1f9ca942.dirty


  parent reply	other threads:[~2025-03-31  8:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  8:38 [PATCH 0/4] Collection of build fixes Patrick Steinhardt
2025-03-28  8:38 ` [PATCH 1/4] meson: fix handling of '-Dcurl=auto' Patrick Steinhardt
2025-03-28  8:38 ` [PATCH 2/4] gitweb: fix generation of "gitweb.js" Patrick Steinhardt
2025-03-28  8:38 ` [PATCH 3/4] meson: require Perl when building docs Patrick Steinhardt
2025-03-29 17:56   ` Junio C Hamano
2025-03-31  5:59     ` Patrick Steinhardt
2025-03-28  8:38 ` [PATCH 4/4] meson: respect 'tests' build option in contrib Patrick Steinhardt
2025-03-28 18:25   ` Sam James
2025-03-31  8:33 ` [PATCH v2 0/5] Collection of build fixes Patrick Steinhardt
2025-03-31  8:33   ` [PATCH v2 1/5] meson: fix handling of '-Dcurl=auto' Patrick Steinhardt
2025-04-03  8:24     ` Karthik Nayak
2025-03-31  8:33   ` [PATCH v2 2/5] gitweb: fix generation of "gitweb.js" Patrick Steinhardt
2025-04-01 16:30     ` Johannes Schindelin
2025-04-02  6:40       ` Patrick Steinhardt
2025-04-01 16:30     ` Toon Claes
2025-03-31  8:33   ` [PATCH v2 3/5] meson: respect 'tests' build option in contrib Patrick Steinhardt
2025-04-01 16:31     ` Johannes Schindelin
2025-03-31  8:33   ` [PATCH v2 4/5] meson: distinguish build and target host binaries Patrick Steinhardt
2025-04-03  8:38     ` Karthik Nayak
2025-03-31  8:33   ` Patrick Steinhardt [this message]
2025-04-01 16:41   ` [PATCH v2 0/5] Collection of build fixes Johannes Schindelin
2025-04-03  8:39   ` Karthik Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250331-b4-pks-collect-build-fixes-v2-5-6b06136808f3@pks.im \
    --to=ps@pks.im \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=eschwartz@gentoo.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ps.report@gmx.net \
    --cc=sam@gentoo.org \
    --cc=tg@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).