-
Notifications
You must be signed in to change notification settings - Fork 36
/
appveyor.yml
114 lines (80 loc) · 3.32 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
version: configuring.{build}
configuration:
- Debug
- Release
platform:
- Win32
- x64
clone_folder: c:\SLBuild\cabl
init:
- cmd: choco install doxygen.install
- cmd: >-
cd c:\SLBuild\
nuget install boost_python-vc140 -Version 1.62.0
cd cabl
environment:
BOOST_INCLUDEDIR: C:\SLBuild\boost.1.62.0.0\lib\native\include
BOOST_PYTHON_ROOT: C:\SLBuild\boost_python-vc140.1.62.0.0\lib\native
PYTHON_VERSION: 27
TEST_JUNIT: ON
TEST_ALL: ON
STATIC_LIBS: ON
SHARED_LIBS: ON
build_script:
- cmd: >-
echo Running cmake...
echo Building %CONFIGURATION% - %PLATFORM%
c:
cd c:\SLBuild\cabl
mkdir build-%PLATFORM%
pushd build-%PLATFORM%
if %PLATFORM% == x64 (set BOOST_LIBRARYDIR=%BOOST_PYTHON_ROOT%\address-model-64\lib) else (set BOOST_LIBRARYDIR=%BOOST_PYTHON_ROOT%\address-model-32\lib)
if %PLATFORM% == x64 (set GENERATOR="Visual Studio 14 2015 Win64") else (set GENERATOR="Visual Studio 14 2015")
if %PLATFORM% == x64 (set PYTHON_ROOT=c:\Python%PYTHON_VERSION%-x64) else (set PYTHON_ROOT=c:\Python%PYTHON_VERSION%)
cmake -G %GENERATOR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DPYTHON_LIBRARY=%PYTHON_ROOT%\libs\python%PYTHON_VERSION%.lib -DPYTHON_INCLUDE_DIR=%PYTHON_ROOT%\include -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCABL_TEST_JUNIT=%TEST_JUNIT% -DCABL_TEST_ALL=%TEST_ALL% -DBUILD_STATIC_LIBS=%STATIC_LIBS% -DBUILD_SHARED_LIBS=%SHARED_LIBS% ..
cd ..
cmake --build build-%PLATFORM% --config %CONFIGURATION%
mkdir build-%PLATFORM%\%CONFIGURATION%\include
xcopy inc build-%PLATFORM%\%CONFIGURATION%\include /e /y /I
mkdir artifacts-%CONFIGURATION%
cd build-%PLATFORM%\%CONFIGURATION%\
del hidapi*.*;libusb*.*;rtmidi*.*
if %CONFIGURATION% == Debug (copy %BOOST_LIBRARYDIR%\boost_python-vc140-mt-gd-*.dll ) else (copy %BOOST_LIBRARYDIR%\boost_python-vc140-mt-1*.dll )
7z a -tzip cabl-win.zip -r *
move /y *.zip ..\..\artifacts-%CONFIGURATION%
cd ..\..\
after_build:
- cmd: >-
cd c:\SLBuild\cabl\artifacts-%CONFIGURATION%
if %PLATFORM% == x64 (echo Preparing to deploy cabl-win-64_%APPVEYOR_BUILD_VERSION%.zip) else (echo Preparing to deploy cabl-win-32_%APPVEYOR_BUILD_VERSION%.zip)
if %PLATFORM% == x64 (ren cabl-win.zip cabl-win-64_%APPVEYOR_BUILD_VERSION%.zip) else (ren cabl-win.zip cabl-win-32_%APPVEYOR_BUILD_VERSION%.zip)
cd ..
before_test:
- cmd: >-
cd c:\SLBuild\cabl\
cmake --build build-%PLATFORM% --config %CONFIGURATION% --target check
artifacts:
- path: artifacts-Release/cabl-win-32_*.zip
name: cabl (32bit)
- path: artifacts-Release/cabl-win-64_*.zip
name: cabl (64bit)
deploy:
- provider: Environment
name: cabl-win-64
on:
branch: master
CONFIGURATION: Release
PLATFORM: x64
- provider: Environment
name: cabl-win-32
on:
branch: master
CONFIGURATION: Release
PLATFORM: Win32
on_finish:
- ps: >-
$testReportPath = "c:\SLBuild\cabl\build-$($env:PLATFORM)\test\$($env:CONFIGURATION)\test-report.junit.xml"
if([System.IO.File]::Exists($testReportPath)){
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testReportPath))
}