-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
125 lines (106 loc) · 3.49 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '{build}'
branches:
only:
- master
- develop
- appveyor
only_commits:
files:
- CMakeLists.txt
- appveyor.yml
- .appveyor/
- src/
- include/
cache:
#- dependencies
- dependencies -> .appveyor/cleanup-appveyor-cache.txt
clone_folder: C:/projects/showtime-cpp
image:
- Visual Studio 2019
configuration:
- Debug
- Release
platform:
- x64
environment:
GENERATOR: "Visual Studio 16 2019"
MSVC_VER: "msvc-14.2"
BOOST_ROOT: "C:/Libraries/boost_1_71_0"
BUILD_FOLDER: "%APPVEYOR_BUILD_FOLDER%/build"
DEPENDENCY_DIR: "%APPVEYOR_BUILD_FOLDER%/build/dependencies"
INSTALL_DIR: "%APPVEYOR_BUILD_FOLDER%/build/dependencies/install"
PATH: "%PROGRAMFILES%/CMake/bin;%PATH%"
matrix:
- NATIVE: true
- PYTHON_VER: 2
- PYTHON_VER: 3
- DOTNET_VER: v4.7.2
- DOTNET_VER: netstandard2.0
- DOTNET_VER: netstandard2.1
matrix:
fast_finish: true
install:
- ps: |-
mkdir $Env:BUILD_FOLDER
mkdir $Env:DEPENDENCY_DIR
mkdir $Env:INSTALL_DIR
git -C $Env:APPVEYOR_BUILD_FOLDER submodule init
git -C $Env:APPVEYOR_BUILD_FOLDER submodule update
if($Env:PYTHON_VER -ne $null){
choco install -y python$env:PYTHON_VER -ia "CompileAll=1 Include_debug=1 Include_symbols=1" > $null
}
if($Env:DOTNET_VER -ne $null){
choco install -y dotnetcoresdk > $null
}
choco install -y swig > $null
choco install -y cmake > $null
refreshenv
& "$Env:APPVEYOR_BUILD_FOLDER/install_dependencies.ps1" -build_dir $Env:BUILD_FOLDER -config $Env:CONFIGURATION -without_boost
before_build:
- ps: |-
$CMAKE_FLAGS= @(
"-S", "$env:APPVEYOR_BUILD_FOLDER",
"-B", "$env:BUILD_FOLDER"
"-G", "Visual Studio 16 2019",
"-A", "x64",
"-DCMAKE_PREFIX_PATH=$env:INSTALL_DIR/$env:MSVC_VER",
"-DBUILD_SHARED=ON",
"-DBUILD_STATIC=ON",
"-DBUILD_DRAFTS=OFF",
"-DBUILD_TESTING=ON",
"-DBOOST_ROOT:PATHNAME=$env:BOOST_ROOT",
"-DBOOST_INCLUDEDIR:PATHNAME=$env:BOOST_ROOT",
"-DBOOST_LIBRARYDIR:PATHNAME=$env:BOOST_ROOT/lib64-msvc-14.1"
)
if($Env:PYTHON_VER -ne $null){
& pip$env:PYTHON_VER install wheel
$CMAKE_FLAGS += @(
"-DBINDINGS_PYTHON=ON",
"-DBINDINGS_PYTHON_VERSION_MAJOR=$env:PYTHON_VER"
)
}
if($Env:DOTNET_VER -ne $null){
$CMAKE_FLAGS += @(
"-DBINDINGS_DOTNET=ON",
"-DBINDINGS_DOTNET_CSPROJ=ON",
"-DBINDINGS_DOTNET_FRAMEWORK_VERSION=$Env:DOTNET_VER",
"-DADD_GENERATED_MSVC_PROJECTS=OFF"
)
}
cmake @CMAKE_FLAGS
cmake --build "$env:BUILD_FOLDER" --config $Env:CONFIGURATION
build:
parallel: true
project: $(BUILD_FOLDER)/Showtime.sln
verbosity: minimal
test_script:
- ps: |
Push-Location -Path "$env:BUILD_FOLDER"
& ctest -C $env:CONFIGURATION --output-on-fail --no-compress-output -T Test -j 4 --timeout 320
$result = Get-Childitem -ErrorAction SilentlyContinue -Recurse –Path $env:BUILD_FOLDER/Testing/*.xml
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
$XSLInputElement.Load("https://raw.githubusercontent.com/rpavlik/jenkins-ctest-plugin/master/ctest-to-junit.xsl")
$XSLInputElement.Transform($result[0].FullName, (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))
Pop-Location