forked from Djadih/quai-gpu-miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
91 lines (82 loc) · 4.14 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
version: "{build}"
branches:
only:
- master
- /v\d+\..+/
- /release.*/
- /travis-.*/
- appveyor
- hunter
clone_depth: 100
os: "Visual Studio 2017"
environment:
matrix:
- CUDA_VER: "NONE"
- CUDA_VER: "8.0"
- CUDA_VER: "9.2"
- CUDA_VER: "10.0"
HUNTER_CACHE_TOKEN:
secure: VnpF1MH5MEFvUI5MiMMMFlmbDdst+bfom5ZFVgalYPp/SYDhbejjXJm9Dla/IgpC
cache:
- C:\CUDA\v8.0 -> appveyor.yml
- C:\CUDA\v9.2 -> appveyor.yml
- C:\CUDA\v10.0 -> appveyor.yml
# Download CUDA Windows installer (local) and extract /compiler/* to /CUDA/vX.0/ zip archive.
install: |
git submodule update --init --recursive
set CUDA_ON=OFF
if "%CUDA_VER%" == "8.0" set CUDA_ARCHIVE=cuda_8.0.61_windows-exe
if "%CUDA_VER%" == "8.0" set CUDA_ON=ON
if "%CUDA_VER%" == "9.2" set CUDA_ARCHIVE=cuda_9.2.148_win10
if "%CUDA_VER%" == "9.2" set CUDA_ON=ON
if "%CUDA_VER%" == "10.0" set CUDA_ARCHIVE=cuda_10.0.130_411.31_windows
if "%CUDA_VER%" == "10.0" set CUDA_ON=ON
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" == "8.0" curl -L https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_windows-exe -o %CUDA_ARCHIVE%.exe
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" == "9.2" curl -L https://developer.nvidia.com/compute/cuda/%CUDA_VER%/Prod2/local_installers2/%CUDA_ARCHIVE% -o %CUDA_ARCHIVE%.exe
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" == "10.0" curl -L https://developer.nvidia.com/compute/cuda/%CUDA_VER%/Prod/local_installers/%CUDA_ARCHIVE% -o %CUDA_ARCHIVE%.exe
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA mkdir C:\CUDA
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" NEQ "8.0" 7z x %CUDA_ARCHIVE%.exe -oC:\CUDA nvcc/* nvrtc*/*
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" == "8.0" 7z x %CUDA_ARCHIVE%.exe -oC:\CUDA compiler/* nvrtc*/*
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" NEQ "8.0" rename C:\CUDA\nvcc v%CUDA_VER%
if NOT "%CUDA_ON%" == "OFF" if NOT EXIST C:\CUDA\v%CUDA_VER% if "%CUDA_VER%" == "8.0" rename C:\CUDA\compiler v%CUDA_VER%
if NOT "%CUDA_ON%" == "OFF" if EXIST C:\CUDA\nvrtc\bin move C:\CUDA\nvrtc\bin\*.* C:\CUDA\v%CUDA_VER%\bin\
if NOT "%CUDA_ON%" == "OFF" if EXIST C:\CUDA\nvrtc_dev\include move C:\CUDA\nvrtc_dev\include\*.* C:\CUDA\v%CUDA_VER%\include\
if NOT "%CUDA_ON%" == "OFF" if EXIST C:\CUDA\nvrtc_dev\lib\x64 move C:\CUDA\nvrtc_dev\lib\x64\*.* C:\CUDA\v%CUDA_VER%\lib\x64\
set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%;C:\CUDA\v%CUDA_VER%\bin
pip install requests gitpython
build_script:
- call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
- set CMAKE_ARGS=-G "Visual Studio 15 2017 Win64" -H. -Bbuild -DETHASHCUDA=%CUDA_ON% -DAPICORE=ON -DHUNTER_JOBS_NUMBER=%NUMBER_OF_PROCESSORS%
- if "%CUDA_VER%" NEQ "10.0" set CMAKE_ARGS=%CMAKE_ARGS% -T v140
- cmake %CMAKE_ARGS%
- cmake --build build --config Release --target package
- ps: |
. build/ethcoreminer/buildinfo.ps1
if ("$env:CUDA_ON" -ne "OFF") {
mkdir bin
cp C:\CUDA\v$env:CUDA_VER\bin\nvrtc*.dll bin\
7z a build/ethcoreminer.zip bin\nvrtc*.dll
}
if ("$env:CUDA_ON" -ne "OFF") {
mv build/ethcoreminer.zip build/$env:project_name-$env:project_version-nvidia-cuda-$env:CUDA_VER-$env:system_name-$env:system_processor.zip
}
else {
mv build/ethcoreminer.zip build/$env:project_name-$env:project_version-amd-opencl-$env:system_name-$env:system_processor.zip
}
artifacts:
- path: build/ethcoreminer-*.zip
name: ethcoreminer
deploy:
# Create GitHub release, also set the release name and description.
provider: GitHub
tag: $(appveyor_repo_tag_name)
release: "$(project_name) $(project_version)"
description: ""
force_update: true # Force update in case Travis CI created the release before.
prerelease: $(project_version_is_prerelease)
draft: false
artifact: ethcoreminer
auth_token:
secure: cgLsXX54ggfTJgj4Tl2/b/VLm66XQSW5x5TxfNe7h8fPHd9bOnGI4Fyil6fl1IGw
on:
appveyor_repo_tag: true