forked from cadet/CADET-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
123 lines (111 loc) · 7.02 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
# Exclude GitHub pages and Travis branches
branches:
except:
- gh-pages
- /feature\/.*travis.*/
# Exclude commits that only change *.md files or doc/ files
skip_commits:
files:
- doc/*
- '**/*.md'
# Use MSVC 2017 on Windows Server 2016 and MSVC 2019 on Windows Server 2019
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
NTHREADS: 2
matrix:
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# VS: vc15
# GENERATOR: Visual Studio 15 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS: vc16
GENERATOR: Visual Studio 16 2019
# Only checkout last commit
clone_depth: 1
# Code is cloned here
clone_folder: C:\cadet\code
platform:
- x64
configuration:
# - Debug
- Release
# Called before cloning the repo
init:
- cmd: date /T & time /T
- ps: "Get-ChildItem Env:"
- cmd: cmake --version
# Set version to "short-commit-hash" or when tagged to "tag name" (Travis style)
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v"))"
}
else
{
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0, 7))"
}
- cmd:
IF NOT EXIST C:\deps\packages\intelmkl.devel.win-x64.2020.1.216 (nuget install intelmkl.devel.win-x64 -Version 2020.1.216 -OutputDirectory C:\deps\packages)
install:
# Prepare environment
- cmd: IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%PLATFORM%) ELSE (CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=%PLATFORM%)
- cmd: set MKLROOT=C:/deps/packages/intelmkl.devel.win-x64.2020.1.216/lib/native/win-x64
- cmd: IF NOT EXIST C:\dl (mkdir C:\dl)
# Install SuiteSparse from source
- cmd: IF NOT EXIST C:\deps\suitesparse (
appveyor-retry curl -SsfLk -o C:\dl\suitesparse.zip https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v5.7.2.zip &&
7z x C:\dl\suitesparse.zip -oC:\deps\suitesparse\code -y > nul &&
appveyor-retry curl -SsfLk -o C:\dl\ssb.zip https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/e8d953dffb8a99aa8b65ff3ff03e12a3ed72f90c.zip &&
7z x C:\dl\ssb.zip -oC:\deps\suitesparse\code -y > nul &&
cd C:\deps\suitesparse\code &&
xcopy .\SuiteSparse-5.7.2 .\suitesparse-metis-for-windows-e8d953dffb8a99aa8b65ff3ff03e12a3ed72f90c\SuiteSparse /s /e /y /q &&
rmdir /s/q C:\deps\suitesparse\code\suitesparse-metis-for-windows-e8d953dffb8a99aa8b65ff3ff03e12a3ed72f90c\lapack_windows &&
cd C:\deps\suitesparse\code &&
mkdir build && cd build &&
cmake -DCMAKE_INSTALL_PREFIX="C:\deps\suitesparse\install\%VS%" -DBLA_VENDOR=Intel10_64lp_seq -DBLA_STATIC=OFF -G "%GENERATOR%" -A x64 -DCMAKE_C_FLAGS="/GL" -DCMAKE_STATIC_LINKER_FLAGS="/LTCG" -DCMAKE_BUILD_TYPE=Release -DBUILD_METIS=OFF ..\suitesparse-metis-for-windows-e8d953dffb8a99aa8b65ff3ff03e12a3ed72f90c\ &&
cd C:\deps\suitesparse\code\build && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /maxcpucount:%NTHREADS%)
# Binary TBB
- cmd: IF NOT EXIST C:\deps\tbb (
appveyor-retry curl -LfsS -o C:\dl\tbb.zip https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip &&
7z x C:\dl\tbb.zip -oC:\deps\tbb\ -y > nul &&
cd C:\deps\tbb\ && rename tbb install &&
cd C:\deps\tbb\install &&
cd C:\deps\tbb\install\lib)
# Install HDF5 from source
- cmd: IF NOT EXIST C:\deps\hdf5 (
appveyor-retry curl -SsfLk -o C:\dl\hdf5.zip https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/CMake-hdf5-1.12.0.zip &&
7z x C:\dl\hdf5.zip -oC:\deps\hdf5\code -y > nul &&
cd C:\deps\hdf5\code\CMake-hdf5-1.12.0 && cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_ENABLE_F2003:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=C:\deps\hdf5\install\%VS% -DCTEST_CONFIGURATION_TYPE:STRING=Release -DBUILD_TESTING=OFF -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_HL_LIB=OFF -DHDF5_BUILD_CPP_LIB=OFF -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=C:\deps\hdf5\code\CMake-hdf5-1.12.0 -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=WIN7VS201764.XXXX -DBUILDNAME:STRING=Windows-WIN10-vs2019-STATIC -G "%GENERATOR%" -A x64 hdf5-1.12.0\ &&
cd C:\deps\hdf5\code\CMake-hdf5-1.12.0 && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /maxcpucount:%NTHREADS% &&
cd C:\deps\hdf5\install\%VS% &&
cd C:\deps\hdf5\install\%VS%\lib)
build_script:
- cmd: |-
set HDF5_ROOT=C:\deps\hdf5\install\%VS%
set HDF5_ROOT=C:\deps\hdf5\install\%VS%
set UMFPACK_ROOT=C:\deps\suitesparse\install\%VS%
set TBB_ROOT=C:\deps\tbb\install
cd C:\cadet && mkdir build && mkdir build\%VS% && cd build\%VS% && cmake ..\..\code -DTBB_LIB_PATH_SUFFIX="lib/intel64/vc14" -DBLA_VENDOR=Intel10_64lp_seq -G "%GENERATOR%" -A x64 -DCMAKE_INSTALL_PREFIX="C:\cadet\%VS%\cadet" -DCMAKE_BUILD_TYPE=%configuration% -DENABLE_CADET_MEX=OFF -DENABLE_STATIC_LINK_DEPS=ON
cd C:\cadet\build\%VS% && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /maxcpucount:%NTHREADS%
# Copy runtime (TBB, MKL) to testRunner folder
- cmd: |-
copy C:\deps\tbb\install\bin\intel64\vc14\tbb.dll C:\cadet\build\%VS%\test\Release\
copy C:\deps\tbb\install\bin\intel64\vc14\tbb_preview.dll C:\cadet\build\%VS%\test\Release\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_sequential.dll C:\cadet\build\%VS%\test\Release\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_core.dll C:\cadet\build\%VS%\test\Release\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_avx2.dll C:\cadet\build\%VS%\test\Release\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_def.dll C:\cadet\build\%VS%\test\Release\
# Copy runtime (TBB, MKL) to release folder
- cmd: |-
copy C:\deps\tbb\install\bin\intel64\vc14\tbb.dll C:\cadet\%VS%\cadet\bin\
copy C:\deps\tbb\install\bin\intel64\vc14\tbb_preview.dll C:\cadet\%VS%\cadet\bin\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_sequential.dll C:\cadet\%VS%\cadet\bin\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_core.dll C:\cadet\%VS%\cadet\bin\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_avx2.dll C:\cadet\%VS%\cadet\bin\
copy C:\deps\packages\intelmkl.redist.win-x64.2020.1.216\runtimes\win-x64\native\mkl_def.dll C:\cadet\%VS%\cadet\bin\
test_script:
- cmd: cd C:\cadet\build\%VS%\test\Release && testRunner.exe -d yes --tbbthreads %NTHREADS% --use-colour no [ci]
cache:
- C:\deps\hdf5\install
- C:\deps\tbb\install
- C:\deps\suitesparse\install
- C:\deps\packages