blob: 3ffb30fc7959f7126e0f00afde3000996d5a4c59 [file] [log] [blame]
# branches to build
branches:
# whitelist
only:
- master
- appveyor_debug
image:
- Visual Studio 2015
# if 2015 works, this should work too
- Visual Studio 2017
# may or may not work, let's not try
#- Visual Studio 2013
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\projects\stp
platform:
- x64
# - x86
environment:
global:
BOOST_ROOT: C:\projects\stp\boost_1_59_0_install
MINISAT_ROOT: C:\projects\stp\minisat\myinstall
ZLIB_ROOT: C:\projects\stp\zlib\myinstall
PYTHON: "C:\\Python27"
PYTHON_ARCH: "x86"
PYTHON_VERSION: "2.7.13"
BUILD_TYPE: Release
APPVEYOR_SAVE_CACHE_ON_ERROR: false
matrix:
- STATICCOMPILE_SETTING: OFF
BOOST_OPTIONS:
- STATICCOMPILE_SETTING: ON
BOOST_OPTIONS: runtime-link=static link=static
# WarningLevel of 1 is ONLY SEVERE warnings, nothing else. See
# https://stackoverflow.com/questions/1023858/how-to-suppress-specific-msbuild-warning
MSBUILD_FLAGS: /maxcpucount /nologo /property:WarningLevel=1
install:
"%PYTHON%\\python.exe -m pip install lit"
configuration:
- Release
#cache:
#- C:\projects\stp\llvm -> appveyor.yml
#- C:\projects\stp\llvm.build -> appveyor.yml
before_build:
- IF "%PLATFORM%" == "x86" ( SET CMAKE_GENERATOR="Visual Studio 14 2015")
- IF "%PLATFORM%" == "x64" ( SET CMAKE_GENERATOR="Visual Studio 14 2015 Win64")
- echo %PLATFORM%
- echo %CMAKE_GENERATOR%
- echo %configuration%
- echo %APPVEYOR_BUILD_FOLDER%
- echo %cd%
# The STP query-file-tests require the "not" tool. For now, we use the one
# provided by LLVM. This should eventually be replaced by the not tool of
# OutputCheck.
#
# Note: the tests are currently disabled on AppVeyor (see below)
#
# - cd C:\projects\stp
# - if not exist llvm git clone --depth=1 --branch release_40 https://github.com/llvm-mirror/llvm
# - if not exist llvm.build mkdir llvm.build
# - cd llvm.build
# - if not exist Release\bin\not.exe cmake -G %CMAKE_GENERATOR% -DPYTHON_EXECUTABLE=%PYTHON%\python.exe ..\llvm
# - if not exist Release\bin\not.exe cmake --build . --config Release --target not
# - set PATH=%PATH%;%cd%\Release\bin
# boost
- cd c:\projects\stp
- mkdir boost_1_59_0_install
- ps: . .\scripts\appveyor.ps1
- cd boost_1_59_0
- echo "Building boost.."
- bootstrap.bat --with-libraries=program_options
- cat project-config.jam
- b2 --with-program_options address-model=64 toolset=msvc-14.0 variant=release %BOOST_OPTIONS% threading=multi install --prefix="C:\projects\stp\boost_1_59_0_install" > boost_install.out
# zlib
# TODO check out http://stackoverflow.com/questions/10507893/libzip-with-visual-studio-2010
- cd C:\projects\stp
- git clone https://github.com/madler/zlib
- cd zlib
- git checkout v1.2.8
- echo %cd%
- mkdir build
- mkdir myinstall
- cd build
- cmake -G %CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%ZLIB_ROOT% ..
- cmake --build . --config %CONFIGURATION%
- cmake --build . --config %CONFIGURATION% --target install
- dir ..\myinstall\
# minisat
- cd C:\projects\stp
- git clone https://github.com/stp/minisat
- cd minisat
- echo %cd%
- mkdir build
- mkdir myinstall
- cd build
- cmake -G %CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%MINISAT_ROOT% -DZLIB_ROOT=%ZLIB_ROOT% ..
- cmake --build . --config %CONFIGURATION%
- cmake --build . --config %CONFIGURATION% --target install
- dir ..\myinstall\
- dir ..\myinstall\lib\
- dir ..\myinstall\bin\
- dir ..\myinstall\include\
# get flex, bison, perl
- C:\cygwin64\setup-x86_64.exe -qnNd -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup --packages "flex,bison,perl"
# prepend cygwin to %PATH% so that Cygwin's cat.exe is used instead of Git's
# one. This had caused Cygwin version conflicts (probably due to the wrong
# Cygwin DLL being loaded for cat.exe)
- SET PATH=C:/cygwin64/bin;%PATH%
# finally STP
- cd c:\projects\stp
- git submodule update --init --recursive
# Building in c:\projects\stp\build fails with cmake --build since ASTKind.h
# cannot be found, so build it in ..\stp.build
- mkdir ..\stp.build
- cd ..\stp.build
- cmake --version
- cmake -G %CMAKE_GENERATOR% -DBoost_USE_STATIC_LIBS=%STATICCOMPILE_SETTING% -DENABLE_TESTING=%STATICCOMPILE_SETTING% -DPYTHON_EXECUTABLE="%PYTHON%\\python.exe" -DPYTHON_LIB_INSTALL_DIR="%PYTHON%" -DLIT_TOOL="%PYTHON%\\Scripts\\lit.exe" -DMINISAT_LIBDIR=%MINISAT_ROOT% -DMINISAT_INCLUDE_DIRS=%MINISAT_ROOT%\include -DSTATICCOMPILE=%STATICCOMPILE_SETTING% -DZLIB_ROOT=%ZLIB_ROOT% -DCMAKE_PREFIX_PATH=C:\cygwin64 ..\stp
- ls
build:
project: ..\stp.build\INSTALL.vcxproj
parallel: true
verbosity: minimal
# scripts to run after build
after_build:
- call ctest -V -C %CONFIGURATION%
- call "C:\Program Files\stp\bin\stp.exe" --help
- 7z a c:\projects\stp\stp.zip %APPVEYOR_BUILD_FOLDER%\..\stp.build -tzip
- cd c:\projects\stp
artifacts:
- path: stp.zip
name: stp.zip
deploy_script:
#- cd c:\projects\stp
#- curl -T stp.zip --user %ACCOUNT% https://someplace/
test: off