git repos / PlatformFolders

appveyor.yml

browsing at commit = ba428e10608fc3ee784598c5d609437d97f0b716

raw · blame · history

# Notes:
#   - Minimal appveyor.yml file is an empty file. All sections are optional.
#   - Indent each level of configuration with 2 spaces. Do not use tabs!
#   - All section names are case-sensitive.
#   - Section names should be unique on each level.

#---------------------------------#
#      general configuration      #
#---------------------------------#

# version format
version: '{branch}-{build}'

# branches to build
branches:
  # blacklist
  except:
    - gh-pages

#---------------------------------#
#    environment configuration    #
#---------------------------------#

image:
  - Visual Studio 2015
  - Visual Studio 2017

# build Configuration, i.e. Debug, Release, etc.
configuration:
  - Debug
  - Release

platform:
  - x86
  - x64

# clone directory
clone_folder: c:\projects\platform_folders

# This and clone_depth speed up git cloning
# fetch repository as zip archive
shallow_clone: true

# set clone depth
clone_depth: 1

# Generate the .sln file with Cmake before running MSBuild
before_build:
  - cmd: mkdir "%APPVEYOR_BUILD_FOLDER%"\build
  - cmd: cd "%APPVEYOR_BUILD_FOLDER%"\build
  # I know this is ugly, but the matrix didn't work, and newlines seem to not be supported
  - cmd: IF "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))

# CMake generates the platform as "Win32" instead of "x86" when building 32-bit
# but 64-bit is "x64"
build_script:
  - cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")

#---------------------------------#
#       tests configuration       #
#---------------------------------#

# to run your custom scripts instead of automatic tests
# The %CONFIGURATION% and %PLATFORM% variables are set from Appveyor as env-vars
test_script:
  - cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m) ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m)

#---------------------------------#
#        global handlers          #
#---------------------------------#

# on build failure dump cmake and test err log
on_failure:
  - cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log (type "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log)
  - cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\Testing\Temporary\LastTest.log (type "%APPVEYOR_BUILD_FOLDER%"\build\Testing\Temporary\LastTest.log)