Skip to content

Commit

Permalink
appveyor: support opencl only binary
Browse files Browse the repository at this point in the history
  • Loading branch information
hackmod committed Feb 2, 2019
1 parent dd27bf1 commit 8081808
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ os: "Visual Studio 2017"
environment:
matrix:
- CUDA_VER: "8.0"
CUDA_ON: "ON"
CUDA: 8
- CUDA_VER: "9.1"
CUDA_ON: "ON"
CUDA: 9
- CUDA_VER: "10.0"
CUDA_ON: "ON"
CUDA: 10
- CUDA_VER: "none"
CUDA_ON: "OFF"
CUDA: 0
HUNTER_CACHE_TOKEN:
secure: VnpF1MH5MEFvUI5MiMMMFlmbDdst+bfom5ZFVgalYPp/SYDhbejjXJm9Dla/IgpC

Expand All @@ -27,12 +36,12 @@ install: |
if "%CUDA_VER%" == "8.0" set CUDA_ARCHIVE=cuda_8.0.61_windows-exe
if "%CUDA_VER%" == "9.1" set CUDA_ARCHIVE=cuda_9.1.85_windows
if "%CUDA_VER%" == "10.0" set CUDA_ARCHIVE=cuda_10.0.130_411.31_windows
if NOT EXIST C:\CUDA\v%CUDA_VER% (if "%CUDA_VER%" NEQ "8.0" curl -L https://developer.nvidia.com/compute/cuda/%CUDA_VER%/Prod/local_installers/%CUDA_ARCHIVE% -o %CUDA_ARCHIVE%.exe)
if NOT EXIST C:\CUDA\v%CUDA_VER% (if %CUDA% GTR 8 curl -L https://developer.nvidia.com/compute/cuda/%CUDA_VER%/Prod/local_installers/%CUDA_ARCHIVE% -o %CUDA_ARCHIVE%.exe)
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 EXIST C:\CUDA mkdir C:\CUDA
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 EXIST C:\CUDA\v%CUDA_VER% (if %CUDA% GTR 8 7z x %CUDA_ARCHIVE%.exe -oC:\CUDA nvcc/* nvrtc*/*)
if NOT EXIST C:\CUDA\v%CUDA_VER% (if "%CUDA_VER%" == "8.0" 7z x %CUDA_ARCHIVE%.exe -oC:\CUDA compiler/* nvrtc*/*)
if NOT EXIST C:\CUDA\v%CUDA_VER% (if "%CUDA_VER%" NEQ "8.0" rename C:\CUDA\nvcc v%CUDA_VER%)
if NOT EXIST C:\CUDA\v%CUDA_VER% (if %CUDA% GTR 8 rename C:\CUDA\nvcc v%CUDA_VER%)
if NOT EXIST C:\CUDA\v%CUDA_VER% (if "%CUDA_VER%" == "8.0" rename C:\CUDA\compiler v%CUDA_VER%)
if EXIST C:\CUDA\nvrtc\bin move C:\CUDA\nvrtc\bin\*.* C:\CUDA\v%CUDA_VER%\bin\
Expand All @@ -41,20 +50,26 @@ install: |
set PATH=C:\Python36-x64;C:\Python36-x64\Scripts;%PATH%;C:\CUDA\v%CUDA_VER%\bin
pip install requests gitpython
nvcc -V
if "%CUDA_ON%" == "ON" nvcc -V
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=ON -DAPICORE=ON -DHUNTER_JOBS_NUMBER=%NUMBER_OF_PROCESSORS%
- 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/ethminer/buildinfo.ps1
mkdir bin
cp C:\CUDA\v$env:CUDA_VER\bin\nvrtc*.dll bin\
7z a build/ethminer.zip bin\nvrtc*.dll
mv build/ethminer.zip build/$env:project_name-$env:project_version-cuda$env:CUDA_VER-$env:system_name-$env:system_processor.zip
if ($env:CUDA -ne 0) {
cp C:\CUDA\v$env:CUDA_VER\bin\nvrtc*.dll bin\
7z a build/ethminer.zip bin\nvrtc*.dll
$env:tag="cuda$env:CUDA_VER"
} else {
$env:tag="opencl"
}
mv build/ethminer.zip build/$env:project_name-$env:project_version-$env:tag-$env:system_name-$env:system_processor.zip
artifacts:
- path: build/ethminer-*.zip
Expand Down

0 comments on commit 8081808

Please sign in to comment.