From: Patrick Steinhardt Date: Mon, 31 Mar 2025 08:33:11 +0000 (+0200) Subject: ci: use Visual Studio for win+meson job on GitHub Workflows X-Git-Tag: v2.50.0-rc0~109^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85e1d6819fbc32059d0170cfbfe7c1989f3753e8;p=thirdparty%2Fgit.git ci: use Visual Studio for win+meson job on GitHub Workflows 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 Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9959b61ece..6a002485ae 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 2805cdeecb..4798b28374 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: