Last active
August 14, 2017 20:43
-
-
Save dexX7/b0ef8a1c515c73103839 to your computer and use it in GitHub Desktop.
Bitcoin Core 0.10 Build Matrix Script
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
# env: | |
MAKEJOBS=-j3 | |
RUN_TESTS=false | |
RUN_SPOCK_TESTS=false | |
CCACHE_SIZE=100M | |
CCACHE_TEMPDIR=/tmp/.ccache-temp | |
CCACHE_COMPRESS=1 | |
BASE_OUTDIR=$WORKSPACE/out | |
SDK_URL=https://bitcoincore.org/depends-sources/sdks | |
# matrix: | |
case ${compiler} in | |
"ARM") | |
HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" ;; | |
"bitcoind") | |
HOST=x86_64-unknown-linux-gnu PACKAGES="bc" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true RUN_SPOCK_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER" ;; | |
"64-bit_qt") | |
HOST=x86_64-unknown-linux-gnu RUN_TESTS=true RUN_SPOCK_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" ;; | |
"32-bit_dash") | |
HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc" RUN_TESTS=true RUN_SPOCK_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash" ;; | |
"Cross-Mac") | |
HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy" ;; | |
"Win64") | |
HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" ;; | |
"Win32") | |
HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" ;; | |
esac | |
# install: | |
if [ -n "$PACKAGES" ]; then sudo apt-get update; fi | |
if [ -n "$PACKAGES" ]; then sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi | |
# before_script: | |
unset CC; unset CXX | |
mkdir -p depends/SDKs depends/sdk-sources | |
if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -O depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi | |
if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi | |
make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS | |
# script: | |
if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi | |
OUTDIR=$BASE_OUTDIR/$BUILD_NUMBER-$HOST | |
BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$WORKSPACE/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib" | |
depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE | |
test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh | |
./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false) | |
make distdir PACKAGE=bitcoin VERSION=$HOST | |
cd bitcoin-$HOST | |
./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false) | |
make $MAKEJOBS $GOAL | |
export LD_LIBRARY_PATH=$WORKSPACE/depends/$HOST/lib | |
# test: | |
if [ "$RUN_TESTS" = "true" ]; then make check; fi | |
if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi | |
# omni core test: | |
if [ "$RUN_SPOCK_TESTS" = "true" ] | |
then | |
DATADIR=$OUTDIR/.bitcoin | |
mkdir -p $DATADIR | |
$OUTDIR/bin/bitcoind -datadir="$DATADIR" -server -daemon -rpcuser=bitcoinrpc -rpcpassword=pass -rpcallowip=127.0.0.1 -regtest -txindex -discover=0 -listen=0 -debug -logtimestamps | |
$OUTDIR/bin/bitcoin-cli -datadir="$DATADIR" -rpcuser=bitcoinrpc -rpcpassword=pass -regtest -rpcwait getinfo | |
git clone https://github.com/msgilligan/bitcoin-spock.git qa/bitcoin-spock | |
cd qa/bitcoin-spock | |
./gradlew :bitcoin-rpc:regTest | |
./gradlew :omnij-rpc:regTest | |
$OUTDIR/bin/bitcoin-cli -datadir="$DATADIR" -rpcuser=bitcoinrpc -rpcpassword=pass -regtest -rpcwait stop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment