This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
appveyor.yml
95 lines (81 loc) · 2.37 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
os: Visual Studio 2015
init:
- ps: |
function Get-BuildVersion
{
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_REPO_TAG_NAME)
{
$tag_name = $env:APPVEYOR_REPO_TAG_NAME
if ($tag_name -match '([0-9]+[\.-][0-9]+[\.-][0-9]+[\.-][0-9]+)')
{
return $matches[1]
}
}
$build_number = $env:APPVEYOR_BUILD_NUMBER
if (!$build_number)
{
$build_number = 0
}
return "1.0.0.$build_number"
}
Update-AppveyorBuild -Version $(Get-BuildVersion)
configuration:
- Debug
- Release
environment:
PATH: '%ProgramFiles%\OpenCppCoverage;%SystemDrive%\Python27;C:\Python27\Scripts;%PATH%'
install:
- ps: Start-FileDownload 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-windows.zip' 'premake.zip'
- 7z x premake.zip
- cinst opencppcoverage
- pip install cpplint
- pip install codecov
before_build:
# Set env vars expected in premake
- set GIT_COMMIT=%APPVEYOR_REPO_COMMIT%
- set BUILD_VERSION=%APPVEYOR_BUILD_VERSION%
# Create Visual Sudio solution
- premake5.exe vs2015
# Restore solution NuGet packages before build
- nuget restore build\WindowsSupervisionSuite.sln
build:
project: build\WindowsSupervisionSuite.sln
test_script:
- ps: |
if ($env:CONFIGURATION -eq "Debug")
{
& .\tools\Run-Tests.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
else
{
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\build\testresults.xml))
& codecov -X gcov -f ".\build\coverage.xml"
}
& .\tools\Run-Lint.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
artifacts:
- path: build\bin\x64\$(configuration)
name: winss
type: zip
- path: build\testresults.xml
name: testresults
- path: build\coverage.xml
name: coverage
- path: build\cpplint.out
name: cpplint
deploy:
tag: $(appveyor_repo_tag_name)
release: winss $(appveyor_build_version)
provider: GitHub
auth_token:
secure: mSvsAjNV2gCX/XNeDFuwXYc6w7BIZo4eY6sjS9hZnlGnpYPproDWjzirT5z86znF
artifact: winss
draft: true
prerelease: false
on:
appveyor_repo_name: Morgan-Stanley/winss
appveyor_repo_tag: true
appveyor_repo_tag_name: /^ms/
configuration: Release