-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
118 lines (105 loc) · 5.54 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
version: '{build}'
build:
verbosity: detailed
configuration:
- Release
environment:
matrix:
###########################################################################
# Build x86 version using MSVC 2019
###########################################################################
#- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
# MSVC_SETUP_ARG: x86
# TAG: win32
# CUDA_VER: 10.1
# CUDA_ARCHIVE: cuda_10.1.168_425.25_win10.exe
###########################################################################
# Build 64 bit version using clang
###########################################################################
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
MSVC_SETUP_ARG: x64
USE_CLANG: ON
INSTALL_NEW_CLANG: ON
CLANG_URL: https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/LLVM-8.0.1-win64.exe
TAG: win64
CUDA_VER: 10.1
CUDA_ARCHIVE: cuda_10.1.243_426.00_win10.exe
###########################################################################
# Build x64 version using MSVC 2019
###########################################################################
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
MSVC_SETUP_ARG: x64
TAG: win64
CUDA_VER: 10.1
CUDA_ARCHIVE: cuda_10.1.243_426.00_win10.exe
install:
- mkdir C:\projects\deps
- cd C:\projects\deps
# Upgrade clang if necessary
- IF DEFINED INSTALL_NEW_CLANG appveyor DownloadFile %CLANG_URL% -FileName llvm-installer.exe
- IF DEFINED INSTALL_NEW_CLANG START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM"
- IF DEFINED USE_CLANG clang --version
# - IF DEFINED USE_CLANG git clone https://github.com/zpalmtree/llvm-vs2017-integration.git
# - IF DEFINED USE_CLANG cd llvm-vs2017-integration
# - IF DEFINED USE_CLANG
# - IF DEFINED USE_CLANG if not exist "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017" (mkdir "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017")
# - IF DEFINED USE_CLANG if not exist "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp" (mkdir "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp")
# - IF DEFINED USE_CLANG copy Toolset-llvm-vs2017-x64.props "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017\Toolset.props"
# - IF DEFINED USE_CLANG copy Toolset-llvm-vs2017-x64.targets "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017\Toolset.targets"
# - IF DEFINED USE_CLANG copy Toolset-llvm-vs2017-xp-x64.props "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp\Toolset.props"
# - IF DEFINED USE_CLANG copy Toolset-llvm-vs2017-xp-x64.targets "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp\Toolset.targets"
# - IF DEFINED USE_CLANG cd ..
# Install CUDA
- appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/%CUDA_VER%/Prod/local_installers/%CUDA_ARCHIVE% -FileName %CUDA_ARCHIVE%
- ps: Start-Process -FilePath "C:\projects\deps\$env:CUDA_ARCHIVE" -ArgumentList "-s nvcc_%CUDA_VER%" -Wait -NoNewWindow
- 7z x %CUDA_ARCHIVE%
- copy CUDAVisualStudioIntegration\\extras\\visual_studio_integration\\MSBuildExtensions\\* "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations"
- set PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VER%\bin\";%PATH%
- set CUDACXX="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VER%\bin\nvcc"
before_build:
#############################################################################
# Setup MSVC Environment
#############################################################################
- call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
build_script:
# Weird cuda errors without this - https://help.appveyor.com/discussions/problems/5814-issue-with-msbuild-custom-build-rule
- ps: sleep 5
- ps: restart-computer -f
- ps: sleep 5
- IF DEFINED USE_CLANG set PATH="C:\Program Files\LLVM\bin";%PATH%
- IF DEFINED USE_CLANG set CMAKE_EXTRA_OPTIONS=-DCMAKE_C_COMPILER=clang.exe -DCMAKE_CXX_COMPILER=clang.exe -T "LLVM-vs2017"
- cd C:\projects\violetminer
- git submodule update --init --recursive
- md build
- cd build
- IF DEFINED USE_CLANG cmake -DCMAKE_BUILD_TYPE=Release %CMAKE_EXTRA_OPTIONS% ..
- IF NOT DEFINED USE_CLANG cmake -G "Visual Studio 16 2019"
-A x64
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VS_PLATFORM_TOOLSET_CUDA=10.1
%CMAKE_EXTRA_OPTIONS% ..
|| cat CMakeFiles/CMakeError.log || cat CMakeFiles/CMakeOutput.log
- MSBuild violetminer.sln /p:Configuration=Release /m
- cd Release
- mkdir violetminer-%TAG%
- copy violetminer.exe violetminer-%TAG%
- copy C:\projects\violetminer\README.md violetminer-%TAG%
- 7z a violetminer-%TAG%.zip violetminer-%TAG%
- copy violetminer-%TAG%.zip C:\projects\violetminer
artifacts:
- path: violetminer-%TAG%.zip
name: violetminer-artifact
deploy:
- provider: GitHub
description: ''
auth_token:
secure: Ho2ZwjJ/dgK4U/dSfkDvhvNhmCZnrAbP/5ZpHfIzCNqpXL9ieY8z1xZtxv37SsfM
artifact: violetminer-artifact
draft: false
prerelease: false
on:
branch: master
APPVEYOR_REPO_TAG: true