.appveyor.yml 2.91 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 10 11 12 13 14
environment:
  matrix:
    - builder: cmake
    - builder: scons

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

Laurent Belcour's avatar
Laurent Belcour committed
15 16 17 18
install:
  - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
  - python --version
  - python -m ensurepip
19 20 21
  - pip install -U setuptools
  - pip install -U wheel
  - pip install scons==2.4.1
Laurent Belcour's avatar
Laurent Belcour committed
22
  - cinst nsis.portable
23 24 25 26
  - 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"
27
  - nmake /NOLOGO install
28
  - cd ..\..\..\
Laurent Belcour's avatar
Laurent Belcour committed
29 30

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

35 36
# Build script
#
Laurent Belcour's avatar
Laurent Belcour committed
37
build_script:
38
   # Build first time
Laurent Belcour's avatar
Laurent Belcour committed
39 40 41
  - git submodule init
  - git submodule update

42 43 44
  ## Build externals

  # SCons: First we need to build ALTA to get Eigen
45 46 47 48
  - if "%builder%" == "scons" (
       scons --cfg=./configs/scons/config-windows-appveyor.py &
       appveyor PushArtifact config.log
    )
Laurent Belcour's avatar
Laurent Belcour committed
49

50
  # Install CERES
51 52 53 54 55 56 57 58 59
  - cd external
  - git clone https://ceres-solver.googlesource.com/ceres-solver
  - cd ceres-solver
  - 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 /NOLOGO install
  - cd ..\..\..

60
  # Rebuild with CERES and Python
61 62 63 64 65 66
  - if "%builder%" == "scons" (
      scons --cfg=./configs/scons/config-windows-appveyor.py &
      appveyor PushArtifact config.log
    ) else (
      mkdir build &
      cd build &
67 68
      cmake .. -DEIGEN3_INCLUDE_DIR="external/build/include/eigen3" -Wdev -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON  -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" &
      nmake /NOLOGO &
69 70
      cd ..
    )
Laurent Belcour's avatar
Laurent Belcour committed
71

72 73 74 75
  # Generate zip with all compilation elements
  # TODO: This export is not working
  #- appveyor PushArtifact 'build/*'

76
  # Generate product
Laurent Belcour's avatar
Laurent Belcour committed
77 78
  - makensis sources\scripts\installer.nsi
  - appveyor PushArtifact sources\scripts\ALTA.exe
79 80 81 82 83


# Perform custom tests
#
test_script:
84
  - ./setpath.bat
85 86
  - if "%builder%" == "scons" (
      scons --cfg=./configs/scons/config-windows-appveyor.py tests
87
      appveoyr PushArtifact build\sources\tests\*.log
88 89 90
    ) else
      cd build &
      nmake test &
91
      appveyor PushArtifact Testing\Temporary\LastTest.log &
92 93
      cd ..
    )
94

95 96 97

# Outputed files
#
98 99 100 101
artifacts:
   - path: sources\scripts\ALTA.exe
     name: ALTA
   - path: config.log
102 103 104 105 106 107 108 109 110
     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