os: 'Visual Studio 2015'

init:
  - 'git config --global core.autocrlf input'

environment:
  matrix:
    - platform: x64
      configuration: Release
    - platform: x86
      configuration: Release
    - platform: x64
      configuration: Debug
    - platform: x86
      configuration: Debug

before_build:
  - >-
    cmake . -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=C:\Projects\libs
    "-DCMAKE_BUILD_TYPE=%CONFIGURATION%" -DBOOST_ROOT=C:\Libraries\boost_1_63_0
    "-DSLIPROCK_TRACE=%CONFIGURATION%"

build:
  project: INSTALL.vcxproj

before_test:
  - ps: |
      cmd /s /c "echo:alpha"
      $config = ${Env:Configuration}
      if ($config -eq 'Release') {
        $limit = 100
      } else {
        $limit = 3
      }
      Write-Host $path
      for ($i = 0; $i -lt $limit; $i++) {
        Write-Host "Run number $i"
        cmd /s /c "src\${config}\mytest.exe 2>&1"
      }

notifications:
  - provider: Email
    to:
      - demiobenour@gmail.com

os: 'Visual Studio 2015'

init:
  - 'git config --global core.autocrlf input'

environment:
  matrix:
    - platform: x64
      configuration: Release
    - platform: x86
      configuration: Release
    - platform: x64
      configuration: Debug
    - platform: x86
      configuration: Debug

before_build:
  - >-
    cmake . -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=C:\Projects\libs
    "-DCMAKE_BUILD_TYPE=%CONFIGURATION%" -DBOOST_ROOT=C:\Libraries\boost_1_63_0
    "-DSLIPROCK_TRACE=%CONFIGURATION%"

build:
  project: INSTALL.vcxproj

before_test:
  - ps: |
      cmd /s /c "echo:alpha"
      $config = ${Env:Configuration}
      if ($config -eq 'Release') {
        $limit = 100
      } else {
        $limit = 3
      }
      Write-Host $path
      for ($i = 0; $i -lt $limit; $i++) {
        Write-Host "Run number $i"
        cmd /s /c "src\${config}\mytest.exe 2>&1"
        if ($? -eq 0) {
          throw "Error: command failed with exit code $?"
        }
      }

notifications:
  - provider: Email
    to:
      - demiobenour@gmail.com

Check exit code of programs in PowerShell test script
Check exit code of programs in PowerShell test script
