|
1 | 1 | image: Visual Studio 2017 |
2 | 2 |
|
| 3 | +platform: |
| 4 | +- x86 |
| 5 | +- x64 |
| 6 | + |
3 | 7 | configuration: |
| 8 | + - Debug |
4 | 9 | - Release |
5 | 10 |
|
6 | | -clone_folder: c:\projects\proj |
7 | | - |
8 | | -platform: |
9 | | -- x86 |
| 11 | +environment: |
| 12 | + matrix: |
| 13 | + - SHARED: OFF |
| 14 | + POSTFIXNAME: MT |
| 15 | + - SHARED: ON |
| 16 | + POSTFIXNAME: MD |
| 17 | + |
| 18 | +matrix: |
| 19 | + fast_finish: true |
10 | 20 |
|
11 | 21 | install: |
12 | 22 | - ps: wget https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -outfile "VCForPython27.msi" |
13 | | - - start /wait msiexec /i c:\projects\proj\VCForPython27.msi /quiet /qn /norestart |
| 23 | + - start /wait msiexec /i VCForPython27.msi /quiet /qn /norestart |
14 | 24 | - pip install autobahntestsuite |
15 | | - - ps: If ($env:Platform -Match "x86"){ $env:CMAKE_ARCH="" } Else { $env:CMAKE_ARCH=" Win64"} |
16 | | - - mkdir C:\projects\deps |
17 | | - - cd C:\projects\deps |
| 25 | + - mkdir deps |
| 26 | + - cd deps |
18 | 27 | - set CMAKE_URL="https://cmake.org/files/v3.9/cmake-3.9.4-win64-x64.zip" |
19 | 28 | - appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip |
20 | | - - 7z x cmake.zip -oC:\projects\deps > nul |
21 | | - - move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory |
22 | | - - set PATH=C:\projects\deps\cmake\bin;%PATH% |
| 29 | + - 7z x cmake.zip |
| 30 | + - move cmake-* cmake # Move to a version-agnostic directory |
| 31 | + - set PATH=%cd%\cmake\bin;%PATH% |
23 | 32 | - cmake --version |
24 | | - - cd c:\projects |
| 33 | + - cd .. |
25 | 34 | - mkdir build |
26 | 35 | - cd build |
27 | 36 | - git clone https://github.com/Microsoft/vcpkg |
28 | 37 | - cd vcpkg |
29 | 38 | - powershell -exec bypass scripts\bootstrap.ps1 |
30 | 39 | - .\vcpkg integrate install |
31 | 40 | - .\vcpkg install zlib:x86-windows-static openssl:x86-windows-static zlib openssl |
| 41 | + - cd .. |
32 | 42 |
|
33 | 43 | build_script: |
34 | | - - cd c:\projects\proj |
35 | | - - mkdir build |
36 | | - - cd build |
37 | | - - cmake -DBUILD_SHARED_LIBS=OFF -DVCPKG_TARGET_TRIPLET=x86-windows-static "-DCMAKE_TOOLCHAIN_FILE=c:\projects\build\vcpkg\scripts\buildsystems\vcpkg.cmake" .. |
38 | | - - cmake --build . |
39 | | - - ctest -V -C Release |
40 | | - - cmake -DBUILD_SHARED_LIBS=ON "-DCMAKE_TOOLCHAIN_FILE=c:\projects\build\vcpkg\scripts\buildsystems\vcpkg.cmake" .. |
41 | | - - cmake --build . |
42 | | - - cmake --build . |
43 | | - - ctest -V -C Release |
| 44 | + - if %platform%==x86 set generator=Visual Studio 15 2017 |
| 45 | + - if %platform%==x64 set generator=Visual Studio 15 2017 Win64 |
| 46 | + - cmd: echo %generator% %SHARED% %configuration% |
| 47 | + - cmd: cmake .. -G"%generator%" -DBUILD_SHARED_LIBS=%SHARED% -DCMAKE_INSTALL_PREFIX=./output |
| 48 | + - cmd: cmake --build . --target INSTALL --config %configuration% |
| 49 | + - 7z a vc140_%configuration%_%PLATFORM%_%POSTFIXNAME%.zip -i!%APPVEYOR_BUILD_FOLDER%\build\output\* |
| 50 | + - appveyor PushArtifact vc140_%configuration%_%PLATFORM%_%POSTFIXNAME%.zip |
| 51 | + |
| 52 | +deploy: |
| 53 | + provider: GitHub |
| 54 | + auth_token: |
| 55 | + secure: WCGi6SXwa6VaPyLH6fZCrmTix+e2FA3zwzhNg8dSf3EdrcecGIR3Z0qG/vssOdfA |
| 56 | + draft: false |
| 57 | + prerelease: false |
| 58 | + on: |
| 59 | + appveyor_repo_tag: true |
0 commit comments