forked from lamyj/odil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
89 lines (77 loc) · 3.85 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
version: "{build}"
branches:
only:
- master
image: Visual Studio 2015
platform:
- x64
configuration:
- Release
environment:
BOOST_ROOT: C:/Libraries/boost_1_62_0
DCMTK_ROOT: c:/Libraries/dcmtk
ICU_ROOT: C:/Libraries/icu
JsonCpp_ROOT: C:/Libraries/jsoncpp
Log4Cpp_ROOT: C:/Libraries/log4cpp
Python_ROOT: C:/Python27-x64
VERSION: 0.8.0-1
install:
- ps: |
Start-FileDownload https://github.com/lamyj/appveyor-dcmtk/releases/download/v3.6.1-20161102-2/dcmtk_3.6.1-20161102-2_dynamic_x64.zip dcmtk.zip
7z x -bd -oC:\Libraries dcmtk.zip
Start-FileDownload http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-Win64-MSVC2015.zip
7z x -bd -oC:\Libraries icu4c-58_2-Win64-MSVC2015.zip
Start-FileDownload https://github.com/lamyj/appveyor-jsoncpp/releases/download/v1.8.0-2/jsoncpp_1.8.0-2_dynamic_x64.zip jsoncpp.zip
7z x -bd -oC:\Libraries jsoncpp.zip
Start-FileDownload https://github.com/lamyj/appveyor-log4cpp/releases/download/v1.1.1-1/log4cpp_1.1.1-dll_x64.zip log4cpp.zip
7z x -bd -oC:\Libraries log4cpp.zip
before_build:
- ps: |
${env:BUILD_DIRECTORY}="${env:APPVEYOR_BUILD_FOLDER}\build"
${env:INSTALL_DIRECTORY}="${env:APPVEYOR_BUILD_FOLDER}\install\${env:APPVEYOR_PROJECT_NAME}"
New-Item -Path "${env:BUILD_DIRECTORY}" -ItemType "directory"
cd "${env:BUILD_DIRECTORY}"
${generator} = "Visual Studio 14 2015"
if (${env:PLATFORM} -eq "x64") { ${generator} = "${generator} Win64" }
cmake `
-G "${generator}" -DCMAKE_INSTALL_PREFIX="${env:INSTALL_DIRECTORY}" `
-DBUILD_EXAMPLES=ON -DBUILD_PYTHON_WRAPPERS=OFF -DUSE_BUILTIN_DCMTK_GETSCU=OFF `
-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DWITH_DCMTK=ON `
-DBOOST_LIBRARYDIR="${env:BOOST_ROOT}/lib64-msvc-14.0" `
-DDCMTK_INCLUDE_DIR="${env:DCMTK_ROOT}/include" -DDCMTK_LIBRARY="${env:DCMTK_ROOT}/lib/dcmdata.lib" `
-DDCMDATA_LIBRARY="${env:DCMTK_ROOT}/lib/dcmdata.lib" -DDCMNET_LIBRARY="${env:DCMTK_ROOT}/lib/dcmnet.lib" `
-DOFLOG_LIBRARY="${env:DCMTK_ROOT}/lib/oflog.lib" -DOFSTD_LIBRARY="${env:DCMTK_ROOT}/lib/ofstd.lib" `
-DICU_INCLUDE_DIR="${env:ICU_ROOT}/include" -DICU_LIBRARY="${env:ICU_ROOT}/lib64/icuuc.lib" `
-DJsonCpp_INCLUDE_DIR="${env:JsonCpp_ROOT}/include" -DJsonCpp_LIBRARY="${env:JsonCpp_ROOT}/lib/jsoncpp.lib" `
-DLog4Cpp_INCLUDE_DIR="${env:Log4Cpp_ROOT}/include" -DLog4Cpp_LIBRARY="${env:Log4Cpp_ROOT}/lib/log4cpp.lib" `
"${env:APPVEYOR_BUILD_FOLDER}"
build_script:
- ps: |
msbuild "${env:BUILD_DIRECTORY}\${env:APPVEYOR_PROJECT_NAME}.sln" `
/m /clp:Verbosity=minimal /p:Configuration=${env:CONFIGURATION}
msbuild "${env:BUILD_DIRECTORY}\INSTALL.vcxproj" `
/m /clp:Verbosity=minimal /p:Configuration=${env:CONFIGURATION}
before_test:
- ps: |
& "${env:Python_ROOT}\Scripts\pip.exe" install nose
# nosetests writes on stderr, and powershell treats this as an exception:
# use cmd instead
test_script:
- cmd: |
set PATH=%PATH%;%BOOST_ROOT%\lib64-msvc-14.0;%DCMTK_ROOT%\bin
set PATH=%PATH%;%ICU_ROOT%\bin64;%JsonCpp_ROOT%\bin;%Log4Cpp_ROOT%\bin
set PATH=%PATH%;%INSTALL_DIRECTORY%\bin
set PYTHONPATH=%BUILD_DIRECTORY%\wrappers\%CONFIGURATION%
cd %BUILD_DIRECTORY%
%Python_ROOT%\python.exe ..\tests\run --no-network -e ".*" --nose=%Python_ROOT%\Scripts\nosetests.exe
after_test:
- ps: |
Start-FileDownload https://download.microsoft.com/download/f/2/6/f263ac46-1fe9-4ae9-8fd3-21102100ebf5/msxsl.exe
.\msxsl.exe `
"${env:BUILD_DIRECTORY}\Testing\$(Get-Content Testing\TAG -TotalCount 1)\Test.xml" `
"${env:APPVEYOR_BUILD_FOLDER}\ctest-to-junit.xsl" `
-o junit.xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile(
"https://ci.appveyor.com/api/testresults/junit/${env:APPVEYOR_JOB_ID}",
(Resolve-Path .\junit.xml))