Skip to content

Commit

Permalink
Fix AppVeyor CI
Browse files Browse the repository at this point in the history
Update and fix the AppVeyor CI for Windows builds. The AppVeyor builds
now use Intel MKL from NuGet.
  • Loading branch information
sleweke committed May 16, 2020
1 parent 67038f1 commit 28d89a6
Showing 1 changed file with 63 additions and 48 deletions.
111 changes: 63 additions & 48 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ skip_commits:
- doc/*
- '**/*.md'

# Use MSVC 2017 on Windows Server 2016 and MSVC 2015 on Windows Server 2012
# 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 2015
VS: vc14
GENERATOR: Visual Studio 14 2015
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS: vc15
GENERATOR: Visual Studio 15 2017
# - 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
Expand Down Expand Up @@ -49,68 +51,81 @@ init:
{
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 14.0\VC\vcvarsall.bat" %PLATFORM%)
- 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)
# CLAPACK
- cmd: IF NOT EXIST C:\deps\clapack (
appveyor-retry curl -SsfL -o "C:\dl\clapack.tar.gz" "http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz" &&
7z x "C:\dl\clapack.tar.gz" -so -y | 7z x -aoa -si -ttar -o"C:\deps\clapack\code" -y &&
del C:\deps\clapack\code\clapack-3.2.1-CMAKE\TESTING\CMakeLists.txt &&
del C:\deps\clapack\code\clapack-3.2.1-CMAKE\BLAS\TESTING\CMakeLists.txt &&
cd C:\deps\clapack && mkdir build && mkdir build\%VS% && cd build\%VS% && cmake -DCMAKE_INSTALL_PREFIX="C:\deps\clapack\install\%VS%" -DCMAKE_BUILD_TYPE=Release -G "%GENERATOR% Win64" -DCMAKE_C_FLAGS="/GL" -DCMAKE_STATIC_LINKER_FLAGS="/LTCG" ..\..\code\clapack-3.2.1-CMAKE\ &&
cd C:\deps\clapack\build\%VS% && msbuild.exe CLAPACK.sln /p:Configuration=Release;Platform=x64 /maxcpucount:2 &&
cd C:\deps\clapack\ && mkdir install && mkdir install\%VS% && mkdir install\%VS%\lib &&
cp C:\deps\clapack\build\%VS%\SRC\Release\lapack.lib C:\deps\clapack\install\%VS%\ &&
cp C:\deps\clapack\build\%VS%\SRC\Release\lapack.lib C:\deps\clapack\install\%VS%\lib\ &&
cp C:\deps\clapack\build\%VS%\BLAS\SRC\Release\blas.lib C:\deps\clapack\install\%VS%\ &&
cp C:\deps\clapack\build\%VS%\BLAS\SRC\Release\blas.lib C:\deps\clapack\install\%VS%\lib\ &&
cp C:\deps\clapack\build\%VS%\F2CLIBS\libf2c\Release\libf2c.lib C:\deps\clapack\install\%VS%\f2c.lib &&
cp C:\deps\clapack\build\%VS%\F2CLIBS\libf2c\Release\libf2c.lib C:\deps\clapack\install\%VS%\lib\f2c.lib)
# OpenBLAS
- cmd: IF NOT EXIST C:\deps\lapack (
appveyor-retry curl -SsfLk -o C:\dl\openblas.zip https://downloads.sourceforge.net/project/openblas/v0.2.19/OpenBLAS-v0.2.19-Win64-int32.zip &&
7z x C:\dl\openblas.zip -oC:\deps\lapack\ -y > nul &&
cd C:\deps\lapack\ && dir &&
cd C:\deps\lapack\ && rename OpenBLAS-v0.2.19-Win64-int32 install)
# 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/01org/tbb/releases/download/2018_U2/tbb2018_20171205oss_win.zip &&
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 tbb2018_20171205oss install &&
cd C:\deps\tbb\install && dir &&
cd C:\deps\tbb\install\lib && dir)
cd C:\deps\tbb\ && rename tbb install &&
cd C:\deps\tbb\install &&
cd C:\deps\tbb\install\lib)
# Install SUNDIALS from source
- cmd: IF NOT EXIST C:\deps\sundials (
appveyor-retry curl -SsfLk -o C:\dl\sundials.tar.gz https://computation.llnl.gov/projects/sundials/download/sundials-2.7.0.tar.gz &&
appveyor-retry curl -SsfLk -o C:\dl\sundials.tar.gz https://computation.llnl.gov/projects/sundials/download/sundials-3.2.1.tar.gz &&
7z x "C:\dl\sundials.tar.gz" -so -y | 7z x -aoa -si -ttar -o"C:\deps\sundials\code" -y &&
cd C:\deps\sundials\ && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX="C:\deps\sundials\install\%VS%" -DCMAKE_BUILD_TYPE=Release -DEXAMPLES_ENABLE=OFF -DOPENMP_ENABLE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_KINSOL=OFF -DBUILD_ARKODE=OFF -DBUILD_CVODE=OFF -DBUILD_CVODES=OFF -DEXAMPLES_ENABLE=OFF -G "%GENERATOR% Win64" -DCMAKE_C_FLAGS="/GL" -DCMAKE_STATIC_LINKER_FLAGS="/LTCG" ..\code\sundials-2.7.0\ &&
cd C:\deps\sundials\build && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /maxcpucount:2)
cd C:\deps\sundials\ && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX="C:\deps\sundials\install\%VS%" -DCMAKE_BUILD_TYPE=Release -DEXAMPLES_ENABLE=OFF -DOPENMP_ENABLE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_KINSOL=OFF -DBUILD_ARKODE=OFF -DBUILD_CVODE=OFF -DBUILD_CVODES=OFF -DEXAMPLES_ENABLE=OFF -G "%GENERATOR%" -A x64 -DCMAKE_C_FLAGS="/GL" -DCMAKE_STATIC_LINKER_FLAGS="/LTCG" ..\code\sundials-3.2.1\ &&
cd C:\deps\sundials\build && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /maxcpucount:%NTHREADS%)
# 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.10/hdf5-1.10.1/src/CMake-hdf5-1.10.1.zip &&
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.10.1 && 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=ON -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_CPP_LIB=OFF -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=C:\deps\hdf5\code\CMake-hdf5-1.10.1 -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=WIN7VS201764.XXXX -DBUILDNAME:STRING=Windows-WIN7-vs2017-STATIC -G "%GENERATOR% Win64" hdf5-1.10.1\ &&
cd C:\deps\hdf5\code\CMake-hdf5-1.10.1 && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /maxcpucount:2 &&
cd C:\deps\hdf5\install\%VS% && dir &&
cd C:\deps\hdf5\install\%VS%\lib && dir)
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%
cd C:\cadet && mkdir build && mkdir build\%VS% && cd build\%VS% && cmake ..\..\code -DSUNDIALS_ROOT=C:\deps\sundials\install\%VS% -DHDF5_ROOT=C:\deps\hdf5\install\%VS% -DTBB_ROOT=C:\deps\tbb\install\cmake -DCMAKE_PREFIX_PATH=C:\deps\tbb\install\cmake -DTBB_LIB_PATH_SUFFIX="lib/intel64/vc14" -DBLA_VENDOR=CLAPACK -DCMAKE_LIBRARY_PATH="C:\deps\clapack\install\%VS%\lib" -G "%GENERATOR% Win64" -DCMAKE_INSTALL_PREFIX="C:\cadet\%VS%\cadet" -DCMAKE_BUILD_TYPE=%configuration%
type C:\cadet\build\%VS%\CMakeFiles\CMakeError.log
type C:\cadet\build\%VS%\CMakeFiles\CMakeOutput.log
cd C:\cadet\build\%VS% && msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /maxcpucount:2
set SUNDIALS_ROOT=C:\deps\sundials\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 --use-colour no
- 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\sundials\install
- C:\deps\tbb\install
- C:\deps\lapack\install
- C:\deps\clapack\install
- C:\deps\suitesparse\install
- C:\deps\packages

0 comments on commit 28d89a6

Please sign in to comment.