mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
97b21b302a
e2bab2aa16
multiprocess: add multiprocess travis configuration (Russell Yanofsky)603fd6a2e7
depends: add MULTIPROCESS depends option (Russell Yanofsky)5d1377b52b
build: multiprocess autotools changes (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). --- This PR consists of build changes only. It adds an `--enable-multiprocess` autoconf option (off by default and marked experimental), that builds new `bitcoin-node` and `bitcoin-gui` binaries. These currently function the same as existing `bitcoind` and `bitcoin-qt` binaries, but are extended in #10102 with IPC features to execute node, wallet, and gui functions in separate processes. In addition to adding the `--enable-multiprocess` config flag, it also adds a depends package and autoconf rules to build with the [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) library, and it adds new travis configuration to exercise the build code and run functional tests with the new binaries. The changes in this PR were originally part of #10102 but were moved into #16367 to be able to develop and review the multiprocess build changes independently of the code changes. #16367 was briefly merged and then reverted in #18588. Only change since #16367 has been dropping the `native_boost.mk` depends package which was pointed out to be no longer necessary in https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-596484337 and https://github.com/bitcoin/bitcoin/pull/18588#pullrequestreview-391765649 ACKs for top commit: practicalswift: ACKe2bab2aa16
Sjors: tACKe2bab2aa16
on macOS 10.15.4 hebasto: ACKe2bab2aa16
, tested on Linux Mint 19.3 (x86_64): Tree-SHA512: b5a76eab5abf63d9d8b6d628cbdff4cc1888eef15cafa0a5d56369e2f9d02595fed623f4b74b2cf2830c42c05a774f0943e700f9c768a82d9d348cad199e135c
65 lines
3 KiB
Bash
Executable file
65 lines
3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2019-2020 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
# The root dir.
|
|
# The ci system copies this folder.
|
|
# This is where the depends build is done.
|
|
BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
|
|
export BASE_ROOT_DIR
|
|
|
|
echo "Setting specific values in env"
|
|
if [ -n "${FILE_ENV}" ]; then
|
|
set -o errexit;
|
|
# shellcheck disable=SC1090
|
|
source "${FILE_ENV}"
|
|
fi
|
|
|
|
echo "Fallback to default values in env (if not yet set)"
|
|
# The number of parallel jobs to pass down to make and test_runner.py
|
|
export MAKEJOBS=${MAKEJOBS:--j4}
|
|
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
|
# This folder only exists on the ci host.
|
|
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch}
|
|
# What host to compile for. See also ./depends/README.md
|
|
# Tests that need cross-compilation export the appropriate HOST.
|
|
# Tests that run natively guess the host
|
|
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
|
|
# Whether to prefer BusyBox over GNU utilities
|
|
export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
|
|
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
|
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
|
|
export TEST_PREVIOUS_RELEASES=${TEST_PREVIOUS_RELEASES:-false}
|
|
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
|
|
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
|
export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}
|
|
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04}
|
|
# Randomize test order.
|
|
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
|
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
|
# See man 7 debconf
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
export CCACHE_SIZE=${CCACHE_SIZE:-100M}
|
|
export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
|
|
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
|
# The cache dir.
|
|
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
|
export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
|
|
# The depends dir.
|
|
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
|
export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
|
|
# Folder where the build result is put (bin and lib).
|
|
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST}
|
|
# Folder where the build is done (dist and out-of-tree build).
|
|
export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
|
|
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST}
|
|
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
|
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps}
|
|
export GOAL=${GOAL:-install}
|
|
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
|
|
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
|
|
export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
|