appveyor.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. version: '{build}'
  2. os: Visual Studio 2015
  3. environment:
  4. matrix:
  5. - Toolset: v140
  6. - Toolset: v120
  7. - Toolset: v110
  8. - Toolset: v100
  9. platform:
  10. - Win32
  11. - x64
  12. configuration:
  13. # - Release
  14. - Debug
  15. build:
  16. verbosity: minimal
  17. artifacts:
  18. - path: '_build/Testing/Temporary/*'
  19. name: test_results
  20. before_build:
  21. - ps: |
  22. Write-Output "Configuration: $env:CONFIGURATION"
  23. Write-Output "Platform: $env:PLATFORM"
  24. $generator = switch ($env:TOOLSET)
  25. {
  26. "v140" {"Visual Studio 14 2015"}
  27. "v120" {"Visual Studio 12 2013"}
  28. "v110" {"Visual Studio 11 2012"}
  29. "v100" {"Visual Studio 10 2010"}
  30. }
  31. if ($env:PLATFORM -eq "x64")
  32. {
  33. $generator = "$generator Win64"
  34. }
  35. build_script:
  36. - ps: |
  37. if (($env:TOOLSET -eq "v100") -and ($env:PLATFORM -eq "x64"))
  38. {
  39. return
  40. }
  41. md _build -Force | Out-Null
  42. cd _build
  43. & cmake -G "$generator" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -Dgtest_build_tests=ON -Dgtest_build_samples=ON -Dgmock_build_tests=ON ..
  44. if ($LastExitCode -ne 0) {
  45. throw "Exec: $ErrorMessage"
  46. }
  47. & cmake --build . --config $env:CONFIGURATION
  48. if ($LastExitCode -ne 0) {
  49. throw "Exec: $ErrorMessage"
  50. }
  51. test_script:
  52. - ps: |
  53. if (($env:Toolset -eq "v100") -and ($env:PLATFORM -eq "x64"))
  54. {
  55. return
  56. }
  57. & ctest -C $env:CONFIGURATION --output-on-failure
  58. if ($LastExitCode -ne 0) {
  59. throw "Exec: $ErrorMessage"
  60. }