onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 1 | # http://www.appveyor.com/docs/appveyor-yml |
| 2 | |
| 3 | notifications: |
| 4 | - provider: Email |
| 5 | on_build_status_changed: false |
| 6 | on_build_failure: false |
| 7 | on_build_success: false |
| 8 | # gitter |
| 9 | - provider: Webhook |
| 10 | url: https://webhooks.gitter.im/e/3a78202a235c0325e516 |
| 11 | on_build_status_changed: true |
| 12 | on_build_failure: true |
| 13 | on_build_success: false |
| 14 | |
| 15 | clone_depth: 500 |
| 16 | branches: |
| 17 | except: |
| 18 | - gh-pages |
| 19 | - coverity_scan |
| 20 | |
| 21 | matrix: |
| 22 | fast_finish: false |
| 23 | |
| 24 | environment: |
| 25 | matrix: |
| 26 | - gen: "MinGW Makefiles" |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 27 | - gen: "Visual Studio 14 2015" |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 28 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 29 | - gen: "Visual Studio 15 2017" |
| 30 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 |
onqtam | 420e747 | 2019-06-02 15:28:49 +0300 | [diff] [blame] | 31 | # - gen: "Visual Studio 16 2019" |
| 32 | # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 Preview |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 33 | |
| 34 | install: |
onqtam | 54b5bb9 | 2018-05-31 13:13:09 +0300 | [diff] [blame] | 35 | - IF "%gen%" == "MinGW Makefiles" appveyor-retry appveyor DownloadFile http://downloads.sourceforge.net/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z |
| 36 | - IF "%gen%" == "MinGW Makefiles" 7z x x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z -oc:\mingw > nul |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 37 | |
| 38 | build_script: |
onqtam | 420e747 | 2019-06-02 15:28:49 +0300 | [diff] [blame] | 39 | - cmake --version |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 40 | # workaround for CMake not wanting sh.exe on PATH for MinGW |
| 41 | - IF "%gen%" == "MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=% |
| 42 | - IF "%gen%" == "MinGW Makefiles" set PATH=C:\mingw\mingw64\bin;%PATH% |
| 43 | # generate and build everything for debug and release |
| 44 | - IF "%gen%" == "MinGW Makefiles" mkdir debug_64 |
| 45 | - IF "%gen%" == "MinGW Makefiles" cd debug_64 |
| 46 | - IF "%gen%" == "MinGW Makefiles" cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug |
| 47 | - IF "%gen%" == "MinGW Makefiles" cmake --build . |
| 48 | - IF "%gen%" == "MinGW Makefiles" cd .. |
| 49 | - IF "%gen%" == "MinGW Makefiles" mkdir release_64 |
| 50 | - IF "%gen%" == "MinGW Makefiles" cd release_64 |
| 51 | - IF "%gen%" == "MinGW Makefiles" cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release |
| 52 | - IF "%gen%" == "MinGW Makefiles" cmake --build . |
| 53 | - IF "%gen%" == "MinGW Makefiles" cd .. |
| 54 | # adding git to the path again - for the dos2unix tool |
| 55 | - IF "%gen%" == "MinGW Makefiles" set PATH=%PATH%;C:\Program Files\Git\usr\bin |
| 56 | # execute tests |
| 57 | - IF "%gen%" == "MinGW Makefiles" cd debug_64 |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 58 | - IF "%gen%" == "MinGW Makefiles" ctest -j2 --output-on-failure |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 59 | - IF "%gen%" == "MinGW Makefiles" cd .. |
| 60 | - IF "%gen%" == "MinGW Makefiles" cd release_64 |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 61 | - IF "%gen%" == "MinGW Makefiles" ctest -j2 --output-on-failure |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 62 | - IF "%gen%" == "MinGW Makefiles" cd .. |
| 63 | - IF "%gen%" == "MinGW Makefiles" appveyor exit |
| 64 | # ============= VISUAL STUDIO |
onqtam | ef508e8 | 2018-05-29 23:45:43 +0300 | [diff] [blame] | 65 | - mkdir debug_64 |
| 66 | - cd debug_64 |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 67 | - cmake .. -G "%gen%" -A x64 |
onqtam | ef508e8 | 2018-05-29 23:45:43 +0300 | [diff] [blame] | 68 | - msbuild doctest.sln /p:Configuration=Debug;Platform=x64 /maxcpucount |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 69 | - ctest -C Debug -j2 --output-on-failure |
onqtam | ef508e8 | 2018-05-29 23:45:43 +0300 | [diff] [blame] | 70 | - cd .. |
| 71 | - mkdir release_64 |
| 72 | - cd release_64 |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 73 | - cmake .. -G "%gen%" -A x64 |
onqtam | ef508e8 | 2018-05-29 23:45:43 +0300 | [diff] [blame] | 74 | - msbuild doctest.sln /p:Configuration=Release;Platform=x64 /maxcpucount |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 75 | - ctest -C Release -j2 --output-on-failure |
onqtam | ef508e8 | 2018-05-29 23:45:43 +0300 | [diff] [blame] | 76 | - cd .. |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 77 | # x86 |
| 78 | - mkdir debug_86 |
| 79 | - cd debug_86 |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 80 | - cmake .. -G "%gen%" -A Win32 |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 81 | - msbuild doctest.sln /p:Configuration=Debug;Platform=Win32 /maxcpucount |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 82 | - ctest -C Debug -j2 --output-on-failure |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 83 | - cd .. |
| 84 | - mkdir release_86 |
| 85 | - cd release_86 |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 86 | - cmake .. -G "%gen%" -A Win32 |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 87 | - msbuild doctest.sln /p:Configuration=Release;Platform=Win32 /maxcpucount |
onqtam | 366c368 | 2019-03-19 13:58:02 +0200 | [diff] [blame] | 88 | - ctest -C Release -j2 --output-on-failure |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 89 | - cd .. |
| 90 | # static code analysis |
| 91 | - IF "%gen%" == "Visual Studio 15 2017" mkdir analysis |
| 92 | - IF "%gen%" == "Visual Studio 15 2017" cd analysis |
onqtam | 190ba25 | 2019-03-23 09:58:34 +0200 | [diff] [blame] | 93 | - IF "%gen%" == "Visual Studio 15 2017" cmake .. -G "%gen%" -A x64 |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 94 | - IF "%gen%" == "Visual Studio 15 2017" msbuild doctest.sln /p:Configuration=Debug;Platform=x64 /maxcpucount /p:RunCodeAnalysis=true /p:CodeAnalysisTreatWarningsAsErrors=true |
| 95 | - IF "%gen%" == "Visual Studio 15 2017" cd .. |