Test msvc32 on AppVeyor using Visual Studio 2010

master
David Allsopp 2017-03-27 16:16:38 +01:00
parent 94b0df88a3
commit b37db6afc8
2 changed files with 37 additions and 3 deletions

View File

@ -53,13 +53,25 @@ install:
- '%CYG_ROOT%\bin\bash -lc "cygcheck -dc cygwin"'
- '"%CYG_ROOT%\setup-x86.exe" -qgnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P diffutils -P make -P mingw64-i686-gcc-core >NUL'
- '%CYG_ROOT%\bin\bash -lc "cygcheck -dc cygwin"'
- set OCAML_PREV_PATH=%PATH%
- set OCAML_PREV_LIB=%LIB%
- set OCAML_PREV_INCLUDE=%INCLUDE%
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
build_script:
- "%CYG_ROOT%/bin/bash -lc \"echo 'eval $($APPVEYOR_BUILD_FOLDER/tools/msvs-promote-path)' >> ~/.bash_profile\""
- '%CYG_ROOT%/bin/bash -lc "$APPVEYOR_BUILD_FOLDER/appveyor_build.sh"'
- set PATH=%OCAML_PREV_PATH%
- set LIB=%OCAML_PREV_LIB%
- set INCLUDE=%OCAML_PREV_INCLUDE%
- call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
- '%CYG_ROOT%/bin/bash -lc "$APPVEYOR_BUILD_FOLDER/appveyor_build.sh msvc32-only"'
test_script:
- set PATH=%OCAML_PREV_PATH%
- set LIB=%OCAML_PREV_LIB%
- set INCLUDE=%OCAML_PREV_INCLUDE%
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
- '%APPVEYOR_BUILD_FOLDER%\ocamlc.opt -version'
- set CAML_LD_LIBRARY_PATH=%OCAMLROOT%/lib/stublibs
- '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER && make tests"'

View File

@ -27,18 +27,40 @@ function run {
fi
}
PREFIX="C:/Program Files/OCaml"
if [[ $1 = "msvc32-only" ]] ; then
cd $APPVEYOR_BUILD_FOLDER/flexdll-0.35
make MSVC_DETECT=0 CHAINS=msvc MSVC_FLAGS="-nologo -MD -D_CRT_NO_DEPRECATE -GS- -WX" support
cp flexdll*_msvc.obj "$PREFIX/bin/flexdll"
cd $APPVEYOR_BUILD_FOLDER/../build-msvc32
cp config/m-nt.h config/m.h
cp config/s-nt.h config/s.h
eval $(tools/msvs-promote-path)
PREFIX="C:/Program Files/OCaml-msmvc32"
echo "Edit config/Makefile to set PREFIX=$PREFIX"
sed -e "s|PREFIX=.*|PREFIX=$PREFIX|" -e "/\(BYTE\|NATIVE\)CCCOMPOPTS=./s/\r\?$/ -WX\0/" config/Makefile.msvc > config/Makefile
run "make world" make world
run "make runtimeopt" make runtimeopt
run "make -C otherlibs/systhreads libthreadsnat.lib" make -C otherlibs/systhreads libthreadsnat.lib
exit 0
fi
cd $APPVEYOR_BUILD_FOLDER
git worktree add ../build-mingw32 -b appveyor-build-mingw32
git worktree add ../build-msvc32 -b appveyor-build-msvc32
cd ../build-mingw32
git submodule update --init flexdll
cd $APPVEYOR_BUILD_FOLDER
PREFIX="C:/Program Files/OCaml"
tar -xzf flexdll.tar.gz
cd flexdll-0.35
make MSVC_DETECT=0 CHAINS=msvc64 support