swh:1:snp:e6d42e6731ce66e3c09de07ac49964c03139e990
Raw File
Tip revision: 9ee6be436b4cbf61c6badcba756dd3a286de28d7 authored by Konrad Werys on 28 May 2019, 13:12:50 UTC
feat: optional SD maps calculation
Tip revision: 9ee6be4
.appveyor.yml
#------------------------------------#
#   Tomato   #
#------------------------------------#

os:
  - Visual Studio 2015

init:
  - git config --global core.autocrlf input
  # Set build version to git commit-hash
  - ps: Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_BRANCH) - $($env:APPVEYOR_REPO_COMMIT)"

# about toolset: https://devblogs.microsoft.com/cppblog/stuck-on-an-older-toolset-version-move-to-visual-studio-2015-without-upgrading-your-toolset/
environment:
  toolset: v90
  EXE_EXTENDED_NAME: TomatoExe_%APPVEYOR_REPO_TAG_NAME%_Windows_%PLATFORM%
  LIB_EXTENDED_NAME: TomatoLib_%APPVEYOR_REPO_TAG_NAME%_Windows_%PLATFORM%

install:
  - git submodule update --init --recursive
  - cd %APPVEYOR_BUILD_FOLDER%\thirdParty\googletest
  - git checkout tags/release-1.4.0 # version that works with this toolset

platform:
  - Win32
  - x64

configuration:
  - Release

before_build:
  # get itk
  - cd %APPVEYOR_BUILD_FOLDER%\..
  - git clone https://MRKonrad:%GH_PERSONAL_ACCESS_TOKEN%@github.com/MRKonrad/tomato_private
  - mkdir ITK_install
  - cd ITK_install
  - curl -L https://github.com/MRKonrad/build-itk/releases/download/itk_v4.13.2/itk_v4.13.2_windows_%PLATFORM%_%toolset%.zip -o itk_install.zip
  - 7z x -r itk_install.zip
  - dir
  # configure and generate via cmake
  - cd %APPVEYOR_BUILD_FOLDER%
  - cmake . -Bbin -A%PLATFORM% -DCMAKE_INSTALL_PREFIX=install -DITK_DIR_HINTS="../ITK_install" -T %toolset%

build_script:
  - cd %APPVEYOR_BUILD_FOLDER%\bin
  - cmake --build . --config %CONFIGURATION% --target ALL_BUILD

after_build:
  # install the files
  - cd %APPVEYOR_BUILD_FOLDER%\bin
  - dir
  - cmake --build . --config %CONFIGURATION% --target INSTALL
  # FOR DEPLOYMENT
  - cd %APPVEYOR_BUILD_FOLDER%
  - mkdir deployment
  # change the name of the exe, zip it and copy the zip to the deployment folders
  - cd %APPVEYOR_BUILD_FOLDER%\install
  - 7z a %EXE_EXTENDED_NAME%.zip bin\TomatoExe.exe # zip
  - 7z a %LIB_EXTENDED_NAME%.zip lib\* include\* # zip
  - copy %APPVEYOR_BUILD_FOLDER%\install\%EXE_EXTENDED_NAME%.zip %APPVEYOR_BUILD_FOLDER%\deployment\%EXE_EXTENDED_NAME%.zip
  - copy %APPVEYOR_BUILD_FOLDER%\install\%LIB_EXTENDED_NAME%.zip %APPVEYOR_BUILD_FOLDER%\deployment\%LIB_EXTENDED_NAME%.zip

test_script:
  # TODO: should I add sth like this? https://github.com/mgerhardy/caveexpress/blob/master/appveyor.yml
  - cd %APPVEYOR_BUILD_FOLDER%\install\tests\
  - TomatoTests.exe

artifacts:
  - path: deployment\*.*

deploy:
  provider: GitHub
  auth_token:
    secure: Nmbbo4JCoK5AuN1ugWmE/c8/BAXlpz8Lb7piWDcAAWnT/GFa7fwL20GbXyU9AZSn
  draft: false
  prerelease: false
  force_update: true
  on:
    appveyor_repo_tag: true        # deploy on tag push only
    configuration: Release
back to top