Browse Source

Merge pull request #1 from ethereum-mining/ci

Travis CI
cl-refactor
Paweł Bylica 8 years ago
committed by GitHub
parent
commit
24878164cc
  1. 20
      .travis.yml
  2. 2
      libethcore/BlockInfo.h
  3. 2
      libethcore/EthashGPUMiner.cpp

20
.travis.yml

@ -0,0 +1,20 @@
language: cpp
branches:
only:
- master
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8.3
cache:
ccache: true
install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:ethereum/ethereum; sudo apt-get update; sudo apt-get install -y --no-install-recommends --allow-unauthenticated libjson-rpc-cpp-dev libjsoncpp-dev libboost-all-dev libcurl4-openssl-dev libmicrohttpd-dev mesa-common-dev ocl-icd-libopencl1 opencl-headers; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install libjson-rpc-cpp jsoncpp; fi
script:
- cmake -DETHASHCUDA=Off -DETHSTRATUM=On -DETHASHCL=On -H. -Bbuild
- cmake --build build
- build/ethminer/ethminer --list-devices -G

2
libethcore/BlockInfo.h

@ -188,8 +188,6 @@ template <class BlockInfoSub>
class BlockHeaderPolished: public BlockInfoSub
{
public:
static const unsigned Fields = BlockInfoSub::BasicFields + BlockInfoSub::SealFields;
BlockHeaderPolished() {}
BlockHeaderPolished(BlockInfo const& _bi): BlockInfoSub(_bi) {}
explicit BlockHeaderPolished(bytes const& _data, Strictness _s = IgnoreSeal, h256 const& _h = h256(), BlockDataType _bdt = BlockData) { populate(&_data, _s, _h, _bdt); }

2
libethcore/EthashGPUMiner.cpp

@ -183,7 +183,7 @@ void EthashGPUMiner::workLoop()
}
uint64_t upper64OfBoundary = (uint64_t)(u64)((u256)w.boundary >> 192);
uint64_t startN;
uint64_t startN = 0;
if (w.exSizeBits >= 0)
startN = w.startNonce | ((uint64_t)index() << (64 - 4 - w.exSizeBits)); // this can support up to 16 devices
m_miner->search(w.headerHash.data(), upper64OfBoundary, *m_hook, (w.exSizeBits >= 0), startN);

Loading…
Cancel
Save