From 808180812e1a3d1f8ee4a3838aea22a0034b744b Mon Sep 17 00:00:00 2001 From: hackyminer Date: Sat, 2 Feb 2019 17:28:33 +0900 Subject: [PATCH] appveyor: support opencl only binary --- appveyor.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index cf2f768c0e..782e2f8330 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 @@ -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\ @@ -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