Skip to content

Commit

Permalink
Use windows git for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
majaha committed Feb 16, 2024
1 parent b7531a9 commit b592418
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
update: false
release: true
path-type: inherit
install: "make git dos2unix diffutils\n"
install: "make dos2unix diffutils\n"
- name: disable git crlf conversion
run: git config --global core.autocrlf false
- name: checkout the source code
Expand Down Expand Up @@ -509,7 +509,7 @@ jobs:
update: false
release: true
path-type: inherit
install: "make git dos2unix diffutils\n"
install: "make dos2unix diffutils\n"
- name: disable git crlf conversion
run: git config --global core.autocrlf false
- name: checkout the source code
Expand Down Expand Up @@ -648,7 +648,7 @@ jobs:
update: false
release: true
path-type: inherit
install: "make git dos2unix diffutils\n"
install: "make dos2unix diffutils\n"
- name: disable git crlf conversion
run: git config --global core.autocrlf false
- name: checkout the source code
Expand Down
1 change: 0 additions & 1 deletion src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ x--expand-yaml-anchors--remove:
path-type: inherit
install: >
make
git
dos2unix
diffutils
Expand Down
13 changes: 10 additions & 3 deletions src/ci/scripts/install-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ if isWindows; then

# Delete these pre-installed tools so we can't accidentally use them, because we are using the
# MSYS2 setup action versions instead.
# Delete Windows-Git
rm -r "/c/Program Files/Git/"
# Delete pre-installed version of MSYS2
rm -r "/c/msys64/"
# Delete Strawberry Perl, which contains a version of mingw
Expand All @@ -41,9 +39,18 @@ if isWindows; then
rm -r "/c/mingw32/"

if isKnownToBeMingwBuild; then
# Use the mingw version of CMake for mingw builds.
# However, the MSVC build needs native CMake, as it fails with the mingw one.
# Delete native CMake
rm -r "/c/Program Files/CMake/"
# Install mingw-w64-$arch-cmake
pacboy -S --noconfirm cmake:p
fi # Otherwise, the MSVC build needs native CMake, it fails with the mingw one.

# We use Git-for-Windows for MSVC builds, and MSYS2 Git for mingw builds,
# so that both are tested.
# Delete Windows-Git
rm -r "/c/Program Files/Git/"
# Install MSYS2 git
pacman -S --noconfirm git
fi
fi

0 comments on commit b592418

Please sign in to comment.