forked from openmeeg/openmeeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
160 lines (135 loc) · 7.14 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
shallow_clone: true
platform:
# - x86
- x64
configuration:
# - Debug
- Release
image:
- Visual Studio 2017
#- Visual Studio 2015
cache:
- C:\cmake-3.16.0-win64-x64
- C:\w_mkl_2019.5.281.exe
environment:
global:
PYTHON: "C:\\conda"
deploy_host:
secure: elpy2/txkSJRwksSCwLehfm3eLDYTAalGUvTGzPlphY=
deploy_user:
secure: 2kJCgcedzNy4rFCQbW7PNw==
deploy_password:
secure: Cr908GItsFT5Wp0rYB8ExUukZxSu+mgdprFvU4CxmcM=
deploy_folder:
secure: k+J4yytvUwuRb5wHVAetZ84O90bJ4ZgwYOS9vLec90o09HP+GLvD9DvNbG1q9Q2p
matrix:
- BLAS_VERSION: Intel10_64lp_seq
BUILD_STATIC : ON
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
PACK: ON
skip_commits:
# Add [av skip] to commit messages
message: /\[av skip\]/
# ## To allow remote connection to appveyor
# ## connect via rdp using:
# # $ xfreerdp /d:domain /u:appveyor /p:'password' /cert-ignore /v:ipaddr:port
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
############################################################################
# Install Win packages
############################################################################
- choco install dependencywalker -y --allow-empty-checksums
############################################################################
# Install Conda
############################################################################
- "git clone --depth 1 git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- CALL "%PYTHON%\\Scripts\\activate.bat"
############################################################################
# Install CMake
############################################################################
- ps: |
if (![IO.File]::Exists("C:\cmake-3.16.0-win64-x64\bin\cmake.exe")) {
Start-FileDownload 'https://github.com/Kitware/CMake/releases/download/v3.16.0/cmake-3.16.0-win64-x64.zip'
7z x -y cmake-3.16.0-win64-x64.zip -oC:\
}
$env:PATH="C:\cmake-3.16.0-win64-x64\bin;$env:PATH"
############################################################################
# Install MKL
############################################################################
- ps: |
if (![IO.File]::Exists("C:\w_mkl_2019.5.281.exe")) {
ECHO 'w_mkl_2019.5.281.exe does not exist. Preparing to download MKL ..'
Start-FileDownload 'http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15806/w_mkl_2019.5.281.exe' -FileName 'C:\w_mkl_2019.5.281.exe'
ECHO 'Done'
}
C:\w_mkl_2019.5.281.exe -s -l c:\logs\extract-mkl.log -a install --eula=accept --components=all --output='C:\logs\install-mkl-output.txt' --installdir='C:\Program Files (x86)\IntelSWTools' --log='c:\logs\install-mkl.log' | Out-Null
$env:LD_MKL_PATH='C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\mkl\lib\intel64_win\'
$env:LIB="$env:LD_MKL_PATH;$env:LIB"
############################################################################
# Install Conda
############################################################################
- conda config --add channels conda-forge
- conda install --yes -c massich matio-cmake
- set LIBRARY_LIB=C:\conda\Library\lib
- copy /y %LIBRARY_LIB%\zlibstatic.lib %LIBRARY_LIB%\z.lib
# force to pick zlibstatic in order to create proper wheels
before_build:
- call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\bin\compilervars_arch.bat" intel64 vs2017
- call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\mkl\bin\mklvars.bat" intel64
- "ECHO %MKLROOT%"
- cd %APPVEYOR_BUILD_FOLDER%
- "ECHO %BLAS_VERSION%"
- "ECHO 'cmake -DBLA_STATIC=%BUILD_STATIC% -DBLA_VENDOR=%BLAS_VERSION% -G \"Visual Studio 15 2017 Win64\" .. '"
- cmake --version
- "ECHO 'MKLROOT is %MKLROOT%'"
- ps: |
mkdir build
cd build
- ps: $env:matio_dir='C:\conda\Library\'
- ps: $env:CMAKE_PREFIX_PATH='C:\conda\Library\cmake'
- ps: $env:INSTALL_DIR='C:\fake_install_dir\'
# - ps: $env:VCOMP_PATH="C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.OpenMP/vcomp140.dll"
- cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ^
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
-DBLA_STATIC=%BUILD_STATIC% ^
-DBLA_VENDOR=%BLAS_VERSION% ^
-DVCOMP_WORKAROUND=ON ^
-G "Visual Studio 15 2017 Win64" ..
- appveyor PushArtifact C:\projects\openmeeg\build\cmake_install.cmake
build_script:
- cmake --build . --config %CONFIGURATION%
- cmake --build . --config %CONFIGURATION% --target install
- cpack -C %CONFIGURATION%
- cpack -C %CONFIGURATION% -G NSIS
test_script:
# Copy runtime libs for testing
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\%CONFIGURATION%\OpenMEEGMaths.dll %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\tests\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\%CONFIGURATION%\OpenMEEGMaths.dll %APPVEYOR_BUILD_FOLDER%\build\apps\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\%CONFIGURATION%\OpenMEEGMaths.dll %APPVEYOR_BUILD_FOLDER%\build\apps\tools\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\%CONFIGURATION%\OpenMEEGMaths.dll %APPVEYOR_BUILD_FOLDER%\build\tests\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG\%CONFIGURATION%\OpenMEEG.dll %APPVEYOR_BUILD_FOLDER%\build\apps\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG\%CONFIGURATION%\OpenMEEG.dll %APPVEYOR_BUILD_FOLDER%\build\apps\tools\%CONFIGURATION%\
- cp %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG\%CONFIGURATION%\OpenMEEG.dll %APPVEYOR_BUILD_FOLDER%\build\tests\%CONFIGURATION%\
# Check dependencies
- depends.exe /f:1 /c /oc:c:\projects\depends-testvector.txt %APPVEYOR_BUILD_FOLDER%\build\OpenMEEGMaths\tests\%CONFIGURATION%\OpenMEEGMathsTest-vector.exe
- depends.exe /f:1 /c /oc:c:\projects\depends-omassemble.txt %APPVEYOR_BUILD_FOLDER%\build\apps\%CONFIGURATION%\om_assemble.exe
- appveyor PushArtifact C:\projects\depends-testvector.txt
- appveyor PushArtifact C:\projects\depends-omassemble.txt
# Test
- call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\mkl\bin\mklvars.bat" intel64
- cmd: ctest --build-config %CONFIGURATION% -v .
on_success:
- appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG-2.4.9999-Win64.tar.gz
- conda create -n packageenv --yes pip python=2.7
- activate packageenv
- conda install -y --quiet paramiko
- conda install -y --quiet pyopenssl
- set src_dir=%APPVEYOR_BUILD_FOLDER%
- cd %src_dir%
- if NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER (if %APPVEYOR_REPO_BRANCH% == master ( if %pack%==ON ( python %APPVEYOR_BUILD_FOLDER%\build_tools\upload_package_gforge.py %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG-*.exe %APPVEYOR_BUILD_FOLDER%\build\OpenMEEG-*.gz) ))
deploy: off
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))