|
| 1 | +# Notes: |
| 2 | +# - Minimal appveyor.yml file is an empty file. All sections are optional. |
| 3 | +# - Indent each level of configuration with 2 spaces. Do not use tabs! |
| 4 | +# - All section names are case-sensitive. |
| 5 | +# - Section names should be unique on each level. |
| 6 | + |
| 7 | +#---------------------------------# |
| 8 | +# general configuration # |
| 9 | +#---------------------------------# |
| 10 | + |
| 11 | +# version format |
| 12 | +version: 1.3.{build} |
| 13 | + |
| 14 | +# you can use {branch} name in version format too |
| 15 | +# version: 1.0.{build}-{branch} |
| 16 | + |
| 17 | +#---------------------------------# |
| 18 | +# environment configuration # |
| 19 | +#---------------------------------# |
| 20 | + |
| 21 | +# Build worker image (VM template) |
| 22 | +image: Visual Studio 2015 |
| 23 | + |
| 24 | +# fetch repository as zip archive |
| 25 | +shallow_clone: true # default is "false" |
| 26 | + |
| 27 | +# clone directory |
| 28 | +clone_folder: c:\projects\bin2cpp |
| 29 | + |
| 30 | +# environment variables |
| 31 | +environment: |
| 32 | + GTEST_DEBUG_LIBRARIES: gtest.lib |
| 33 | + GTEST_RELEASE_LIBRARIES: gtest.lib |
| 34 | + GTEST_INCLUDE: c:\projects\third_party\googletest\include |
| 35 | + GTEST_LIBRARY_DIR: c:\projects\third_party\googletest\msvc2010 |
| 36 | + |
| 37 | +# scripts that run after cloning repository |
| 38 | +install: |
| 39 | +- cmd: >- |
| 40 | + @echo off |
| 41 | + REM ====================================================================== |
| 42 | + REM Cloning google test repository |
| 43 | + REM ======================================================================= |
| 44 | + git clone https://github.com/google/googletest.git c:\projects\third_party\googletest |
| 45 | + cd /d c:\projects\third_party\googletest |
| 46 | + git checkout release-1.6.0 |
| 47 | +
|
| 48 | + REM ======================================================================= |
| 49 | + REM Generating google test Visual Studio 2010 solution |
| 50 | + REM ======================================================================= |
| 51 | + mkdir msvc2010 |
| 52 | + cd msvc2010 |
| 53 | + cmake -G "Visual Studio 10 2010" -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS_DEBUG=/MDd -DCMAKE_CXX_FLAGS_RELEASE=/MD "c:\projects\third_party\googletest" |
| 54 | + cd.. |
| 55 | +
|
| 56 | + REM ======================================================================= |
| 57 | + REM Displaying Environnment Variables |
| 58 | + REM ======================================================================= |
| 59 | + set |
| 60 | +
|
| 61 | + REM ======================================================================= |
| 62 | + REM Building google test library |
| 63 | + REM ======================================================================= |
| 64 | + msbuild "msvc2010\gtest.sln" /m /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" |
| 65 | +
|
| 66 | + REM ======================================================================= |
| 67 | + REM Done |
| 68 | + REM ======================================================================= |
| 69 | +
|
| 70 | +#---------------------------------# |
| 71 | +# build configuration # |
| 72 | +#---------------------------------# |
| 73 | + |
| 74 | +# build platform, i.e. x86, x64, Any CPU. This setting is optional. |
| 75 | +#platform: x86 |
| 76 | + |
| 77 | +# build Configuration, i.e. Debug, Release, etc. |
| 78 | +configuration: Release |
| 79 | + |
| 80 | +# to add several configurations to build matrix: |
| 81 | +#configuration: |
| 82 | +# - Debug |
| 83 | +# - Release |
| 84 | + |
| 85 | +build: |
| 86 | + project: msvc\bin2cpp.sln |
| 87 | + verbosity: minimal |
| 88 | + |
| 89 | +#---------------------------------# |
| 90 | +# tests configuration # |
| 91 | +#---------------------------------# |
| 92 | + |
| 93 | +# to run your custom scripts instead of automatic tests |
| 94 | +test_script: |
| 95 | +- cmd: >- |
| 96 | + REM ====================================================================== |
| 97 | + REM Running unit tests |
| 98 | + REM ======================================================================= |
| 99 | + cd /d c:\projects\bin2cpp\msvc |
| 100 | + set path=%PATH%;c:\projects\bin2cpp\msvc\Win32\Release |
| 101 | + bin2cpp_unittest.exe --gtest_filter=-TestExtraction.testRandom100000 |
| 102 | +
|
| 103 | + REM ====================================================================== |
| 104 | + REM Uploading test results to AppVeyor |
| 105 | + REM ======================================================================= |
| 106 | + set TEST_RESULT_URL=https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID% |
| 107 | + set TEST_RESULT_FILE=%CD%\bin2cppTest.x86.release.xml |
| 108 | + echo TEST_RESULT_URL=%TEST_RESULT_URL% |
| 109 | + echo TEST_RESULT_FILE=%TEST_RESULT_FILE% |
| 110 | + powershell "(New-Object 'System.Net.WebClient').UploadFile($($env:TEST_RESULT_URL), $($env:TEST_RESULT_FILE))" |
| 111 | +
|
| 112 | +#---------------------------------# |
| 113 | +# artifacts configuration # |
| 114 | +#---------------------------------# |
| 115 | + |
| 116 | +artifacts: |
| 117 | +- path: msvc\bin2cppTest.x86.release.xml |
| 118 | + name: bin2cppTest.x86.release.xml |
| 119 | +- path: nsis\bin\*.zip |
| 120 | + name: bin2cpp win32 portable |
| 121 | +- path: nsis\bin\*.exe |
| 122 | + name: bin2cpp win32 setup |
| 123 | + |
| 124 | +#---------------------------------# |
| 125 | +# deployment configuration # |
| 126 | +#---------------------------------# |
| 127 | + |
| 128 | +# # providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment |
| 129 | +# # provider names are case-sensitive! |
| 130 | +# deploy: |
| 131 | +# |
| 132 | +# # Deploy to GitHub Releases |
| 133 | +# - provider: GitHub |
| 134 | +# tag: v$(APPVEYOR_BUILD_VERSION)-win32 |
| 135 | +# release: bin2cpp-v$(APPVEYOR_BUILD_VERSION)-win32 |
| 136 | +# description: Latest successful AppVeyor CI builds of branch '$(APPVEYOR_REPO_BRANCH)' |
| 137 | +# auth_token: |
| 138 | +# secure: BgyLisMc154qWpkyBdh8OD+D9HMM+YnBkh7H4MEUShKO3aCU+Fn/XVGJ07fTsRmH |
| 139 | +# artifact: /(.*\.zip|.*\.exe)/ |
| 140 | +# draft: true |
| 141 | +# prerelease: true |
| 142 | +# force_update: true |
| 143 | + |
| 144 | +#---------------------------------# |
| 145 | +# notifications # |
| 146 | +#---------------------------------# |
| 147 | + |
| 148 | +notifications: |
| 149 | +- provider: Email |
| 150 | + to: |
| 151 | + |
| 152 | + subject: 'Build {{status}}' # optional |
| 153 | + message: "{{message}}, {{commitId}}, ..." # optional |
| 154 | + on_build_success: true |
| 155 | + on_build_failure: true |
| 156 | + on_build_status_changed: true |
0 commit comments