Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5063959
commit 4b361a9
Showing
8 changed files
with
129 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set -ev | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
sudo apt-get update | ||
sudo apt install gcc-7 g++-7 libtool autoconf libboost-filesystem-dev libboost-iostreams-dev libboost-serialization-dev libboost-thread-dev libboost-test-dev libssl-dev libjsoncpp-dev libcurl4-openssl-dev libjsoncpp-dev libjsonrpccpp-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libjemalloc-dev libsparsehash-dev | ||
sudo apt-get install ruby-full -y # only needed for caching | ||
gem install mtime_cache # only needed for caching | ||
|
||
if [ ! -d ~/cmake-3.17.0-Linux-x86_64 ]; then | ||
echo "No cache - downloading CMake" | ||
cd ~ && wget --quiet https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.tar.gz && tar -xf cmake-3.17.0-Linux-x86_64.tar.gz | ||
else | ||
echo "Cached CMake found" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -ev | ||
pip3 install -U pip setuptools | ||
pip3 install pytest pytest-regtest pytz tzlocal pytest-benchmark | ||
pip3 install sphinx sphinx_rtd_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set -ev | ||
which cmake | ||
cmake -version | ||
mkdir -p release | ||
cd release | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local .. | ||
mtime_cache ../**/*.{%{cpp}} -c ../.mtime_cache/cache.json | ||
make -j 2 | ||
make install | ||
mtime_cache /home/circleci/.local/**/*.{%{cpp}} -c ../.mtime_cache/blocksci.json | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set -ev | ||
sed -i 's/j4/j2/g' blockscipy/setup.py | ||
CC=gcc-7 CXX=g++-7 pip3 install -v -e blockscipy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: | ||
image: ubuntu-1604:201903-01 | ||
branches: | ||
only: | ||
- v0.6 | ||
environment: | ||
CC: gcc-7 | ||
CXX: g++-7 | ||
steps: | ||
- run: | ||
name: Setup Environment Variables | ||
command: | | ||
echo "export PYENV_ROOT=/opt/circleci/.pyenv" >> $BASH_ENV | ||
echo "export PATH=$PYENV_ROOT/bin:$PYENV_ROOT/libexec:/home/circleci/.local/bin:/home/circleci/cmake-3.17.0-Linux-x86_64/bin:$PATH" >> $BASH_ENV | ||
echo "export LD_LIBRARY_PATH=/home/circleci/.local/lib:$LD_LIBRARY_PATH" >> $BASH_ENV | ||
source $BASH_ENV | ||
- checkout | ||
- run: | ||
name: Switch to Python v3.7 | ||
command: | | ||
pyenv versions | ||
pyenv global 3.7.0 | ||
pyenv versions | ||
- restore_cache: | ||
keys: | ||
- blocksci-deps-{{ .Branch }}-{{ .BuildNum }} | ||
- blocksci-deps-{{ .Branch }} | ||
- blocksci-deps- | ||
- run: | ||
name: Install Packages (C++) | ||
command: .circleci/build_ubuntu_cpp.sh | ||
- save_cache: | ||
paths: | ||
- /home/circleci/cmake-3.17.0-Linux-x86_64/ | ||
key: blocksci-deps-{{ .Branch }}-{{ .BuildNum }} | ||
- restore_cache: | ||
keys: | ||
- blocksci-{{ .Branch }}- | ||
- blocksci- | ||
- run: | ||
name: Compile BlockSci (C++) | ||
command: .circleci/compile_ubuntu_cpp.sh | ||
- save_cache: | ||
paths: | ||
- release/ | ||
- /home/circleci/.local | ||
- .mtime_cache/ | ||
key: blocksci-{{ .Branch }}-{{ epoch }} | ||
- run: | ||
name: Test Parser Functionality | ||
command: .circleci/test_parser.sh | ||
- restore_cache: | ||
keys: | ||
- blockscipy-{{ .Branch }}- | ||
- blockscipy- | ||
- run: | ||
name: Install Packages (Python) | ||
command: .circleci/build_ubuntu_python.sh | ||
- run: | ||
name: Compile BlockSciPy (Python) | ||
command: .circleci/compile_ubuntu_python.sh | ||
- save_cache: | ||
paths: | ||
- blockscipy/build | ||
key: blockscipy-{{ .Branch }}-{{ epoch }} | ||
- run: | ||
name: Run Tests | ||
command: .circleci/test_python.sh | ||
- store_test_results: | ||
path: test/test-results | ||
- store_artifacts: | ||
path: test/test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set -ev | ||
cd test | ||
blocksci_parser btc.json generate-config bitcoin_regtest bitcoin_regtest --disk files/btc/regtest/ | ||
blocksci_parser btc.json doctor | ||
blocksci_parser btc.json update | ||
blocksci_check_integrity btc.json | ||
blocksci_parser bch.json generate-config bitcoin_cash_regtest bitcoin_cash_regtest --disk files/bch/regtest/ | ||
blocksci_parser bch.json doctor | ||
blocksci_parser bch.json update | ||
blocksci_check_integrity bch.json | ||
blocksci_parser ltc.json generate-config litecoin_regtest litecoin_regtest --disk files/ltc/regtest/ | ||
blocksci_parser ltc.json doctor | ||
blocksci_parser ltc.json update | ||
blocksci_check_integrity ltc.json | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
set -ev | ||
cd test | ||
mkdir test-results | ||
cd blockscipy | ||
pytest -v --junitxml=../test-results/junit.xml | ||
cd ../benchmark | ||
./new-benchmark.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters