Skip to content

Commit

Permalink
fetch cached boost rocksdb qt (#2391)
Browse files Browse the repository at this point in the history
update dockerfile to use cache
dont use rocksdb cache for mac testing
update build-travis.sh to handle the difference between
cached and brew installs of rocksdb
  • Loading branch information
Russel Waters committed Nov 6, 2019
1 parent 9f1afb1 commit c36c8b7
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 32 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- brew cask install xquartz;
- brew upgrade cmake;
- brew install rocksdb;
- util/build_prep/fetch_boost.sh
- util/build_prep/macosx/build_qt.sh
install:
- brew install ccache;
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
- brew cask install xquartz;
- brew upgrade cmake;
- brew install rocksdb;
- util/build_prep/fetch_boost.sh
- util/build_prep/macosx/build_qt.sh
install:
- brew install ccache;
Expand Down Expand Up @@ -127,7 +129,8 @@ jobs:
- brew update;
- brew cask install xquartz;
- brew upgrade cmake;
- brew install rocksdb;
- util/build_prep/fetch_rocksdb.sh
- util/build_prep/fetch_boost.sh
- util/build_prep/macosx/build_qt.sh
install:
- pip install --user awscli
Expand Down Expand Up @@ -169,7 +172,8 @@ jobs:
- brew update;
- brew cask install xquartz;
- brew upgrade cmake;
- brew install rocksdb;
- util/build_prep/fetch_rocksdb.sh
- util/build_prep/fetch_boost.sh
- util/build_prep/macosx/build_qt.sh
install:
- pip install --user awscli
Expand All @@ -185,7 +189,6 @@ cache:
- $HOME/.local
- $HOME/Library/Caches/Homebrew
- $TRAVIS_BUILD_DIR/load-tester/target
- /tmp/qt/
script:
- if [ -n "$ONE_TIME_TESTS" ]; then ci/check-commit-format.sh; fi
- if [ -n "$ONE_TIME_TESTS" ]; then doxygen doxygen.config; fi # TODO also deploy the built HTML
Expand Down
4 changes: 3 additions & 1 deletion ci/build-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ cmake \
-DNANO_POW_SERVER=ON \
-DNANO_GUI=ON \
-DNANO_ROCKSDB=ON \
-DROCKSDB_LIBRARIES=/tmp/rocksdb/lib/librocksdb.a \
-DROCKSDB_INCLUDE_DIRS=/tmp/rocksdb/include \
-DCMAKE_BUILD_TYPE=${CONFIGURATION} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBOOST_ROOT=/usr/local \
-DBOOST_ROOT=/tmp/boost/ \
-DQt5_DIR=${qt_dir} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCI_BUILD=true \
Expand Down
11 changes: 10 additions & 1 deletion ci/build-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,25 @@ fi

ulimit -S -n 8192

if [[ "$OS" == 'Linux' ]]; then
ROCKSDB="-DROCKSDB_LIBRARIES=/tmp/rocksdb/lib/librocksdb.a \
-DROCKSDB_INCLUDE_DIRS=/tmp/rocksdb/include"
else
ROCKSDB=""
fi


cmake \
-G'Unix Makefiles' \
-DACTIVE_NETWORK=nano_test_network \
-DNANO_TEST=ON \
-DNANO_GUI=ON \
-DNANO_ROCKSDB=ON \
${ROCKSDB} \
-DNANO_WARN_TO_ERR=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBOOST_ROOT=/usr/local \
-DBOOST_ROOT=/tmp/boost/ \
-DQt5_DIR=${qt_dir} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
${SANITIZERS} \
Expand Down
14 changes: 5 additions & 9 deletions docker/ci/Dockerfile-clang
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ FROM nanocurrency/nano-env:base
RUN apt-get update -qq && apt-get install -yqq \
clang-3.9 lldb-3.9 git

ENV USE_RTTI=1
RUN git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
PORTABLE=1 make static_lib && \
make install
ADD util/build_prep/fetch_rocksdb.sh fetch_rocksdb.sh
RUN ./fetch_rocksdb.sh

ENV CXX=/usr/bin/clang++
ENV CC=/usr/bin/clang
RUN ln -s /usr/bin/clang-3.9 /usr/bin/clang
RUN ln -s /usr/bin/clang++-3.9 /usr/bin/clang++
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
ENV BOOST_ROOT=/usr/local
ADD util/build_prep/bootstrap_boost.sh bootstrap_boost.sh
ENV BOOST_ROOT=/tmp/boost

RUN ./bootstrap_boost.sh -m -c
ADD util/build_prep/fetch_boost.sh fetch_boost.sh

RUN rm bootstrap_boost.sh
RUN ./fetch_boost.sh
18 changes: 8 additions & 10 deletions docker/ci/Dockerfile-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ FROM nanocurrency/nano-env:base

RUN apt-get install -yqq git

ENV USE_RTTI=1
RUN git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
PORTABLE=1 make static_lib && \
make install

ENV BOOST_ROOT=/usr/local
ADD util/build_prep/bootstrap_boost.sh bootstrap_boost.sh
RUN ./bootstrap_boost.sh -m
RUN rm bootstrap_boost.sh
ADD util/build_prep/fetch_rocksdb.sh fetch_rocksdb.sh
RUN ./fetch_rocksdb.sh

ENV BOOST_ROOT=/tmp/boost

ADD util/build_prep/fetch_boost.sh fetch_boost.sh

RUN TRAVIS_COMPILER=gcc ./fetch_boost.sh
11 changes: 11 additions & 0 deletions util/build_prep/fetch_boost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
OS=`uname`

TRAVIS_COMPILER="${TRAVIS_COMPILER:-clang}"

pushd /tmp
wget -O boost-$OS-$TRAVIS_COMPILER-latest.tgz https://s3.us-east-2.amazonaws.com/repo.nano.org/artifacts/boost-$OS-$TRAVIS_COMPILER-latest.tgz
tar -zxf boost-$OS-$TRAVIS_COMPILER-latest.tgz
mv tmp/* .
rm -fr tmp
popd
15 changes: 15 additions & 0 deletions util/build_prep/fetch_rocksdb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
OS=`uname`

if [[ $OS =~ "Darwin" ]]; then
artifact="rocksdb-clang-latest.tgz"
else
artifact="rocksdb-gcc-latest.tgz"
fi

pushd /tmp
wget -O $artifact https://s3.us-east-2.amazonaws.com/repo.nano.org/artifacts/$artifact
tar -zxf $artifact
mv tmp/* .
rm -fr tmp
popd
14 changes: 6 additions & 8 deletions util/build_prep/macosx/build_qt.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env bash

if [[ ! -d "/tmp/qt/lib/cmake" ]]; then
pushd /tmp
wget -O qtbase-latest.tgz https://s3.us-east-2.amazonaws.com/$AWS_BUCKET/artifacts/qtbase-latest.tgz
tar -zxf qtbase-latest.tgz
mv tmp/* .
rm -fr tmp
popd
fi
pushd /tmp
wget -O qtbase-clang-latest.tgz https://s3.us-east-2.amazonaws.com/repo.nano.org/artifacts/qtbase-clang-latest.tgz
tar -zxf qtbase-clang-latest.tgz
mv tmp/* .
rm -fr tmp
popd

0 comments on commit c36c8b7

Please sign in to comment.