2018-07-12 15:28:59 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script is meant to be sourced into the actual build script. It contains the build matrix and will set all
|
|
|
|
# necessary environment variables for the request build target
|
|
|
|
|
|
|
|
export BUILD_TARGET=${BUILD_TARGET:-linux64}
|
|
|
|
export PULL_REQUEST=${PULL_REQUEST:-false}
|
|
|
|
export JOB_NUMBER=${JOB_NUMBER:-1}
|
|
|
|
|
2024-12-17 20:59:46 +01:00
|
|
|
export BUILDER_IMAGE_NAME="neobytes-builder-$BUILD_TARGET-$JOB_NUMBER"
|
2018-07-12 15:28:59 +02:00
|
|
|
|
|
|
|
export HOST_SRC_DIR=${HOST_SRC_DIR:-$(pwd)}
|
|
|
|
export HOST_CACHE_DIR=${HOST_CACHE_DIR:-$(pwd)/ci-cache-$BUILD_TARGET}
|
|
|
|
|
|
|
|
export SRC_DIR=${SRC_DIR:-$HOST_SRC_DIR}
|
|
|
|
export BUILD_DIR=$SRC_DIR
|
|
|
|
export OUT_DIR=$BUILD_DIR/out
|
|
|
|
|
|
|
|
export CACHE_DIR=${CACHE_DIR:-$HOST_CACHE_DIR}
|
|
|
|
export CCACHE_DIR=$CACHE_DIR/ccache
|
|
|
|
|
|
|
|
export DOCKER_RUN_VOLUME_ARGS="-v $HOST_SRC_DIR:$SRC_DIR -v $HOST_CACHE_DIR:$CACHE_DIR"
|
2019-10-01 16:16:26 +02:00
|
|
|
export DOCKER_RUN_ENV_ARGS="-e SRC_DIR=$SRC_DIR -e CACHE_DIR=$CACHE_DIR -e PULL_REQUEST=$PULL_REQUEST -e COMMIT_RANGE=$COMMIT_RANGE -e JOB_NUMBER=$JOB_NUMBER -e BUILD_TARGET=$BUILD_TARGET"
|
2018-07-12 15:28:59 +02:00
|
|
|
export DOCKER_RUN_ARGS="$DOCKER_RUN_VOLUME_ARGS $DOCKER_RUN_ENV_ARGS"
|
|
|
|
export DOCKER_RUN_IN_BUILDER="docker run -t --rm -w $SRC_DIR $DOCKER_RUN_ARGS $BUILDER_IMAGE_NAME"
|
|
|
|
|
|
|
|
# Default values for targets
|
|
|
|
export GOAL="install"
|
|
|
|
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
|
|
|
export MAKEJOBS="-j4"
|
|
|
|
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=false
|
|
|
|
export RUN_INTEGRATIONTESTS=false
|
|
|
|
|
2018-07-12 15:28:59 +02:00
|
|
|
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
|
|
|
export HOST=arm-linux-gnueabihf
|
|
|
|
export PACKAGES="g++-arm-linux-gnueabihf"
|
|
|
|
export CHECK_DOC=1
|
2020-01-02 18:36:29 +01:00
|
|
|
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
|
|
|
|
# This could be removed once the ABI change warning does not show up by default
|
|
|
|
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "win32" ]; then
|
|
|
|
export HOST=i686-w64-mingw32
|
|
|
|
export DPKG_ADD_ARCH="i386"
|
|
|
|
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-stable wine32 bc"
|
2019-03-19 08:43:37 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
|
2018-07-12 15:28:59 +02:00
|
|
|
export DIRECT_WINE_EXEC_TESTS=true
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "win64" ]; then
|
|
|
|
export HOST=x86_64-w64-mingw32
|
|
|
|
export DPKG_ADD_ARCH="i386"
|
|
|
|
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-stable wine64 bc"
|
2019-03-19 08:43:37 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
|
2018-07-12 15:28:59 +02:00
|
|
|
export DIRECT_WINE_EXEC_TESTS=true
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "linux32" ]; then
|
|
|
|
export HOST=i686-pc-linux-gnu
|
|
|
|
export PACKAGES="g++-multilib bc python3-zmq"
|
2019-02-21 19:37:16 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-stacktraces LDFLAGS=-static-libstdc++"
|
2024-12-17 20:59:46 +01:00
|
|
|
export USE_SHELL="/bin/neobytes"
|
2018-07-12 15:28:59 +02:00
|
|
|
export PYZMQ=true
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
|
|
|
export RUN_INTEGRATIONTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "linux64" ]; then
|
|
|
|
export HOST=x86_64-unknown-linux-gnu
|
|
|
|
export PACKAGES="bc python3-zmq"
|
2019-03-25 17:24:24 +01:00
|
|
|
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
2019-02-21 19:37:16 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-stacktraces"
|
2018-07-12 15:28:59 +02:00
|
|
|
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG"
|
|
|
|
export PYZMQ=true
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
|
|
|
export RUN_INTEGRATIONTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
|
|
|
|
export HOST=x86_64-unknown-linux-gnu
|
2019-04-06 15:58:25 +02:00
|
|
|
export PACKAGES="python3"
|
2018-07-12 15:28:59 +02:00
|
|
|
export DEP_OPTS="NO_WALLET=1"
|
|
|
|
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "linux64_release" ]; then
|
|
|
|
export HOST=x86_64-unknown-linux-gnu
|
|
|
|
export PACKAGES="bc python3-zmq"
|
2019-03-25 17:24:24 +01:00
|
|
|
export DEP_OPTS="NO_UPNP=1"
|
2018-07-12 15:28:59 +02:00
|
|
|
export BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports"
|
|
|
|
export PYZMQ=true
|
2019-05-22 23:21:21 +02:00
|
|
|
export RUN_UNITTESTS=true
|
2018-07-12 15:28:59 +02:00
|
|
|
elif [ "$BUILD_TARGET" = "mac" ]; then
|
|
|
|
export HOST=x86_64-apple-darwin11
|
|
|
|
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools"
|
2019-03-19 08:43:37 +01:00
|
|
|
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner"
|
2018-07-12 15:28:59 +02:00
|
|
|
export OSX_SDK=10.11
|
|
|
|
export GOAL="deploy"
|
|
|
|
fi
|