summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 22:19:06 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:53:08 +0200
commitb1ee3d2184fd1aaad60d22c2bad7e7e2a6f66cdb (patch)
tree5f0e804a4d96bb1b09226e50d1373fad227feca6
parent1d1eff2d8f60a9df2793d76b7307545434034c5f (diff)
downloadxmr-stak-b1ee3d2184fd1aaad60d22c2bad7e7e2a6f66cdb.zip
xmr-stak-b1ee3d2184fd1aaad60d22c2bad7e7e2a6f66cdb.tar.gz
fix CI
- fix windows CI - add CUDA to linux CI
-rw-r--r--.appveyor.yml2
-rw-r--r--.travis.yml38
-rw-r--r--CMakeLists.txt2
3 files changed, 37 insertions, 5 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 2c32279..02ce827 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -22,6 +22,6 @@ build_script:
- cmake --build . --config Release --target install
test_script:
- - cd c:\xmr-stak-cpu\build\bin\Release
+ - cd c:\xmr-stak\build\bin\Release
- dir
# - xmr-stak.exe
diff --git a/.travis.yml b/.travis.yml
index 07d64da..975afda 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,11 @@ sudo: false
language: cpp
+cache:
+ apt: true
+ directories:
+ - $HOME/.cache/cuda
+
addons:
apt:
packages: &default_packages
@@ -14,6 +19,10 @@ addons:
- libssl-dev
- libhwloc-dev
+env:
+ global:
+ - CUDA_ROOT: $HOME/.cache/cuda
+
matrix:
include:
- os: linux
@@ -29,6 +38,7 @@ matrix:
env:
- CMAKE_CXX_COMPILER=g++-5
- CMAKE_C_COMPILER=gcc-5
+ - XMRSTAK_CMAKE_FLAGS="-DCUDA_ARCH=30 -DOpenCL_ENABLE=OFF"
- os: linux
compiler: gcc
@@ -43,6 +53,7 @@ matrix:
env:
- CMAKE_CXX_COMPILER=g++-6
- CMAKE_C_COMPILER=gcc-6
+ - XMRSTAK_CMAKE_FLAGS="-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF"
- os: linux
compiler: gcc
@@ -57,19 +68,38 @@ matrix:
env:
- CMAKE_CXX_COMPILER=g++-7
- CMAKE_C_COMPILER=gcc-7
+ - XMRSTAK_CMAKE_FLAGS="-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF"
- os: osx
compiler: gcc
+ env:
+ - XMRSTAK_CMAKE_FLAGS="-DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF"
before_install:
- if [ $TRAVIS_OS_NAME = osx ]; then brew tap homebrew/science; fi
+ - export PATH=$CUDA_ROOT/bin:$PATH
+
+install:
+
+ # CUDA
+ - NVCC_FOUND=$(which nvcc >/dev/null && { echo 0; } || { echo 1; })
+ - if [ $NVCC_FOUND -ne 0 ]; then
+ mkdir -p $CUDA_ROOT &&
+ cd $CUDA_ROOT &&
+ travis_retry wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run &&
+ ls -la &&
+ chmod u+x *-run &&
+ ./cuda_8.0.44_linux-run --silent --toolkit --toolkitpath=$CUDA_ROOT &&
+ rm -rf ./cuda_8.0.44_linux-run $CUDA_ROOT/{samples,jre,doc,share} &&
+ cd -;
+ fi
script:
- if [ $TRAVIS_OS_NAME = osx ]; then
brew install hwloc;
- cmake -DMICROHTTPD_ENABLE=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF .;
- else
- cmake -D CMAKE_C_COMPILER=${CMAKE_C_COMPILER} -D CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF .;
+ cmake -DMICROHTTPD_ENABLE=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ${XMRSTAK_CMAKE_FLAGS} .;
+ else
+ cmake -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ${XMRSTAK_CMAKE_FLAGS} .;
fi;
- make VERBOSE=1
- - ./bin/xmr-stak-cpu -c ./config.txt
+ - ./bin/xmr-stak --help
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a24885..dc35c3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,8 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "install prefix" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+# help to find cuda on systems with a software module system
+list(APPEND CMAKE_PREFIX_PATH "$ENV{CUDA_ROOT}")
# allow user to extent CMAKE_PREFIX_PATH via environment variable
list(APPEND CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}")
OpenPOWER on IntegriCloud