https://github.com/ElsevierSoftwareX/SOFTX_2019_219
Revision 4cd08fdb1f6dacb577a151b9aeac8684f6875aeb authored by Konrad Werys on 31 October 2019, 10:31:42 UTC, committed by Konrad Werys on 31 October 2019, 10:31:42 UTC
1 parent 067df5d
Raw File
Tip revision: 4cd08fdb1f6dacb577a151b9aeac8684f6875aeb authored by Konrad Werys on 31 October 2019, 10:31:42 UTC
build: cmake not scripts to download itk and lmfit
Tip revision: 4cd08fd
.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:
  - cd %APPVEYOR_BUILD_FOLDER%\..
  # get private code
  - git clone https://MRKonrad:%GH_PERSONAL_ACCESS_TOKEN%@github.com/MRKonrad/tomato_private
#  # get itk binaries
#  - cd %APPVEYOR_BUILD_FOLDER%\scriptsBuild
#  - downloadITK_windows.bat
#  - # get Lmfit binaries
#  - cd %APPVEYOR_BUILD_FOLDER%\scriptsBuild
#  - downloadLmfit_windows.bat
  # configure and generate build using cmake
  - cd %APPVEYOR_BUILD_FOLDER%
  - |
    cmake .
      -Bstatic
      -A%PLATFORM%
      -DCMAKE_INSTALL_PREFIX=install
      -T %toolset%
      -DLIB_INSTALL_DIR="lib_static"
      -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
  - |
    cmake .
      -Bshared
      -A%PLATFORM%
      -DCMAKE_INSTALL_PREFIX=install
      -T %toolset%
      -DBUILD_SHARED_LIBS=ON
      -DUSE_YAML=OFF
      -DLIB_INSTALL_DIR="lib_shared"
      -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON

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

after_build:
  # install the files
  - cd %APPVEYOR_BUILD_FOLDER%\static
  - cmake --build . --config %CONFIGURATION% --target INSTALL
  - cd %APPVEYOR_BUILD_FOLDER%\shared
  - 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
  - cd bin
  - 7z a %EXE_EXTENDED_NAME%.zip *  # zip
  - cd ..
  - 7z a %LIB_EXTENDED_NAME%.zip lib\* lib_static\* lib_shared\* include\* # zip
  - copy %APPVEYOR_BUILD_FOLDER%\install\bin\%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:
  - 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