.appveyor.yml 3.42 KB
Newer Older
Laurent Belcour's avatar
Laurent Belcour committed
1
os:
2
  - Visual Studio 2017
Laurent Belcour's avatar
Laurent Belcour committed
3 4 5 6

build:
  verbosity: detailed

7 8 9
environment:
  matrix:
    - builder: cmake
10 11 12 13 14
      PYTHON: "C:\\Python36-x64"
      PYTHON_VERSION: "3.6.3"
      PYTHON_ARCH: "64"
      PIP: "C:\\Python36-x64\\Scripts\\pip"

15 16 17 18 19
    - builder: scons

init:
  - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

Laurent Belcour's avatar
Laurent Belcour committed
20 21
install:
  - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
22 23 24 25 26 27 28
  - if "%builder%" == "scons" (
       python --version &
       python -m ensurepip &
       pip install -U setuptools &
       pip install -U wheel &
       pip install scons==2.4.1
    )
Laurent Belcour's avatar
Laurent Belcour committed
29
  - cinst nsis.portable
30 31 32 33
  - hg clone https://bitbucket.org/eigen/eigen external\eigen3
  - cd external\eigen3
  - mkdir build & cd build
  - cmake .. -DCMAKE_INSTALL_PREFIX="..\..\build" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
34
  - nmake /NOLOGO install
35
  - cd ..\..\..\
Laurent Belcour's avatar
Laurent Belcour committed
36 37

before_build:
38
  # BOOST Python require x86 compilation
39
  #- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
40
  #- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
Laurent Belcour's avatar
Laurent Belcour committed
41

42 43
# Build script
#
Laurent Belcour's avatar
Laurent Belcour committed
44
build_script:
45
   # Build first time
Laurent Belcour's avatar
Laurent Belcour committed
46 47 48
  - git submodule init
  - git submodule update

49 50 51
  ## Build externals

  # SCons: First we need to build ALTA to get Eigen
52 53 54 55
  - if "%builder%" == "scons" (
       scons --cfg=./configs/scons/config-windows-appveyor.py &
       appveyor PushArtifact config.log
    )
Laurent Belcour's avatar
Laurent Belcour committed
56

57
  # Install CERES
58 59 60 61 62
  - cd external
  - git clone https://ceres-solver.googlesource.com/ceres-solver
  - cd ceres-solver
  - mkdir build-ceres
  - cd build-ceres
63
  - cmake .. -DBUILD_SHARED_LIBS=OFF -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX="..\..\build" -DEIGEN_INCLUDE_DIR="..\..\build\include" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
64 65 66
  - nmake /NOLOGO install
  - cd ..\..\..

67 68 69 70 71 72 73 74 75 76
  # Install NLOPT
  - cd external
  - git clone git://github.com/stevengj/nlopt
  - cd nlopt
  - mkdir build
  - cd build
  - cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="..\..\build" -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"
  - nmake /NOLOGO install
  - cd ..\..\..

77
  # Rebuild with CERES and Python
78 79 80 81 82 83
  - if "%builder%" == "scons" (
      scons --cfg=./configs/scons/config-windows-appveyor.py &
      appveyor PushArtifact config.log
    ) else (
      mkdir build &
      cd build &
84
      cmake .. -DEIGEN3_INCLUDE_DIR="external/build/include/eigen3" -DCeres_DIR="external/build/CMake" -Wdev -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON  -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" &
85
      nmake /NOLOGO &
86 87
      cd ..
    )
Laurent Belcour's avatar
Laurent Belcour committed
88

89 90 91 92
  # Generate zip with all compilation elements
  # TODO: This export is not working
  #- appveyor PushArtifact 'build/*'

93
  # Generate product
Laurent Belcour's avatar
Laurent Belcour committed
94 95
  - makensis sources\scripts\installer.nsi
  - appveyor PushArtifact sources\scripts\ALTA.exe
96 97 98 99 100


# Perform custom tests
#
test_script:
101
  - ./setpath.bat
102 103
  - if "%builder%" == "scons" (
      scons --cfg=./configs/scons/config-windows-appveyor.py tests
104
      appveoyr PushArtifact build\sources\tests\*.log
105
    ) else (
106 107
      cd build &
      nmake test &
108
      appveyor PushArtifact Testing\Temporary\LastTest.log &
109 110
      cd ..
    )
111

112 113 114

# Outputed files
#
115 116 117 118
artifacts:
   - path: sources\scripts\ALTA.exe
     name: ALTA
   - path: config.log
119 120 121 122 123 124 125 126 127
     name: SconsLog
   - path: 'build\sources\tests\*.log'
     name: SConsTestsLog
     type: zip
   - path: build\Testing\Temporary\LastTest.log
     name: CMakeTestsLog
  #  - path: 'build/*'
  #    name: ALTAZip
  #    type: zip