![ewillbefull@gmail.com](/assets/img/avatar_default.png)
43 changed files with 23 additions and 124 deletions
@ -1,35 +0,0 @@ |
|||
os: linux |
|||
|
|||
env: |
|||
global: |
|||
- ZCTRAVIS_BOOST_OPTS="threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 address-model=64" |
|||
- ZCTRAVIS_BOOST_LIBRARIES="chrono,filesystem,program_options,system,thread,test" |
|||
- ZCTRAVIS_SNARK_FLAGS="-j2 CURVE=ALT_BN128 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1" |
|||
- ZCTRAVIS_LIBZEROCASH_CXXFLAGS="-w -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=c++11 -pipe -O2 -O0 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -fPIC" |
|||
- ZCTRAVIS_LIBZEROCASH_FLAGS="-j2 NO_PROCPS=1 MINDEPS=1 LINK_RT=1" |
|||
|
|||
before_install: |
|||
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y # For g++-4.9 |
|||
- sudo apt-get update -qq |
|||
- sudo apt-get install -qq g++-4.9 |
|||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90 |
|||
# Install dependencies |
|||
- sudo apt-get install cmake libgmp-dev libssl-dev |
|||
# We still need boost, let's get it. |
|||
- wget http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2 |
|||
- echo "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967 boost_1_57_0.tar.bz2" | sha256sum -c |
|||
- tar -xjf boost_*.tar.bz2 |
|||
- cd boost_1_57_0 |
|||
- ./bootstrap.sh --without-icu --with-libraries="$ZCTRAVIS_BOOST_LIBRARIES" |
|||
- ./b2 -d2 -j2 -d1 $ZCTRAVIS_BOOST_OPTS |
|||
- sudo ./b2 -d0 -j2 $ZCTRAVIS_BOOST_OPTS install |
|||
- cd .. |
|||
# We still need crypto++, let's get it. |
|||
- ./get-cryptopp |
|||
|
|||
script: |
|||
- LIBSNARK_FLAGS="$ZCTRAVIS_SNARK_FLAGS" ./get-libsnark |
|||
- CXXFLAGS="$ZCTRAVIS_LIBZEROCASH_CXXFLAGS" make $ZCTRAVIS_LIBZEROCASH_FLAGS |
|||
# - ./zerocash_pour_ppzksnark/tests/test_zerocash_pour_ppzksnark |
|||
# - ./tests/merkleTest |
|||
# - ./tests/zerocashTest |
@ -1,27 +0,0 @@ |
|||
#!/bin/bash |
|||
# To pass parameters to the cryptopp makefile, use `CRYPTOPP_FLAGS=... ./get-cryptopp` |
|||
set -e |
|||
|
|||
DEPSRC=./depsrc |
|||
DEPINST=./depinst |
|||
DUMMIES="cryptopp-dummy.exe" |
|||
|
|||
set -x |
|||
|
|||
mkdir -p $DEPINST |
|||
DEPINST=`pwd -P`/$DEPINST # remember absolute path |
|||
|
|||
mkdir -p $DEPSRC |
|||
cd $DEPSRC |
|||
|
|||
mkdir -p cryptopp562 && cd cryptopp562 |
|||
if [ ! -f hmac.cpp ]; then |
|||
wget http://www.cryptopp.com/cryptopp562.zip |
|||
echo "5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574 cryptopp562.zip" | sha256sum -c |
|||
unzip cryptopp562.zip |
|||
fi |
|||
|
|||
make static dynamic CXXFLAGS='-DNDEBUG -g -O2 -fPIC' $CRYPTOPP_FLAGS |
|||
touch $DUMMIES # kludge: cryptopp's "make install" breaks if there are no such files to install |
|||
make install PREFIX=$DEPINST/ $CRYPTOPP_FLAGS |
|||
rm -f $DUMMIES |
@ -1,39 +0,0 @@ |
|||
#!/bin/bash |
|||
# To pass options options to libsnark Makefile, put them in env var LIBSNARK_FLAGS. |
|||
# To clone libsnark from an alternate location, set env var LIBSNARK_SRC. For example: |
|||
# LIBSNARK_SRC="$HOME/libsnark.git --branch master" ./get-libsnark |
|||
# To use curve ALT_BN128 instead of BN128 (which is x64-only), use: |
|||
# CURVE=ALT_BN128 ./get-libsnark |
|||
|
|||
set -e |
|||
|
|||
LIBSNARK_SRC=${LIBSNARK_SRC:-https://github.com/scipr-lab/libsnark} |
|||
|
|||
CURVE=${CURVE:-BN128} |
|||
|
|||
LIBSNARK_FLAGS="$LIBSNARK_FLAGS NO_SUPERCOP=1 NO_GTEST=1 NO_DOCS=1 CURVE=$CURVE" |
|||
if [[ `uname -s` == "Darwin" ]]; then |
|||
LIBSNARK_FLAGS="$LIBSNARK_FLAGS NO_PROCPS=1" |
|||
fi |
|||
|
|||
set -x |
|||
|
|||
DEPSRC=./depsrc |
|||
DEPINST=./depinst |
|||
|
|||
mkdir -p $DEPINST |
|||
DEPINST=`pwd -P`/$DEPINST # remember absolute path |
|||
|
|||
mkdir -p $DEPSRC |
|||
cd $DEPSRC |
|||
|
|||
[ ! -d libsnark ] && git clone $LIBSNARK_SRC libsnark |
|||
cd libsnark |
|||
git pull |
|||
if [ "$CURVE" == "BN128" ]; then |
|||
# TODO: submit -fPIC patch to ate-pairing |
|||
INC_DIR=-fPIC ./prepare-depends.sh |
|||
fi |
|||
make clean |
|||
CXXFLAGS="-DNO_PT_COMPRESSION=1" make lib $LIBSNARK_FLAGS |
|||
make install PREFIX=$DEPINST $LIBSNARK_FLAGS |
Loading…
Reference in new issue