Add MinGW-w64 to matrix cache mingw-w64 downloads quiet curl and 7zip run appveyor steps in cmd for mingw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/appveyor.yml b/appveyor.yml
index 5358bec..647ef16 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -13,6 +13,13 @@ environment:
ARCH: 64
- GENERATOR: "MSYS Makefiles"
ARCH: 32
+ - GENERATOR: "MSYS Makefiles"
+ ARCH: i686 # this is for 32-bit MinGW-w64
+ - GENERATOR: "MSYS Makefiles"
+ ARCH: 64
+cache:
+- i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
+- x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z
build_script:
- ps: |
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
@@ -24,8 +31,8 @@ build_script:
if ($env:GENERATOR -ne "MSYS Makefiles") {
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$env:GENERATOR"
cmake --build . --config RelWithDebInfo
- } else {
- C:\MinGW\msys\1.0\bin\sh --login /c/projects/libgit2/script/appveyor-mingw.sh
}
+- cmd: |
+ if "%GENERATOR%"=="MSYS Makefiles" (C:\MinGW\msys\1.0\bin\sh --login /c/projects/libgit2/script/appveyor-mingw.sh)
test_script:
- ps: ctest -V .
diff --git a/script/appveyor-mingw.sh b/script/appveyor-mingw.sh
index aaafa49..48e0bad 100755
--- a/script/appveyor-mingw.sh
+++ b/script/appveyor-mingw.sh
@@ -1,6 +1,23 @@
#!/bin/sh
set -e
-cd `dirname "$0"`/../build
-echo 'C:\MinGW\ /MinGW' > /etc/fstab
+cd `dirname "$0"`/..
+if [ "$ARCH" = "32" ]; then
+ echo 'C:\MinGW\ /MinGW' > /etc/fstab
+elif [ "$ARCH" = "i686" ]; then
+ f=i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
+ if ! [ -e $f ]; then
+ curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/$f
+ fi
+ 7z x $f > /dev/null
+ mv mingw32 /MinGW
+else
+ f=x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z
+ if ! [ -e $f ]; then
+ curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/$f
+ fi
+ 7z x $f > /dev/null
+ mv mingw64 /MinGW
+fi
+cd build
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$GENERATOR"
cmake --build . --config RelWithDebInfo