Skip to content

Commit b0c0417

Browse files
authored
[MRG] add Windows build (#6)
* add windows build test * fix windows build using Ninja as a generator Add MKLROOT * Use Visual studio as generator remove Ninja install * Add static/dynamic building in appveyor's matrix
1 parent e9e486e commit b0c0417

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

.appveyor.yml

+41-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ image:
1212
- Visual Studio 2015
1313
# - Visual Studio 2017
1414

15-
cache:
15+
# cache:
1616
# - C:\cmake-3.10.1-win32-x86
1717
# - C:\Program Files (x86)\IntelSWTools
1818
# - C:\w_mkl_2018.0.124.exe
@@ -21,21 +21,31 @@ environment:
2121
matrix:
2222
# - BLAS_VERSION: Intel10_32
2323
# - BLAS_VERSION: Intel10_64lp
24-
- BLAS_VERSION: Intel10_64lp_seq
2524
# - BLAS_VERSION: Intel
25+
- BLAS_VERSION: Intel10_64lp_seq
26+
BUILD_STATIC : ON
27+
28+
- BLAS_VERSION: Intel10_64lp_seq
29+
BUILD_STATIC : OFF
2630

2731

2832
# init:
2933
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
3034

3135
install:
32-
- ps: MD c:\logs\
36+
############################################################################
37+
# Install CMake
38+
############################################################################
3339
- ps: |
3440
if (![IO.File]::Exists("C:\cmake-3.10.1-win64-x64\bin\cmake.exe")) {
3541
Start-FileDownload 'https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip'
3642
7z x -y cmake-3.10.1-win64-x64.zip -oC:\
3743
}
3844
$env:PATH="C:\cmake-3.10.1-win64-x64\bin;$env:PATH"
45+
46+
############################################################################
47+
# Install MKL
48+
############################################################################
3949
- ps: |
4050
if (![IO.File]::Exists("C:\w_mkl_2018.0.124.exe")) {
4151
ECHO 'w_mkl_2018.0.124.exe does not exist. Preparing to install MKL ..'
@@ -45,21 +55,45 @@ install:
4555
}
4656
$env:LD_MKL_PATH='C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\mkl\lib\intel64_win\'
4757
$env:LIB="$env:LD_MKL_PATH;$env:LIB"
48-
- nuget install openblas -o C:\
58+
$env:MKLROOT='C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\mkl'
4959
60+
############################################################################
61+
# Install OpenBlAS
62+
############################################################################
63+
- nuget install openblas -o C:\
5064

5165
before_build:
66+
- call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\bin\compilervars_arch.bat" intel64 vs2015
67+
- cd C:\projects\cpp-mkl-test
5268
- "ECHO %BLAS_VERSION%"
53-
- "ECHO 'cmake -DBLA_VENDOR=%BLAS_VERSION% -G \"Visual Studio 14 2015 Win64\" .. '"
69+
- "ECHO 'cmake -DBLA_STATIC=%BUILD_STATIC% -DBLA_VENDOR=%BLAS_VERSION% -G \"Visual Studio 14 2015 Win64\" .. '"
70+
- cmake --version
71+
- "ECHO 'MKLROOT is %MKLROOT%'"
5472
- ps: |
5573
mkdir build
5674
cd build
57-
- cmake -DBLA_VENDOR=%BLAS_VERSION% -G "Visual Studio 14 2015 Win64" ..
75+
- cmake -DBLA_STATIC=%BUILD_STATIC% -DBLA_VENDOR=%BLAS_VERSION% -G "Visual Studio 14 2015 Win64" ..
5876

5977
build_script:
60-
- echo DONE
78+
- cmake --build .
79+
80+
after_build:
81+
- appveyor PushArtifact CMakeCache.txt
82+
- appveyor PushArtifact CMakeFiles/CMakeOutput.log
83+
- appveyor PushArtifact CMakeFiles/CMakeError.log
84+
6185

6286
test_script:
87+
- ps: |
88+
if ($env:BUILD_STATIC -eq 'OFF') {
89+
ECHO 'BUILD_STATIC is OFF. Compying shipping libraries'
90+
cd 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.124\windows\redist\intel64_win\mkl\'
91+
cp *.dll C:\projects\cpp-mkl-test\build\
92+
}else{
93+
ECHO 'BUILD_STATIC is ON. No need to copy runtime dll'
94+
}
95+
- cd C:\projects\cpp-mkl-test\build\
96+
- .\Debug\CMakeHelloWorld.exe
6397

6498
deploy: off
6599

0 commit comments

Comments
 (0)