diff --git a/appveyor.yml b/appveyor.yml index 5ed8c7c0ac..7f718d6591 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,8 +6,8 @@ environment: CONFIGURATION: Release - compiler: msvc ARCH: x64 - - compiler: msvc - ARCH: x86 + #- compiler: msvc + # ARCH: x86 - compiler: msys2 ARCH: x64 MSYS2_ARCH: x86_64 diff --git a/win32/appveyor.bat b/win32/appveyor.bat index 424dec25fc..ec2d1433ef 100755 --- a/win32/appveyor.bat +++ b/win32/appveyor.bat @@ -47,6 +47,9 @@ goto :eof :: ---------------------------------------------------------------------- :: Using VC12 (VC2013) with nmake, iconv enabled :: Also build with msys2 and test the VC binary on msys2. +set MSYS2_ARCH=x86_64 +set MSYS2_DIR=msys64 +set MSYSTEM=MINGW64 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %ARCH% :: Build libiconv (MSVC port) @@ -69,17 +72,40 @@ copy %ICONV_BUILD_DIR%\msvc10\iconv.dll %APPVEYOR_BUILD_FOLDER% > nul cd %APPVEYOR_BUILD_FOLDER% nmake -f mk_mvc.mak WITH_ICONV=yes ICONV_DIR=%ICONV_DIR% PDB=yes -@echo off -goto :eof - -:msvc_test -@echo on :: Check filetype (VC binaries) c:\cygwin\bin\file ctags.exe c:\cygwin\bin\file readtags.exe :: Check if it works .\ctags --version || exit 1 +:: Backup VC binaries +mkdir vc +move *.exe vc > nul + +:: Build with msys2 +path C:\%MSYS2_DIR%\usr\bin;%PATH% +set CHERE_INVOKING=yes +:: Install and update necessary packages +rem bash -lc "for i in {1..3}; do pacman --noconfirm -S mingw-w64-%MSYS2_ARCH%-{python3-sphinx,jansson,libxml2,libyaml} && break || sleep 15; done" + +bash -lc "./autogen.sh" +:: Patching configure. +:: Workaround for "./configure: line 557: 0: Bad file descriptor" +perl -i".bak" -pe "s/^test -n \".DJDIR\"/#$&/" configure +bash -lc "./configure && make" + +:: Restore VC binaries +copy vc\*.exe . /y > nul +touch *.exe + +@echo off +goto :eof + +:msvc_test +@echo on +:: Run tests +bash -lc "make check APPVEYOR=1" + @echo off goto :eof