Skip to content

Commit

Permalink
WIP: appveyor: Test VC binary again
Browse files Browse the repository at this point in the history
  • Loading branch information
k-takata committed May 28, 2017
1 parent f4b99dd commit 762f7fd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 31 additions & 5 deletions win32/appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 762f7fd

Please sign in to comment.