Skip to content

Commit 764d4f1

Browse files
committed
CI: fix MSVC builds when building dependencies
1 parent 1b5117f commit 764d4f1

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,21 @@ jobs:
240240
# make Windows packages like Clang available in MSYS
241241
path-type: inherit
242242

243-
- name: Delete MinGW gmake (MSVC)
244-
if: env.IS_WINDOWS_MSVC == 'true'
245-
# delete /c/Strawberry/c/bin/gmake built for MinGW that is found on runners, because we must use make built for MSYS
246-
run: if GMAKE_PATH=`which gmake`; then rm -f "$GMAKE_PATH"; fi
243+
- name: Remove Perl Strawberry installation and MinGW gmake (MSVC)
244+
if: env.IS_WINDOWS_MSVC == 'true' && github.event.inputs.tools_windows_msvc_branch
245+
# C:\Strawberry contains various MinGW libraries and binaries like pkg-config
246+
# that can get picked up by configure/CMake and don't necessarily behave
247+
# correctly when not using a MinGW environment, and more specifically we cannot
248+
# use MinGW gmake (we must use MSYS make), so we delete everything that could
249+
# mess up our builds
250+
run: |
251+
echo Deleting C:\Strawberry...
252+
rmdir /S /Q C:\Strawberry
253+
for /f "delims=" %%i in ('where gmake') do (
254+
echo Deleting "%%~i"...
255+
del "%%~i"
256+
)
257+
shell: cmd
247258

248259
- name: Install Windows packages (MSVC)
249260
if: env.IS_WINDOWS_MSVC == 'true'

0 commit comments

Comments
 (0)