Skip to content

Commit 4159ed3

Browse files
committed
Retooled entire CMakeLists (still works!)
1 parent 2370aee commit 4159ed3

File tree

13 files changed

+1242
-485
lines changed

13 files changed

+1242
-485
lines changed

.appveyor.yml

Lines changed: 203 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,211 @@
1-
# image
2-
image: Visual Studio 2015
1+
# image, platform, configuration
2+
image:
3+
- Visual Studio 2017
4+
platform:
5+
- x64
6+
configuration:
7+
- Release
38

4-
# build platform
5-
platform: x64
9+
environment:
10+
global:
11+
#setup global source, build, deps, bin paths
12+
XMR_SRC: c:\xmr-stak
13+
XMR_BLD: $(XMR_SRC)\build
14+
XMR_DEP: $(XMR_BLD)\dep
15+
XMR_BIN: $(XMR_BLD)\bin
16+
# preload various CUDA toolkit paths
17+
NVKIT: $(ProgramFiles)\NVIDIA GPU Computing Toolkit
18+
CUDA_PATH_V8_0: $(NVKIT)\CUDA\v8.0
19+
CUDA_PATH_V9_0: $(NVKIT)\CUDA\v9.0
20+
CUDA_PATH_V9_1: $(NVKIT)\CUDA\v9.1
21+
CUDA_PATH_V9_2: $(NVKIT)\CUDA\v9.2
22+
CUDA_PATH_V10_0: $(NVKIT)\CUDA\v10.0
23+
# for test phase
24+
XMRSTAK_NOWAIT: 1
25+
ARCHLIST: 30;999;21;75;1.5;69
26+
# for build phase / default to latest VS2017 with tools 14.11 (compatible with the most CUDA versions)
27+
VS15DIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
28+
VS14DIR: C:\Program Files (x86)\Microsoft Visual Studio 14.0
29+
V140MSB: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
30+
V141MSB: $(VS15DIR)\Common7\IDE\VC\VCTargets
31+
G_ARG: Visual Studio 14 2015 Win64
32+
TOOLSET: v140
33+
VCVARSV: 14.0
34+
XMR_DEP_VER: $(XMR_DEP)\$(TOOLSET)
35+
CMAKE_PREFIX_PATH: $(XMR_DEP_VER)\hwloc;$(XMR_DEP_VER)\libmicrohttpd;$(XMR_DEP_VER)\openssl
36+
matrix:
37+
- cuda: 10.0
38+
- cuda: 9.2
39+
#- cuda: 9.1
40+
#- cuda: 9.0
41+
- cuda: 8.0
42+
matrix:
43+
fast_finish: true
644

7-
# clone directory
8-
clone_folder: c:\xmr-stak
45+
clone_folder: $(XMR_SRC)
946

1047
install:
11-
- mkdir c:\xmr-stak-dep
12-
- curl -sL https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip -o xmr-stak-dep.zip
13-
- 7z x xmr-stak-dep.zip -o"c:\xmr-stak-dep" -y > nul
14-
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_windows-exe -FileName cuda_8.0.44_windows.exe
15-
- cuda_8.0.44_windows.exe -s compiler_8.0 cudart_8.0
16-
- set PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;%PATH%
17-
- nvcc -V
48+
- mkdir "%XMR_BLD%"
49+
- mkdir "%XMR_DEP%"
50+
- set INCLUDE=
51+
- set LIBPATH=
52+
- set LIB=
1853

1954
build_script:
20-
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat"
21-
- cd c:\xmr-stak
22-
- mkdir build
23-
- cd build
24-
- set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl;
25-
- cmake -G "Visual Studio 14 2015 Win64" -T v140,host=x64 .. -DCUDA_ARCH=30
26-
- cmake --build . --config Release --target install
55+
- rem this triggers non-MSBuild mode but gets overridden by matrix below
56+
57+
for:
58+
-
59+
matrix:
60+
only:
61+
- cuda: 8.0
62+
environment:
63+
CUDA_PATH: $(CUDA_PATH_V8_0)
64+
PATH: $(CUDA_PATH)\bin;$(CUDA_PATH)\libnvvp;$(PATH)
65+
build_script:
66+
- call "%VS14DIR%\Common7\Tools\VsMSBuildCmd.bat"
67+
- call "%VS14DIR%\VC\vcvarsall.bat" x64 8.1
68+
- cd "%XMR_DEP%"
69+
# install nvcc
70+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_win10-exe -FileName cuda80.exe
71+
- cuda80.exe -s compiler_8.0
72+
- nvcc -V
73+
# install manually just the integration parts MSBuild needs
74+
# if done normally it drags in profilers and NVTX and the driver etc which fails
75+
- 7z x -y -ocudapkg cuda80.exe CUDAVisualStudioIntegration/extras/visual_studio_integration > nul
76+
- copy cudapkg\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\* "%V140MSB%\BuildCustomizations"
77+
# xmr-stak-dep for v140
78+
- appveyor DownloadFile https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip
79+
- 7z x xmr-stak-dep.zip -o"%TOOLSET%" -y > nul
80+
- cd "%XMR_BLD%"
81+
- cmake -G "%G_ARG%" -T %TOOLSET%,host=x64,cuda=%cuda% -DCUDA_ARCH=%ARCHLIST% -DCUDA_SHOW_REGISTER=ON "%XMR_SRC%"
82+
- cmake --build "%XMR_BLD%" --config %CONFIGURATION% --target install
83+
84+
-
85+
matrix:
86+
only:
87+
- cuda: 9.0
88+
environment:
89+
CUDA_PATH: $(CUDA_PATH_V9_0)
90+
PATH: $(CUDA_PATH)\bin;$(CUDA_PATH)\libnvvp;$(PATH)
91+
build_script:
92+
- call "%VS14DIR%\Common7\Tools\VsMSBuildCmd.bat"
93+
- call "%VS14DIR%\VC\vcvarsall.bat" x64 8.1
94+
- cd "%XMR_DEP%"
95+
# install nvcc
96+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_win10-exe -FileName cuda90.exe
97+
- cuda90.exe -s compiler_9.0
98+
- nvcc -V
99+
# install nvcc update from patch3
100+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/3/cuda_9.0.176.3_windows-exe -FileName cuda90p3.exe
101+
- cuda90p3.exe -s compiler_9.0
102+
- nvcc -V
103+
# install manually just the integration parts MSBuild needs
104+
# if done normally it drags in profilers and NVTX and the driver etc which fails
105+
- 7z x -y -ocudapkg cuda90.exe CUDAVisualStudioIntegration/extras/visual_studio_integration > nul
106+
- copy cudapkg\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\* "%V140MSB%\BuildCustomizations"
107+
# xmr-stak-dep for v140
108+
- appveyor DownloadFile https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip
109+
- 7z x xmr-stak-dep.zip -o"%TOOLSET%" -y > nul
110+
- cd "%XMR_BLD%"
111+
- cmake -G "%G_ARG%" -T %TOOLSET%,host=x64,cuda=%cuda% -DCUDA_ARCH=%ARCHLIST% -DCUDA_SHOW_REGISTER=ON "%XMR_SRC%"
112+
- cmake --build "%XMR_BLD%" --config %CONFIGURATION% --target install
113+
114+
-
115+
matrix:
116+
only:
117+
- cuda: 9.1
118+
environment:
119+
CUDA_PATH: $(CUDA_PATH_V9_1)
120+
PATH: $(CUDA_PATH)\bin;$(CUDA_PATH)\libnvvp;$(PATH)
121+
build_script:
122+
- call "%VS14DIR%\Common7\Tools\VsMSBuildCmd.bat"
123+
- call "%VS14DIR%\VC\vcvarsall.bat" x64 8.1
124+
- cd "%XMR_DEP%"
125+
# install nvcc
126+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_win10 -FileName cuda91.exe
127+
- cuda91 -s nvcc_9.1
128+
- nvcc -V
129+
# install nvcc update from patch2
130+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/2/cuda_9.1.85.2_windows -FileName cuda91p2.exe
131+
- cuda91p2 -s nvcc_9.1
132+
- nvcc -V
133+
# install manually just the integration parts MSBuild needs
134+
# if done normally it drags in profilers and NVTX and the driver etc which fails
135+
- 7z x -y -ocudapkg cuda91.exe CUDAVisualStudioIntegration/extras/visual_studio_integration > nul
136+
- copy cudapkg\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\* "%V140MSB%\BuildCustomizations"
137+
# xmr-stak-dep for v140
138+
- appveyor DownloadFile https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip
139+
- 7z x xmr-stak-dep.zip -o"%TOOLSET%" -y > nul
140+
- cd "%XMR_BLD%"
141+
- cmake -G "%G_ARG%" -T %TOOLSET%,host=x64,cuda=%cuda% -DCUDA_ARCH=%ARCHLIST% -DCUDA_SHOW_REGISTER=ON "%XMR_SRC%"
142+
- cmake --build "%XMR_BLD%" --config %CONFIGURATION% --target install
143+
144+
-
145+
matrix:
146+
only:
147+
- cuda: 9.2
148+
environment:
149+
CUDA_PATH: $(CUDA_PATH_V9_2)
150+
PATH: $(CUDA_PATH)\bin;$(CUDA_PATH)\libnvvp;$(PATH)
151+
build_script:
152+
- call "%VS14DIR%\Common7\Tools\VsMSBuildCmd.bat"
153+
- call "%VS14DIR%\VC\vcvarsall.bat" x64 8.1
154+
- cd "%XMR_DEP%"
155+
# install nvcc
156+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers2/cuda_9.2.148_win10 -FileName cuda92.exe
157+
- cuda92 -s nvcc_9.2
158+
- nvcc -V
159+
# install manually just the integration parts MSBuild needs
160+
# if done normally it drags in profilers and NVTX and the driver etc which fails
161+
- 7z x -y -ocudapkg cuda92.exe CUDAVisualStudioIntegration/extras/visual_studio_integration > nul
162+
- copy cudapkg\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\* "%V140MSB%\BuildCustomizations"
163+
# xmr-stak-dep for v140
164+
- appveyor DownloadFile https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip
165+
- 7z x xmr-stak-dep.zip -o"%TOOLSET%" -y > nul
166+
- cd "%XMR_BLD%"
167+
- cmake -G "%G_ARG%" -T %TOOLSET%,host=x64,cuda=%cuda% -DCUDA_ARCH=%ARCHLIST% -DCUDA_SHOW_REGISTER=ON "%XMR_SRC%"
168+
- cmake --build "%XMR_BLD%" --config %CONFIGURATION% --target install
169+
170+
-
171+
matrix:
172+
only:
173+
- cuda: 10.0
174+
environment:
175+
G_ARG: Visual Studio 15 2017 Win64
176+
TOOLSET: v141
177+
VCVARSV: 14.15
178+
XMR_DEP_VER: $(XMR_DEP)\$(TOOLSET)
179+
CMAKE_PREFIX_PATH: $(XMR_DEP_VER)\hwloc;$(XMR_DEP_VER)\libmicrohttpd;$(XMR_DEP_VER)\openssl
180+
CUDA_PATH: $(CUDA_PATH_V10_0)
181+
PATH: $(CUDA_PATH)\bin;$(CUDA_PATH)\libnvvp;$(PATH)
182+
build_script:
183+
- call "%VS15DIR%\VC\Auxiliary\Build\vcvars64.bat" x64 -vcvars_ver=%VCVARSV%
184+
- cd "%XMR_DEP%"
185+
# install nvcc
186+
- appveyor DownloadFile https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_411.31_win10 -FileName cuda100.exe
187+
- cuda100 -s nvcc_10.0
188+
- nvcc -V
189+
# install manually just the integration parts MSBuild needs
190+
# if done normally it drags in profilers and NVTX and the driver etc which fails
191+
- 7z x -y -ocudapkg cuda100.exe CUDAVisualStudioIntegration/extras/visual_studio_integration > nul
192+
- copy cudapkg\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\* "%V141MSB%\BuildCustomizations"
193+
# xmr-stak-dep for v141
194+
- appveyor DownloadFile https://github.com/fireice-uk/xmr-stak-dep/releases/download/v2/xmr-stak-dep.zip
195+
- 7z x xmr-stak-dep.zip -y > nul
196+
- move /y xmr-stak-dep %TOOLSET%
197+
- cd "%XMR_BLD%"
198+
- cmake -G "%G_ARG%" -T %TOOLSET%,host=x64,cuda=%cuda% -DCUDA_ARCH=%ARCHLIST% -DCUDA_SHOW_REGISTER=ON "%XMR_SRC%"
199+
- cmake --build "%XMR_BLD%" --config %CONFIGURATION% --target install
27200

28201
test_script:
29-
- cd c:\xmr-stak\build\bin\Release
30-
- dir
31-
- copy C:\xmr-stak-dep\openssl\bin\* .
32-
- set XMRSTAK_NOWAIT=1
33-
- xmr-stak.exe --help --noUAC
202+
- cd "%XMR_BIN%\%CONFIGURATION%"
203+
- copy "%XMR_DEP_VER%\openssl\bin\*.dll" .
204+
- del "*.lib" "*.exp"
205+
- dir
206+
- xmr-stak --noUAC --version-long
207+
- xmr-stak --noUAC --help
208+
# bench CPU v7+v8 / let other backends naturally fail the first time to make sure dll chain works
209+
- xmr-stak --noUAC --httpd 0 --url test:3333 -u test -p x -r test --currency cryptonight_v7 --benchmark 7 --benchwait 4 --benchwork 20
210+
- xmr-stak --noUAC --noAMD --noNVIDIA --currency cryptonight_v8 --benchmark 8 --benchwait 4 --benchwork 20
211+
- type "*.txt"

0 commit comments

Comments
 (0)