Commit 6987b0b4 authored by Laurent Belcour's avatar Laurent Belcour

[CI] Adding an AppVeyor specific configuration file.

parent 523ad1f3
......@@ -12,7 +12,9 @@ install:
- cinst nsis.portable
before_build:
# BOOST Python require x86 compilation
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
#- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
# Build script
#
......@@ -20,22 +22,28 @@ build_script:
# Build first time
- git submodule init
- git submodule update
- scons
# Build externals
- cd external
# First we need to build ALTA to get Eigen
#- dir C:\Python27\libs
#- dir C:\Libraries\boost_1_63_0
#- dir C:\Libraries\boost_1_63_0\lib64-msvc-14.0
- scons --cfg=./configs/scons/config-windows-appveyor.py
- appveyor PushArtifact config.log
# Install CERES
- cd external
- git clone https://ceres-solver.googlesource.com/ceres-solver
- cd ceres-solver
- mkdir build
- cd build
- mkdir build-ceres
- cd build-ceres
- cmake .. -DBUILD_SHARED_LIBS=ON -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="..\..\build" -DEIGEN_INCLUDE_DIR="..\..\build\include" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
- nmake install
- cd ..\..\..
# Rebuild
- scons
# Rebuild with CERES and Python
- scons --cfg=./configs/scons/config-windows-appveyor.py
#- scons --cfg=./configs/scons/config-windows-appveyor.py python
- appveyor PushArtifact config.log
# Generate product
......@@ -46,4 +54,12 @@ build_script:
# Perform custom tests
#
test_script:
- scons tests
- ./setpath.bat
- scons --cfg=./configs/scons/config-windows-appveyor.py tests
#- scons --cfg=./configs/scons/config-windows-appveyor.py python tests
artifacts:
- path: sources\scripts\ALTA.exe
name: ALTA
- path: config.log
name: Log
import os, sys
##----------------------------------------------------------------##
## This file describes required and optional arguments to ALTA ##
## compilation. If you want to manualy tune the use of an already ##
## present library, uncomment the according lines. ##
##----------------------------------------------------------------##
## Compilators build flags
##
CXX = 'cl'
# We used to have '/arch:AVX' here, but that generates invalid code if
# the underlying CPU does not support AVX (which is typically the case
# in VMs.)
CCFLAGS = '/Zi /nologo /O2 /Ox /EHsc /MD'
#LINKFLAGS = '/MACHINE:X86'
## Python and boost-python library
##
PYTHON_LIB = ['python27', 'boost_python-vc140-mt-1_63']
PYTHON_INC = ['C:/Python27/include/', 'C:/Libraries/boost_1_63_0']
PYTHON_DIR = ['C:/Python27/libs/', 'C:/Libraries/boost_1_63_0/lib32-msvc-14.0']
## Eigen library
##
EIGEN_INC = ['#external/build/include/Eigen']
## OpenMP flags
##
OPENMP_CFLAGS = ' /openmp'
OPENMP_LINKFLAGS = ''
## OpenEXR library
##
OPENEXR_INC = ['']
OPENEXR_DIR = ['']
## FLANN library
##
FLANN_INC = ['']
FLANN_DIR = ['']
FLANN_LIB = ['flann']
## QUADPROG library
##
## You have to specify the directory of the QuadProg library
##
QUADPROG_INC = ['#external/quadprog++']
QUADPROG_DIR = ['#external/build/lib']
QUADPROG_LIB = ['quadprog++']
## CERES library
##
## You have to specify both the directory of the CERES library
## and the glog library
##
CERES_INC = ['#external/build/include', '#external/build/include/ceres/internal/miniglog']
CERES_DIR = ['#external/build/lib']
CERES_LIB = ['ceres']
CERES_OPT_LIB = ['glog', 'gomp', 'lapack', 'blas']
## NlOpt library
##
## You have to specify the directory of the NlOpt library
##
NLOPT_INC = ['#external/build/include']
NLOPT_DIR = ['#external/build/lib']
NLOPT_LIB = ['nlopt']
NLOPT_OPT_LIB = []
## coin IpOpt library
##
## You have to specify the directory of the IpOpt library
##
IPOPT_INC = ['#external/build/include']
IPOPT_DIR = ['#external/build/lib']
IPOPT_LIB = ['ipopt']
IPOPT_OPT_LIB = []
## MATLAB library and Engine
##
#MATLAB_INC = ['']
#MATLAB_DIR = ['']
#MATLAB_LIB = ['eng', 'mex','mat']
......@@ -51,9 +51,7 @@ if library_available(env, pkgspec='python-2.7',
build_lib = conf.CheckLibWithHeader('boost_python',
'boost/python.hpp', 'c++')
if build_lib and not conf.CheckBoostPython():
build_lib = False;
build_lib = conf.CheckBoostPython();
env = conf.Finish()
......@@ -69,6 +67,7 @@ if build_lib:
env.Alias('python',
env.SharedLibrary('#build/python/alta', ['alta.cpp']))
else:
raise Errors.BuildError(errstr = "Unable to build the Python wrapper",
filename = 'alta.cpp',
exitstatus = 1)
env.Alias('python', [])
# raise Errors.BuildError(errstr = "Unable to build the Python wrapper",
# filename = 'alta.cpp',
# exitstatus = 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment