mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-22 08:09:19 +01:00
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dce93b2dd7 | ||
|
|
4cc994e9d6 | ||
|
|
7948fdd060 | ||
|
|
da1e753eeb | ||
|
|
1e4db14df9 | ||
|
|
2a5d9818ed | ||
|
|
42c74a0a4c | ||
|
|
6e4d87e696 | ||
|
|
0a5ea2aa84 | ||
|
|
2159676b6e | ||
|
|
754eefd21c | ||
|
|
bb1fabda30 | ||
|
|
ca5f8f0de2 | ||
|
|
067dc42b79 | ||
|
|
7f2dc610a5 | ||
|
|
14784aa02c | ||
|
|
b1268254ba | ||
|
|
c540f07ec3 | ||
|
|
1727b3bc54 | ||
|
|
3905706b70 | ||
|
|
2e8880abc0 | ||
|
|
a8f014b342 | ||
|
|
33a61018b2 | ||
|
|
d5701900fc | ||
|
|
e4b8c9b2bf | ||
|
|
bf2bf73bcb | ||
|
|
b04f5f9608 | ||
|
|
dedee6af57 | ||
|
|
931db785ee | ||
|
|
bbe864a13a | ||
|
|
4b7d30d026 | ||
|
|
d22cc74837 | ||
|
|
e23def8fcc | ||
|
|
bb5bcf32ba | ||
|
|
032ceb189a | ||
|
|
d68b6abeb8 | ||
|
|
c349096fa2 | ||
|
|
e5aec59e0f | ||
|
|
885366c67a | ||
|
|
e2e4c2969b | ||
|
|
4d42c3a240 | ||
|
|
d810fde8ea | ||
|
|
a9419eff0c | ||
|
|
4abd2ab18e | ||
|
|
1390c96c8e | ||
|
|
9b438f06ec | ||
|
|
43ced0b436 | ||
|
|
fc8f2bfa3a | ||
|
|
a6fb674f96 | ||
|
|
5ad82a09b4 | ||
|
|
997faf6b6c | ||
|
|
7e0bcfbfef | ||
|
|
c97d924880 | ||
|
|
da6fba6fe7 | ||
|
|
3f385c912e | ||
|
|
c1860341a7 | ||
|
|
2e5706d601 | ||
|
|
2730ed2b0d | ||
|
|
21f96f40d1 | ||
|
|
4be489d4d4 | ||
|
|
f34c98a460 | ||
|
|
ca8d2c4b43 | ||
|
|
2a56cc1f58 | ||
|
|
05f7937810 | ||
|
|
ce3cb2bbe7 | ||
|
|
5964b8339a | ||
|
|
def75f0fb5 | ||
|
|
ab4a32b8af | ||
|
|
bd44c69238 | ||
|
|
0637169760 | ||
|
|
7869b169f2 |
349
.cirrus.yml
349
.cirrus.yml
@@ -1,49 +1,20 @@
|
||||
env: # Global defaults
|
||||
CIRRUS_CLONE_DEPTH: 1
|
||||
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
|
||||
MAKEJOBS: "-j10"
|
||||
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
|
||||
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error
|
||||
CCACHE_MAXSIZE: "200M"
|
||||
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error
|
||||
CCACHE_SIZE: "200M"
|
||||
CCACHE_DIR: "/tmp/ccache_dir"
|
||||
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
|
||||
|
||||
# https://cirrus-ci.org/guide/persistent-workers/
|
||||
#
|
||||
# It is possible to select a specific persistent worker by label. Refer to the
|
||||
# Cirrus CI docs for more details.
|
||||
#
|
||||
# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
|
||||
# Specifically,
|
||||
# - apt-get is required due to PACKAGE_MANAGER_INSTALL
|
||||
# - podman-docker-4.1+ is required due to the use of `podman` when
|
||||
# RESTART_CI_DOCKER_BEFORE_RUN is set and 4.1+ due to the bugfix in 4.1
|
||||
# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
|
||||
# - The ./ci/ depedencies (with cirrus-cli) should be installed:
|
||||
#
|
||||
# ```
|
||||
# apt update && apt install git screen python3 bash podman-docker curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
|
||||
# ```
|
||||
#
|
||||
# - There are no strict requirements on the hardware, because having less CPUs
|
||||
# runs the same CI script (maybe slower). To avoid rare and intermittent OOM
|
||||
# due to short memory usage spikes, it is recommended to add (and persist)
|
||||
# swap:
|
||||
#
|
||||
# ```
|
||||
# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab )
|
||||
# ```
|
||||
#
|
||||
# - To register the persistent worker, open a `screen` session and run:
|
||||
#
|
||||
# ```
|
||||
# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
|
||||
# ```
|
||||
#
|
||||
# The following specific types should exist, with the following requirements:
|
||||
# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
|
||||
# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
|
||||
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
|
||||
cirrus_ephemeral_worker_template_env: &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system
|
||||
|
||||
persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV
|
||||
RESTART_CI_DOCKER_BEFORE_RUN: "1"
|
||||
|
||||
persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
|
||||
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/
|
||||
|
||||
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
|
||||
filter_template: &FILTER_TEMPLATE
|
||||
@@ -54,19 +25,37 @@ base_template: &BASE_TEMPLATE
|
||||
<< : *FILTER_TEMPLATE
|
||||
merge_base_script:
|
||||
# Unconditionally install git (used in fingerprint_script).
|
||||
- git --version || bash -c "$PACKAGE_MANAGER_INSTALL git"
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL git"
|
||||
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
||||
- git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
||||
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
|
||||
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
|
||||
# Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD"
|
||||
|
||||
main_template: &MAIN_TEMPLATE
|
||||
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
|
||||
ccache_cache:
|
||||
folder: "/tmp/ccache_dir"
|
||||
ci_script:
|
||||
- ./ci/test_run_all.sh
|
||||
|
||||
global_task_template: &GLOBAL_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
container:
|
||||
# https://cirrus-ci.org/faq/#are-there-any-limits
|
||||
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
|
||||
cpu: 2
|
||||
greedy: true
|
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
|
||||
depends_built_cache:
|
||||
folder: "depends/built"
|
||||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE
|
||||
<< : *BASE_TEMPLATE
|
||||
check_clang_script:
|
||||
- clang --version
|
||||
brew_install_script:
|
||||
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
|
||||
<< : *MAIN_TEMPLATE
|
||||
|
||||
compute_credits_template: &CREDITS_TEMPLATE
|
||||
@@ -75,121 +64,277 @@ compute_credits_template: &CREDITS_TEMPLATE
|
||||
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != ""
|
||||
|
||||
task:
|
||||
name: 'lint'
|
||||
name: 'lint [bionic]'
|
||||
<< : *BASE_TEMPLATE
|
||||
container:
|
||||
image: debian:bookworm
|
||||
image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md
|
||||
cpu: 1
|
||||
memory: 1G
|
||||
# For faster CI feedback, immediately schedule the linters
|
||||
<< : *CREDITS_TEMPLATE
|
||||
test_runner_cache:
|
||||
folder: "/lint_test_runner"
|
||||
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:test/lint/test_runner)
|
||||
python_cache:
|
||||
folder: "/python_build"
|
||||
fingerprint_script: cat .python-version /etc/os-release
|
||||
unshallow_script:
|
||||
- git fetch --unshallow --no-tags
|
||||
lint_script:
|
||||
- ./ci/lint_run_all.sh
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
|
||||
task:
|
||||
name: 'tidy'
|
||||
name: 'tidy [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: medium
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 2
|
||||
memory: 5G
|
||||
# For faster CI feedback, immediately schedule the linters
|
||||
<< : *CREDITS_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh"
|
||||
|
||||
task:
|
||||
name: 'ARM, unit tests, no functional tests'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: arm64 # Use arm64 worker to sidestep qemu and avoid a slow CI: https://github.com/bitcoin/bitcoin/pull/28087#issuecomment-1649399453
|
||||
name: "Win64 native [vs2022]"
|
||||
<< : *FILTER_TEMPLATE
|
||||
windows_container:
|
||||
cpu: 6
|
||||
memory: 12G
|
||||
image: cirrusci/windowsservercore:visualstudio2022
|
||||
timeout_in: 120m
|
||||
env:
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
|
||||
PYTHONUTF8: 1
|
||||
CI_VCPKG_TAG: '2022.06.16.1'
|
||||
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
|
||||
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
|
||||
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
|
||||
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
|
||||
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip'
|
||||
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.5.zip'
|
||||
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.5'
|
||||
QTBASEDIR: 'C:\Qt_static'
|
||||
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
|
||||
QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
|
||||
IgnoreWarnIntDirInTempDetected: 'true'
|
||||
merge_script:
|
||||
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git checkout FETCH_HEAD; }
|
||||
msvc_qt_built_cache:
|
||||
folder: "%QTBASEDIR%"
|
||||
reupload_on_changes: false
|
||||
fingerprint_script:
|
||||
- echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND%
|
||||
- msbuild -version
|
||||
populate_script:
|
||||
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
|
||||
- mkdir C:\jom
|
||||
- tar -xf C:\jom.zip -C C:\jom
|
||||
- curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL%
|
||||
- tar -xf %QT_LOCAL_PATH% -C C:\
|
||||
- '%x64_NATIVE_TOOLS%'
|
||||
- cd %QT_SOURCE_DIR%
|
||||
- mkdir build
|
||||
- cd build
|
||||
- '%QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%'
|
||||
- jom
|
||||
- jom install
|
||||
vcpkg_tools_cache:
|
||||
folder: '%VCPKG_DOWNLOADS%\tools'
|
||||
reupload_on_changes: false
|
||||
fingerprint_script:
|
||||
- echo %CI_VCPKG_TAG%
|
||||
- msbuild -version
|
||||
vcpkg_binary_cache:
|
||||
folder: '%VCPKG_DEFAULT_BINARY_CACHE%'
|
||||
reupload_on_changes: true
|
||||
fingerprint_script:
|
||||
- echo %CI_VCPKG_TAG%
|
||||
- type build_msvc\vcpkg.json
|
||||
- msbuild -version
|
||||
populate_script:
|
||||
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
|
||||
ccache_cache:
|
||||
folder: '%CCACHE_DIR%'
|
||||
install_tools_script:
|
||||
- choco install --yes --no-progress ccache --version=4.6.1
|
||||
- choco install --yes --no-progress python3 --version=3.9.6
|
||||
- pip install zmq
|
||||
- ccache --version
|
||||
- python -VV
|
||||
install_vcpkg_script:
|
||||
- cd ..
|
||||
- git clone --quiet https://github.com/microsoft/vcpkg.git
|
||||
- cd vcpkg
|
||||
- git -c advice.detachedHead=false checkout %CI_VCPKG_TAG%
|
||||
- .\bootstrap-vcpkg -disableMetrics
|
||||
- echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake
|
||||
- .\vcpkg integrate install
|
||||
- .\vcpkg version
|
||||
build_script:
|
||||
- '%x64_NATIVE_TOOLS%'
|
||||
- cd %CIRRUS_WORKING_DIR%
|
||||
- ccache --zero-stats --max-size=%CCACHE_SIZE%
|
||||
- python build_msvc\msvc-autogen.py
|
||||
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
|
||||
- ccache --show-stats
|
||||
unit_tests_script:
|
||||
- src\test_bitcoin.exe -l test_suite
|
||||
- src\bench_bitcoin.exe > NUL
|
||||
- python test\util\test_runner.py
|
||||
- python test\util\rpcauth-test.py
|
||||
functional_tests_script:
|
||||
# Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
|
||||
# See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance
|
||||
- netsh int ipv4 set dynamicport tcp start=1025 num=64511
|
||||
- netsh int ipv6 set dynamicport tcp start=1025 num=64511
|
||||
# Exclude feature_dbcrash for now due to timeout
|
||||
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended --exclude feature_dbcrash
|
||||
|
||||
task:
|
||||
name: 'Win64, unit tests, no gui tests, no functional tests'
|
||||
name: 'ARM [unit tests, no functional tests] [bullseye]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
arm_container:
|
||||
image: debian:bullseye
|
||||
cpu: 2
|
||||
memory: 8G
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
|
||||
QEMU_USER_CMD: "" # Disable qemu and run the test natively
|
||||
|
||||
task:
|
||||
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
|
||||
|
||||
task:
|
||||
name: '32-bit CentOS, dash, gui'
|
||||
name: '32-bit + dash [gui] [CentOS 8]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
container:
|
||||
image: quay.io/centos/centos:stream8
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
PACKAGE_MANAGER_INSTALL: "yum install -y"
|
||||
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
|
||||
|
||||
task:
|
||||
name: 'previous releases, depends DEBUG'
|
||||
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [buster]'
|
||||
previous_releases_cache:
|
||||
folder: "releases"
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
<< : *PERSISTENT_WORKER_TEMPLATE
|
||||
env:
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_previous_releases.sh"
|
||||
<< : *PERSISTENT_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
|
||||
|
||||
task:
|
||||
name: 'TSan, depends, gui'
|
||||
name: '[TSan, depends, gui] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: medium
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 6 # Increase CPU and Memory to avoid timeout
|
||||
memory: 24G
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
|
||||
|
||||
task:
|
||||
name: 'MSan, depends'
|
||||
name: '[MSan, depends] [focal]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done.
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
|
||||
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
|
||||
|
||||
task:
|
||||
name: 'fuzzer,address,undefined,integer, no depends'
|
||||
name: '[ASan + LSan + UBSan + integer, no depends, USDT] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: medium
|
||||
# We can't use a 'container' for the USDT interface tests as the CirrusCI
|
||||
# containers don't have privileges to hook into bitcoind. CirrusCI uses
|
||||
# Google Compute Engine instances: https://cirrus-ci.org/guide/custom-vms/
|
||||
# Images can be found here: https://cloud.google.com/compute/docs/images/os-details
|
||||
compute_engine_instance:
|
||||
image_project: ubuntu-os-cloud
|
||||
image: family/ubuntu-2204-lts # when upgrading, check if we can drop "ADD_UNTRUSTED_BPFCC_PPA"
|
||||
cpu: 4
|
||||
memory: 12G
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
HOME: /root/ # Only needed for compute_engine_instance
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
|
||||
MAKEJOBS: "-j4" # Avoid excessive memory use
|
||||
|
||||
task:
|
||||
name: '[fuzzer,address,undefined,integer, no depends] [jammy]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
cpu: 4 # Increase CPU and memory to avoid timeout
|
||||
memory: 16G
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
|
||||
|
||||
task:
|
||||
name: 'multiprocess, i686, DEBUG'
|
||||
name: '[multiprocess, i686, DEBUG] [focal]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: medium
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
cpu: 4
|
||||
memory: 16G # The default memory is sometimes just a bit too small, so double everything
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
|
||||
|
||||
task:
|
||||
name: 'no wallet, libbitcoinkernel'
|
||||
name: '[no wallet, libbitcoinkernel] [bionic]'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
container:
|
||||
image: ubuntu:bionic
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
|
||||
|
||||
task:
|
||||
name: 'macOS-cross, gui, no tests'
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
persistent_worker:
|
||||
labels:
|
||||
type: small
|
||||
name: 'macOS 10.15 [gui, no tests] [focal]'
|
||||
<< : *BASE_TEMPLATE
|
||||
macos_sdk_cache:
|
||||
folder: "depends/SDKs/$MACOS_SDK"
|
||||
fingerprint_key: "$MACOS_SDK"
|
||||
<< : *MAIN_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac_cross.sh"
|
||||
MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
|
||||
|
||||
task:
|
||||
name: 'macOS 12 native x86_64 [gui, system sqlite] [no depends]'
|
||||
macos_instance:
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
|
||||
image: monterey-xcode-13.3 # https://cirrus-ci.org/guide/macOS
|
||||
<< : *MACOS_NATIVE_TASK_TEMPLATE
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
CI_USE_APT_INSTALL: "no"
|
||||
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
|
||||
FILE_ENV: "./ci/test/00_setup_env_mac_native_x86_64.sh"
|
||||
|
||||
task:
|
||||
name: 'ARM64 Android APK [focal]'
|
||||
<< : *BASE_TEMPLATE
|
||||
android_sdk_cache:
|
||||
folder: "depends/SDKs/android"
|
||||
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.2.8568313"
|
||||
depends_sources_cache:
|
||||
folder: "depends/sources"
|
||||
fingerprint_script: git rev-list -1 HEAD ./depends
|
||||
<< : *MAIN_TEMPLATE
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
env:
|
||||
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
|
||||
FILE_ENV: "./ci/test/00_setup_env_android.sh"
|
||||
|
||||
27
.github/ISSUE_TEMPLATE.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue!
|
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at
|
||||
https://github.com/bitcoin-core/gui/issues/
|
||||
-->
|
||||
|
||||
<!-- Describe the issue -->
|
||||
<!--- What behavior did you expect? -->
|
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
|
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
|
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
|
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
|
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
|
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. -->
|
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
|
||||
93
.github/ISSUE_TEMPLATE/bug.yml
vendored
93
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -1,93 +0,0 @@
|
||||
name: Bug report
|
||||
description: Submit a new bug report.
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
* General bitcoin questions and/or support requests should use Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
* For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
* If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running `memtest` and observe CPU temperature with a load-test tool such as `linpack` before creating an issue.
|
||||
|
||||
----
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: current-behaviour
|
||||
attributes:
|
||||
label: Current behaviour
|
||||
description: Tell us what went wrong
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: Expected behaviour
|
||||
description: Tell us what you expected to happen
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: |
|
||||
Tell us how to reproduce your bug. Please attach related screenshots if necessary.
|
||||
* Run-time or compile-time configuration options
|
||||
* Actions taken
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: |
|
||||
Please copy and paste any relevant log output or attach a debug log file.
|
||||
|
||||
You can find the debug.log in your [data dir.](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location)
|
||||
|
||||
Please be aware that the debug log might contain personally identifying information.
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: How did you obtain Bitcoin Core
|
||||
multiple: false
|
||||
options:
|
||||
- Compiled from source
|
||||
- Pre-built binaries
|
||||
- Package manager
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: core-version
|
||||
attributes:
|
||||
label: What version of Bitcoin Core are you using?
|
||||
description: Run `bitcoind --version` or in Bitcoin-QT use `Help > About Bitcoin Core`
|
||||
placeholder: e.g. v24.0.1 or master@e1bf547
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating system and version
|
||||
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: machine-specs
|
||||
attributes:
|
||||
label: Machine specifications
|
||||
description: |
|
||||
What are the specifications of the host machine?
|
||||
e.g. OS/CPU and disk type, network connectivity
|
||||
validations:
|
||||
required: false
|
||||
|
||||
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve (use this for suspected bugs only, if not sure, open a regular issue below)
|
||||
title: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- This issue tracker is only for technical issues related to Bitcoin Core.
|
||||
|
||||
General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.
|
||||
|
||||
For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
|
||||
|
||||
If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
|
||||
|
||||
<!-- Describe the issue -->
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
<!--- What behavior did you expect? -->
|
||||
|
||||
**Actual behavior**
|
||||
|
||||
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
|
||||
|
||||
**To reproduce**
|
||||
|
||||
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
|
||||
|
||||
**System information**
|
||||
|
||||
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
|
||||
|
||||
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
|
||||
|
||||
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
|
||||
|
||||
<!-- Any extra information that might be useful in the debugging process. -->
|
||||
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Bitcoin Core Security Policy
|
||||
url: https://github.com/bitcoin/bitcoin/blob/master/SECURITY.md
|
||||
about: View security policy
|
||||
- name: Bitcoin Core Developers
|
||||
url: https://bitcoincore.org
|
||||
about: Bitcoin Core homepage
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
36
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
36
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Suggest an idea for this project.
|
||||
labels: [Feature]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature
|
||||
attributes:
|
||||
label: Please describe the feature you'd like to see added.
|
||||
description: Attach screenshots or logs if applicable.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: related-problem
|
||||
attributes:
|
||||
label: Is your feature related to a problem, if so please describe it.
|
||||
description: Attach screenshots or logs if applicable.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Describe any alternatives you've considered
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Please leave any additional context
|
||||
validations:
|
||||
required: false
|
||||
22
.github/ISSUE_TEMPLATE/good_first_issue.md
vendored
Normal file
22
.github/ISSUE_TEMPLATE/good_first_issue.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Good first issue
|
||||
about: '(Regular devs only): Suggest a new good first issue'
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Needs the label "good first issue" assigned manually before or after opening -->
|
||||
|
||||
<!-- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution -->
|
||||
|
||||
<!-- Motivate the issue and explain the solution briefly -->
|
||||
|
||||
#### Useful skills:
|
||||
|
||||
<!-- (For example, “C++11 std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
|
||||
|
||||
#### Want to work on this issue?
|
||||
|
||||
For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
|
||||
44
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
44
.github/ISSUE_TEMPLATE/good_first_issue.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: Good First Issue
|
||||
description: (Regular devs only) Suggest a new good first issue
|
||||
labels: [good first issue]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please add the label "good first issue" manually before or after opening
|
||||
|
||||
A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution
|
||||
|
||||
Motivate the issue and explain the solution briefly
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: Motivate the issue
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Possible solution
|
||||
description: Describe a possible solution
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: useful-skills
|
||||
attributes:
|
||||
label: Useful Skills
|
||||
description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.
|
||||
value: |
|
||||
* Compiling Bitcoin Core from source
|
||||
* Running the C++ unit tests and the Python functional tests
|
||||
* ...
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Guidance for new contributors
|
||||
description: Please leave this to automatically add the footer for new contributors
|
||||
value: |
|
||||
Want to work on this issue?
|
||||
|
||||
For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/gui_issue.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/gui_issue.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: An issue or feature request related to the GUI
|
||||
about: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/
|
||||
title: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/
|
||||
labels: GUI
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Any report, issue or feature request related to the GUI should be reported at
|
||||
https://github.com/bitcoin-core/gui/issues/
|
||||
18
.github/ISSUE_TEMPLATE/gui_issue.yml
vendored
18
.github/ISSUE_TEMPLATE/gui_issue.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Issue or feature request related to the GUI
|
||||
description: Any report, issue or feature request related to the GUI
|
||||
labels: [GUI]
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: acknowledgement
|
||||
attributes:
|
||||
label: Issues, reports or feature requests related to the GUI should be opened directly on the GUI repo
|
||||
description: https://github.com/bitcoin-core/gui/issues/
|
||||
options:
|
||||
- label: I still think this issue should be opened here
|
||||
required: true
|
||||
- type: textarea
|
||||
id: gui-request
|
||||
attributes:
|
||||
label: Report
|
||||
validations:
|
||||
required: true
|
||||
335
.github/workflows/ci.yml
vendored
335
.github/workflows/ci.yml
vendored
@@ -1,335 +0,0 @@
|
||||
# Copyright (c) 2023 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
name: CI
|
||||
on:
|
||||
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request.
|
||||
pull_request:
|
||||
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push.
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error
|
||||
MAKEJOBS: '-j10'
|
||||
|
||||
jobs:
|
||||
test-each-commit:
|
||||
name: 'test each commit'
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
|
||||
timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below.
|
||||
env:
|
||||
MAX_COUNT: 6
|
||||
steps:
|
||||
- name: Determine fetch depth
|
||||
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: ${{ env.FETCH_DEPTH }}
|
||||
- name: Determine commit range
|
||||
run: |
|
||||
# Checkout HEAD~ and find the test base commit
|
||||
# Checkout HEAD~ because it would be wasteful to rerun tests on the PR
|
||||
# head commit that are already run by other jobs.
|
||||
git checkout HEAD~
|
||||
# Figure out test base commit by listing ancestors of HEAD, excluding
|
||||
# ancestors of the most recent merge commit, limiting the list to the
|
||||
# newest MAX_COUNT ancestors, ordering it from oldest to newest, and
|
||||
# taking the first one.
|
||||
#
|
||||
# If the branch contains up to MAX_COUNT ancestor commits after the
|
||||
# most recent merge commit, all of those commits will be tested. If it
|
||||
# contains more, only the most recent MAX_COUNT commits will be
|
||||
# tested.
|
||||
#
|
||||
# In the command below, the ^@ suffix is used to refer to all parents
|
||||
# of the merge commit as described in:
|
||||
# https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand_notations
|
||||
# and the ^ prefix is used to exclude these parents and all their
|
||||
# ancestors from the rev-list output as described in:
|
||||
# https://git-scm.com/docs/git-rev-list
|
||||
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV"
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang-15 ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
|
||||
- name: Compile and run tests
|
||||
run: |
|
||||
# Run tests on commits after the last merge commit and before the PR head commit
|
||||
# Use clang++, because it is a bit faster and uses less memory than g++
|
||||
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang-15 CXX=clang++-15 ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
|
||||
|
||||
macos-native-x86_64:
|
||||
name: 'macOS 13 native, x86_64, no depends, sqlite only, gui'
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
|
||||
# See: https://github.com/actions/runner-images#available-images.
|
||||
runs-on: macos-13
|
||||
|
||||
# No need to run on the read-only mirror, unless it is a PR.
|
||||
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
|
||||
|
||||
timeout-minutes: 120
|
||||
|
||||
env:
|
||||
DANGER_RUN_CI_ON_HOST: 1
|
||||
FILE_ENV: './ci/test/00_setup_env_mac_native.sh'
|
||||
BASE_ROOT_DIR: ${{ github.workspace }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Clang version
|
||||
run: |
|
||||
sudo xcode-select --switch /Applications/Xcode_15.0.app
|
||||
clang --version
|
||||
|
||||
- name: Install Homebrew packages
|
||||
env:
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||
run: |
|
||||
# A workaround for "The `brew link` step did not complete successfully" error.
|
||||
brew install python@3 || brew link --overwrite python@3
|
||||
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
|
||||
|
||||
- name: Set Ccache directory
|
||||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
restore-keys: ${{ github.job }}-ccache-
|
||||
|
||||
- name: CI script
|
||||
run: ./ci/test_run_all.sh
|
||||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
|
||||
win64-native:
|
||||
name: 'Win64 native, VS 2022'
|
||||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
|
||||
# See: https://github.com/actions/runner-images#available-images.
|
||||
runs-on: windows-2022
|
||||
|
||||
# No need to run on the read-only mirror, unless it is a PR.
|
||||
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
|
||||
|
||||
env:
|
||||
CCACHE_MAXSIZE: '200M'
|
||||
CI_CCACHE_VERSION: '4.7.5'
|
||||
CI_QT_CONF: '-release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
|
||||
CI_QT_DIR: 'qt-everywhere-src-5.15.11'
|
||||
CI_QT_URL: 'https://download.qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip'
|
||||
PYTHONUTF8: 1
|
||||
TEST_RUNNER_TIMEOUT_FACTOR: 40
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure Developer Command Prompt for Microsoft Visual C++
|
||||
# Using microsoft/setup-msbuild is not enough.
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Get tool information
|
||||
run: |
|
||||
msbuild -version | Out-File -FilePath "$env:GITHUB_WORKSPACE\msbuild_version"
|
||||
Get-Content -Path "$env:GITHUB_WORKSPACE\msbuild_version"
|
||||
$env:VCToolsVersion | Out-File -FilePath "$env:GITHUB_WORKSPACE\toolset_version"
|
||||
Write-Host "VCToolsVersion $(Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version")"
|
||||
$env:CI_QT_URL | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_url"
|
||||
$env:CI_QT_CONF | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_conf"
|
||||
py -3 --version
|
||||
|
||||
- name: Restore static Qt cache
|
||||
id: static-qt-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: C:\Qt_static
|
||||
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
|
||||
|
||||
- name: Build static Qt. Download
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: |
|
||||
curl --location --output C:\qt-src.zip %CI_QT_URL%
|
||||
choco install --yes --no-progress jom
|
||||
|
||||
- name: Build static Qt. Expand source archive
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
run: tar -xf C:\qt-src.zip -C C:\
|
||||
|
||||
- name: Build static Qt. Create build directory
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
Rename-Item -Path "C:\$env:CI_QT_DIR" -NewName "C:\qt-src"
|
||||
New-Item -ItemType Directory -Path "C:\qt-src\build"
|
||||
|
||||
- name: Build static Qt. Configure
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: ..\configure %CI_QT_CONF% -prefix C:\Qt_static
|
||||
|
||||
- name: Build static Qt. Build
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: jom
|
||||
|
||||
- name: Build static Qt. Install
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
working-directory: C:\qt-src\build
|
||||
shell: cmd
|
||||
run: jom install
|
||||
|
||||
- name: Save static Qt cache
|
||||
if: steps.static-qt-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: C:\Qt_static
|
||||
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
|
||||
|
||||
- name: Ccache installation cache
|
||||
id: ccache-installation-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
C:\ProgramData\chocolatey\lib\ccache
|
||||
C:\ProgramData\chocolatey\bin\ccache.exe
|
||||
C:\ccache\cl.exe
|
||||
key: ${{ github.job }}-ccache-installation-${{ env.CI_CCACHE_VERSION }}
|
||||
|
||||
- name: Install Ccache
|
||||
if: steps.ccache-installation-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
choco install --yes --no-progress ccache --version=$env:CI_CCACHE_VERSION
|
||||
New-Item -ItemType Directory -Path "C:\ccache"
|
||||
Copy-Item -Path "$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -Destination "C:\ccache\cl.exe"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/AppData/Local/ccache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
restore-keys: ${{ github.job }}-ccache-
|
||||
|
||||
- name: Using vcpkg with MSBuild
|
||||
run: |
|
||||
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
|
||||
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
|
||||
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_PLATFORM_TOOLSET_VERSION $env:VCToolsVersion)"
|
||||
.\vcpkg.exe --vcpkg-root "$env:VCPKG_INSTALLATION_ROOT" integrate install
|
||||
git rev-parse HEAD | Out-File -FilePath "$env:GITHUB_WORKSPACE\vcpkg_commit"
|
||||
Get-Content -Path "$env:GITHUB_WORKSPACE\vcpkg_commit"
|
||||
|
||||
- name: vcpkg tools cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: C:/vcpkg/downloads/tools
|
||||
key: ${{ github.job }}-vcpkg-tools
|
||||
|
||||
- name: vcpkg binary cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/AppData/Local/vcpkg/archives
|
||||
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }}
|
||||
|
||||
- name: Generate project files
|
||||
run: py -3 build_msvc\msvc-autogen.py
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
msbuild build_msvc\bitcoin.sln -property:CLToolPath=C:\ccache;CLToolExe=cl.exe;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
|
||||
|
||||
- name: Ccache stats
|
||||
run: ccache --show-stats
|
||||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ~/AppData/Local/ccache
|
||||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
|
||||
- name: Run unit tests
|
||||
run: src\test_bitcoin.exe -l test_suite
|
||||
|
||||
- name: Run benchmarks
|
||||
run: src\bench_bitcoin.exe -sanity-check
|
||||
|
||||
- name: Run util tests
|
||||
run: py -3 test\util\test_runner.py
|
||||
|
||||
- name: Run rpcauth test
|
||||
run: py -3 test\util\rpcauth-test.py
|
||||
|
||||
- name: Run functional tests
|
||||
env:
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
shell: cmd
|
||||
run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
|
||||
|
||||
asan-lsan-ubsan-integer-no-depends-usdt:
|
||||
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
|
||||
runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
|
||||
# No need to run on the read-only mirror, unless it is a PR.
|
||||
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Ccache directory
|
||||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
restore-keys: ${{ github.job }}-ccache-
|
||||
|
||||
- name: Enable bpfcc script
|
||||
# In the image build step, no external environment variables are available,
|
||||
# so any settings will need to be written to the settings env file:
|
||||
run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh
|
||||
|
||||
- name: CI script
|
||||
run: ./ci/test_run_all.sh
|
||||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
|
||||
key: ${{ github.job }}-ccache-${{ github.run_id }}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -74,7 +74,7 @@ src/qt/bitcoin-qt.includes
|
||||
|
||||
*.log
|
||||
*.trs
|
||||
*.zip
|
||||
*.dmg
|
||||
|
||||
*.json.h
|
||||
*.raw.h
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.9.18
|
||||
3.6.12
|
||||
|
||||
@@ -107,7 +107,7 @@ each_dict_entry_on_separate_line=True
|
||||
i18n_comment=
|
||||
|
||||
# The i18n function call names. The presence of this function stops
|
||||
# reformatting on that line, because the string it has cannot be moved
|
||||
# reformattting on that line, because the string it has cannot be moved
|
||||
# away from the i18n comment.
|
||||
i18n_function_call=
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-027x]
|
||||
[o:bitcoin:p:bitcoin:r:qt-translation-024x]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.xlf
|
||||
source_file = src/qt/locale/bitcoin_en.xlf
|
||||
source_lang = en
|
||||
|
||||
@@ -66,10 +66,9 @@ Discussion about codebase improvements happens in GitHub issues and pull
|
||||
requests.
|
||||
|
||||
The developer
|
||||
[mailing list](https://groups.google.com/g/bitcoindev)
|
||||
[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev)
|
||||
should be used to discuss complicated or controversial consensus or P2P protocol changes before working on
|
||||
a patch set.
|
||||
Archives can be found on [https://gnusha.org/pi/bitcoindev/](https://gnusha.org/pi/bitcoindev/).
|
||||
|
||||
|
||||
Contributor Workflow
|
||||
|
||||
4
COPYING
4
COPYING
@@ -1,7 +1,7 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2024 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2024 Bitcoin Developers
|
||||
Copyright (c) 2009-2022 The Bitcoin Core developers
|
||||
Copyright (c) 2009-2022 Bitcoin Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
31
Makefile.am
31
Makefile.am
@@ -14,6 +14,8 @@ endif
|
||||
.PHONY: deploy FORCE
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
export PYTHONPATH
|
||||
|
||||
if BUILD_BITCOIN_LIBS
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libbitcoinconsensus.pc
|
||||
@@ -35,7 +37,7 @@ space := $(empty) $(empty)
|
||||
|
||||
OSX_APP=Bitcoin-Qt.app
|
||||
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
|
||||
OSX_ZIP = $(OSX_VOLNAME).zip
|
||||
OSX_DMG = $(OSX_VOLNAME).dmg
|
||||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
||||
@@ -122,16 +124,15 @@ osx_volname:
|
||||
echo $(OSX_VOLNAME) >$@
|
||||
|
||||
if BUILD_DARWIN
|
||||
$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip
|
||||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -dmg
|
||||
|
||||
deploydir: $(OSX_ZIP)
|
||||
deploydir: $(OSX_DMG)
|
||||
else !BUILD_DARWIN
|
||||
APP_DIST_DIR=$(top_builddir)/dist
|
||||
|
||||
$(OSX_ZIP): deploydir
|
||||
if [ -n "$(SOURCE_DATE_EPOCH)" ]; then find $(APP_DIST_DIR) -exec touch -d @$(SOURCE_DATE_EPOCH) {} +; fi
|
||||
cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@
|
||||
$(OSX_DMG): deploydir
|
||||
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
|
||||
|
||||
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
|
||||
@@ -139,7 +140,7 @@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PAC
|
||||
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
|
||||
endif !BUILD_DARWIN
|
||||
|
||||
deploy: $(OSX_ZIP)
|
||||
deploy: $(OSX_DMG)
|
||||
endif
|
||||
|
||||
$(BITCOIN_QT_BIN): FORCE
|
||||
@@ -187,7 +188,7 @@ $(COV_TOOL_WRAPPER):
|
||||
@chmod +x $(COV_TOOL_WRAPPER)
|
||||
|
||||
baseline.info: $(COV_TOOL_WRAPPER)
|
||||
$(LCOV) $(LCOV_OPTS) -c -i -d $(abs_builddir)/src -o $@
|
||||
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
|
||||
|
||||
baseline_filtered.info: baseline.info
|
||||
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
||||
@@ -221,13 +222,13 @@ functional_test_filtered.info: functional_test.info
|
||||
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
||||
|
||||
fuzz_coverage.info: fuzz_filtered.info
|
||||
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
|
||||
test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info
|
||||
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
||||
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
||||
|
||||
total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info
|
||||
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||
|
||||
fuzz.coverage/.dirstamp: fuzz_coverage.info
|
||||
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
||||
@@ -310,13 +311,9 @@ EXTRA_DIST += \
|
||||
test/util/data/txcreatesignv1.hex \
|
||||
test/util/data/txcreatesignv1.json \
|
||||
test/util/data/txcreatesignv2.hex \
|
||||
test/util/data/txreplace1.hex \
|
||||
test/util/data/txreplacenoinputs.hex \
|
||||
test/util/data/txreplaceomittedn.hex \
|
||||
test/util/data/txreplacesingleinput.hex \
|
||||
test/util/rpcauth-test.py
|
||||
|
||||
CLEANFILES = $(OSX_ZIP) $(BITCOIN_WIN_INSTALLER)
|
||||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
|
||||
|
||||
17
REVIEWERS
Normal file
17
REVIEWERS
Normal file
@@ -0,0 +1,17 @@
|
||||
# ==============================================================================
|
||||
# Bitcoin Core REVIEWERS
|
||||
# ==============================================================================
|
||||
|
||||
# Configuration of automated review requests for the bitcoin/bitcoin repo
|
||||
# via DrahtBot.
|
||||
|
||||
# Order is not important; if a modified file or directory matches a fnmatch,
|
||||
# the reviewer will be mentioned in a PR comment requesting a review.
|
||||
|
||||
# Regular contributors are free to add their names to specific directories or
|
||||
# files provided that they are willing to provide a review.
|
||||
|
||||
# Absence from this list should not be interpreted as a discouragement to
|
||||
# review a pull request. Peer review is always welcome and is a critical
|
||||
# component of the progress of the codebase. Information on peer review
|
||||
# guidelines can be found in the CONTRIBUTING.md doc.
|
||||
@@ -15,6 +15,6 @@ The following keys may be used to communicate sensitive information to developer
|
||||
|------|-------------|
|
||||
| Pieter Wuille | 133E AC17 9436 F14A 5CF1 B794 860F EB80 4E66 9320 |
|
||||
| Michael Ford | E777 299F C265 DD04 7930 70EB 944D 35F9 AC3D B76A |
|
||||
| Ava Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 |
|
||||
| Andrew Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 |
|
||||
|
||||
You can import a key by running the following command with that individual’s fingerprint: `gpg --keyserver hkps://keys.openpgp.org --recv-keys "<fingerprint>"` Ensure that you put quotes around fingerprints containing spaces.
|
||||
|
||||
13
autogen.sh
13
autogen.sh
@@ -14,16 +14,3 @@ fi
|
||||
command -v autoreconf >/dev/null || \
|
||||
(echo "configuration failed, please install autoconf first" && exit 1)
|
||||
autoreconf --install --force --warnings=all
|
||||
|
||||
if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then
|
||||
chmod ug+w build-aux/config.guess
|
||||
chmod ug+w src/secp256k1/build-aux/config.guess
|
||||
cp depends/config.guess build-aux
|
||||
cp depends/config.guess src/secp256k1/build-aux
|
||||
fi
|
||||
if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then
|
||||
chmod ug+w build-aux/config.sub
|
||||
chmod ug+w src/secp256k1/build-aux/config.sub
|
||||
cp depends/config.sub build-aux
|
||||
cp depends/config.sub src/secp256k1/build-aux
|
||||
fi
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ headers of a particular version (or newer)
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates
|
||||
@@ -17,14 +17,12 @@
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS)
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# Note that this macro has been modified compared to upstream.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
@@ -61,10 +59,26 @@ AC_ARG_WITH([boost],
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries.
|
||||
Note that this will override library path detection,
|
||||
so use this parameter only if default library detection fails
|
||||
and you know exactly where your boost libraries are located.])],
|
||||
[
|
||||
AS_IF([test -d "$withval"],
|
||||
[_AX_BOOST_BASE_boost_lib_path="$withval"],
|
||||
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
|
||||
],
|
||||
[_AX_BOOST_BASE_boost_lib_path=""])
|
||||
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
AS_IF([test "x$want_boost" = "xyes"],
|
||||
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
])
|
||||
|
||||
|
||||
@@ -125,6 +139,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
@@ -141,17 +156,27 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)])
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
|
||||
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
|
||||
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
@@ -168,8 +193,11 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
@@ -188,6 +216,14 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
dnl if we found something and BOOST_LDFLAGS was unset before
|
||||
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
@@ -206,6 +242,12 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
@@ -217,9 +259,10 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -227,6 +270,8 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
@@ -253,4 +298,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
|
||||
])
|
||||
|
||||
@@ -983,7 +983,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
|
||||
|
||||
#error "This is not a C++ compiler"
|
||||
|
||||
#elif __cplusplus < 201709L // Temporary patch on top of upstream to allow g++-10
|
||||
#elif __cplusplus < 202002L
|
||||
|
||||
#error "This is not a C++20 compiler"
|
||||
|
||||
|
||||
42
build-aux/m4/bitcoin_runtime_lib.m4
Normal file
42
build-aux/m4/bitcoin_runtime_lib.m4
Normal file
@@ -0,0 +1,42 @@
|
||||
# On some platforms clang builtin implementations
|
||||
# require compiler-rt as a runtime library to use.
|
||||
#
|
||||
# See:
|
||||
# - https://bugs.llvm.org/show_bug.cgi?id=28629
|
||||
|
||||
m4_define([_CHECK_RUNTIME_testbody], [[
|
||||
bool f(long long x, long long y, long long* p)
|
||||
{
|
||||
return __builtin_mul_overflow(x, y, p);
|
||||
}
|
||||
int main() { return 0; }
|
||||
]])
|
||||
|
||||
AC_DEFUN([CHECK_RUNTIME_LIB], [
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
AC_MSG_CHECKING([for __builtin_mul_overflow])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_SOURCE([_CHECK_RUNTIME_testbody])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_BUILTIN_MUL_OVERFLOW], [1], [Define if you have a working __builtin_mul_overflow])
|
||||
],
|
||||
[
|
||||
ax_check_save_flags="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS --rtlib=compiler-rt -lgcc_s"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_SOURCE([_CHECK_RUNTIME_testbody])],
|
||||
[
|
||||
AC_MSG_RESULT([yes, with additional linker flags])
|
||||
RUNTIME_LDFLAGS="--rtlib=compiler-rt -lgcc_s"
|
||||
AC_DEFINE([HAVE_BUILTIN_MUL_OVERFLOW], [1], [Define if you have a working __builtin_mul_overflow])
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
LDFLAGS="$ax_check_save_flags"
|
||||
])
|
||||
|
||||
AC_LANG_POP
|
||||
AC_SUBST([RUNTIME_LDFLAGS])
|
||||
])
|
||||
@@ -4,10 +4,8 @@ dnl permitted in any medium without royalty provided the copyright notice
|
||||
dnl and this notice are preserved. This file is offered as-is, without any
|
||||
dnl warranty.
|
||||
|
||||
# Clang, when building for 32-bit,
|
||||
# and linking against libstdc++, requires linking with
|
||||
# -latomic if using the C++ atomic library.
|
||||
# Can be tested with: clang++ -std=c++20 test.cpp -m32
|
||||
# Some versions of gcc/libstdc++ require linking with -latomic if
|
||||
# using the C++ atomic library.
|
||||
#
|
||||
# Sourced from http://bugs.debian.org/797228
|
||||
|
||||
@@ -24,14 +22,9 @@ m4_define([_CHECK_ATOMIC_testbody], [[
|
||||
|
||||
std::atomic<std::chrono::seconds> t{0s};
|
||||
t.store(2s);
|
||||
auto t1 = t.load();
|
||||
t.compare_exchange_strong(t1, 3s);
|
||||
|
||||
std::atomic<double> d{};
|
||||
d.store(3.14);
|
||||
auto d1 = d.load();
|
||||
|
||||
std::atomic<int64_t> a{};
|
||||
|
||||
int64_t v = 5;
|
||||
int64_t r = a.fetch_add(v);
|
||||
return static_cast<int>(r);
|
||||
|
||||
47
build-aux/m4/l_filesystem.m4
Normal file
47
build-aux/m4/l_filesystem.m4
Normal file
@@ -0,0 +1,47 @@
|
||||
dnl Copyright (c) 2022 The Bitcoin Core developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# GCC 8.1 and earlier requires -lstdc++fs
|
||||
# Clang 8.0.0 (libc++) and earlier requires -lc++fs
|
||||
|
||||
m4_define([_CHECK_FILESYSTEM_testbody], [[
|
||||
#include <filesystem>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
int main() {
|
||||
(void)fs::current_path().root_name();
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([CHECK_FILESYSTEM], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_MSG_CHECKING([whether std::filesystem can be used without link library])
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
SAVED_LIBS="$LIBS"
|
||||
LIBS="$SAVED_LIBS -lstdc++fs"
|
||||
AC_MSG_CHECKING([whether std::filesystem needs -lstdc++fs])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([whether std::filesystem needs -lc++fs])
|
||||
LIBS="$SAVED_LIBS -lc++fs"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_FAILURE([cannot figure out how to use std::filesystem])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP
|
||||
])
|
||||
@@ -7,9 +7,7 @@ Visual Studio 2022 is minimum required to build Bitcoin Core.
|
||||
|
||||
Solution and project files to build with `msbuild` or Visual Studio can be found in the `build_msvc` directory.
|
||||
|
||||
To build Bitcoin Core from the command-line, it is sufficient to only install the [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) component.
|
||||
|
||||
The "Desktop development with C++" workload must be installed as well.
|
||||
To build Bitcoin Core from the command-line, it is sufficient to only install the Visual Studio Build Tools component.
|
||||
|
||||
Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows.md).
|
||||
|
||||
@@ -17,7 +15,7 @@ Building with Visual Studio is an alternative to the Linux based [cross-compiler
|
||||
Prerequisites
|
||||
---------------------
|
||||
To build [dependencies](../doc/dependencies.md) (except for [Qt](#qt)),
|
||||
the default approach is to use the [vcpkg](https://vcpkg.io) package manager from Microsoft:
|
||||
the default approach is to use the [vcpkg](https://docs.microsoft.com/en-us/cpp/vcpkg) package manager from Microsoft:
|
||||
|
||||
1. [Install](https://vcpkg.io/en/getting-started.html) vcpkg.
|
||||
|
||||
@@ -32,9 +30,7 @@ Qt
|
||||
---------------------
|
||||
To build Bitcoin Core with the GUI, a static build of Qt is required.
|
||||
|
||||
1. Download a single ZIP archive of Qt source code from https://download.qt.io/archive/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.11.zip`](https://download.qt.io/archive/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
|
||||
|
||||
> 💡 **Tip:** If you use the default path with "Extract All" for the Qt source code zip file, and end up with something like `C:\dev\qt-everywhere-opensource-src-5.15.11\qt-everywhere-src-5.15.11`, you are likely to encounter a "path too long" error when building. To fix the problem move the source files to a shorter path such as the recommended `C:\dev\qt-source`.
|
||||
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.5.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
|
||||
|
||||
2. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands:
|
||||
```cmd
|
||||
@@ -71,7 +67,7 @@ Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio.
|
||||
|
||||
Security
|
||||
---------------------
|
||||
[Base address randomization](https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
|
||||
[Base address randomization](https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-160) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
|
||||
|
||||
To check if `bitcoind` has `RandomizedBaseAddress` enabled or disabled run
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
|
||||
<Project>{0667528c-d734-4009-adf9-c0d6c4a5a5a6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
<Project>{7c87e378-df58-482e-aa2f-1bc129bc19ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_crypto\libbitcoin_crypto.vcxproj">
|
||||
<Project>{6190199c-6cf4-4dad-bfbd-93fa72a760c1}</Project>
|
||||
</ProjectReference>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<ResourceCompile Include="..\..\src\qt\res\bitcoin-qt-res.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
|
||||
@@ -58,7 +58,7 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/LTCG:OFF</AdditionalOptions>
|
||||
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
@@ -72,6 +72,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4206</AdditionalOptions>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ClCompile Include="..\..\src\bitcoin-tx.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ClCompile Include="..\..\src\bitcoin-util.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
|
||||
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.452
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_consensus", "libbitcoin_consensus\libbitcoin_consensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoinconsensus", "libbitcoinconsensus\libbitcoinconsensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bitcoind", "bitcoind\bitcoind.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
|
||||
EndProject
|
||||
|
||||
@@ -38,9 +38,21 @@
|
||||
/* Define to 1 to enable SQLite wallet */
|
||||
#define USE_SQLITE 1
|
||||
|
||||
/* Define this symbol to enable ZMQ functions */
|
||||
/* Define to 1 to enable ZMQ functions */
|
||||
#define ENABLE_ZMQ 1
|
||||
|
||||
/* define if the Boost library is available */
|
||||
#define HAVE_BOOST /**/
|
||||
|
||||
/* define if external signer support is enabled (requires Boost::Process) */
|
||||
#define ENABLE_EXTERNAL_SIGNER /**/
|
||||
|
||||
/* Define this symbol if the consensus lib has been built */
|
||||
#define HAVE_CONSENSUS_LIB 1
|
||||
|
||||
/* define if the compiler supports basic C++20 syntax */
|
||||
#define HAVE_CXX20 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_BE16TOH 0
|
||||
@@ -109,9 +121,49 @@
|
||||
*/
|
||||
#define HAVE_DECL_SETSID 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRERROR_R 0
|
||||
|
||||
/* Define if the dllexport attribute is supported. */
|
||||
#define HAVE_DLLEXPORT_ATTRIBUTE 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/miniupnpc.h> header file. */
|
||||
#define HAVE_MINIUPNPC_MINIUPNPC_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/upnpcommands.h> header file. */
|
||||
#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1
|
||||
|
||||
/* Define to 1 if you have the <miniupnpc/upnperrors.h> header file. */
|
||||
#define HAVE_MINIUPNPC_UPNPERRORS_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
|
||||
@@ -73,20 +73,16 @@
|
||||
Replace="@USE_SQLITE_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@BUILD_BITCOIN_CLI_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@BUILD_BITCOIN_UTIL_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@BUILD_BITCOIN_WALLET_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@BUILD_BITCOIND_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@ENABLE_FUZZ_BINARY_TRUE@" By="#"></ReplaceInFile>
|
||||
Replace="@ENABLE_FUZZ_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@ENABLE_ZMQ_TRUE@" By=""></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@ENABLE_EXTERNAL_SIGNER_TRUE@" By="#"></ReplaceInFile>
|
||||
<ReplaceInFile FilePath="$(ConfigIniOut)"
|
||||
Replace="@ENABLE_USDT_TRACEPOINTS_TRUE@" By="#"></ReplaceInFile>
|
||||
Replace="@ENABLE_EXTERNAL_SIGNER_TRUE@" By=""></ReplaceInFile>
|
||||
</Target>
|
||||
<Import Project="..\common.vcxproj" />
|
||||
</Project>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
@@ -88,9 +88,9 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4018;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -98,6 +98,9 @@
|
||||
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalOptions>/ignore:4221</AdditionalOptions>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="common.init.vcxproj.user" Condition="Exists('common.init.vcxproj.user')" />
|
||||
</Project>
|
||||
|
||||
@@ -13,10 +13,4 @@
|
||||
<QtDebugLibraries>$(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyled.lib;$(QtLibraryDir)\*d.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib</QtDebugLibraries>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>QT_NO_KEYWORDS;QT_USE_QSTRINGBUILDER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\common\url.cpp" />
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\util\url.cpp" />
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
<ClCompile Include="..\..\src\arith_uint256.cpp" />
|
||||
<ClCompile Include="..\..\src\consensus\merkle.cpp" />
|
||||
<ClCompile Include="..\..\src\consensus\tx_check.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\aes.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\chacha20.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\hmac_sha256.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\hmac_sha512.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\ripemd160.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\sha1.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\sha256.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\sha256_sse4.cpp" />
|
||||
<ClCompile Include="..\..\src\crypto\sha512.cpp" />
|
||||
<ClCompile Include="..\..\src\hash.cpp" />
|
||||
<ClCompile Include="..\..\src\primitives\block.cpp" />
|
||||
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
|
||||
@@ -50,8 +50,8 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>HAVE_CRC32C=0;HAVE_SNAPPY=0;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4244;4267;4722</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>HAVE_CRC32C=0;HAVE_SNAPPY=0;__STDC_LIMIT_MACROS;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>..\..\src\leveldb;..\..\src\leveldb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<DisableSpecificWarnings>4060;4065;4146;4244;4267</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4060;4065;4146;4244;4267;4554</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>HAVE_CLMUL;DISABLE_DEFAULT_FIELDS;ENABLE_FIELD_32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;ENABLE_MODULE_ELLSWIFT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<UndefinePreprocessorDefinitions>USE_ASM_X86_64;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4146;4244;4267</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4146;4244;4267;4334</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
15
build_msvc/libsecp256k1_config.h
Normal file
15
build_msvc/libsecp256k1_config.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2013, 2014 Pieter Wuille *
|
||||
* Distributed under the MIT software license, see the accompanying *
|
||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef BITCOIN_LIBSECP256K1_CONFIG_H
|
||||
#define BITCOIN_LIBSECP256K1_CONFIG_H
|
||||
|
||||
#undef USE_ASM_X86_64
|
||||
|
||||
#define ECMULT_GEN_PREC_BITS 4
|
||||
#define ECMULT_WINDOW_SIZE 15
|
||||
|
||||
#endif // BITCOIN_LIBSECP256K1_CONFIG_H
|
||||
@@ -8,7 +8,6 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\wallet\test\util.cpp" />
|
||||
@SOURCE_FILES@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -111,6 +111,7 @@ def main():
|
||||
set_properties(vcxproj_filename, '@SOURCE_FILES@\n', content)
|
||||
parse_config_into_btc_config()
|
||||
copyfile(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h'), os.path.join(SOURCE_DIR, 'config/bitcoin-config.h'))
|
||||
copyfile(os.path.join(SOURCE_DIR,'../build_msvc/libsecp256k1_config.h'), os.path.join(SOURCE_DIR, 'secp256k1/src/libsecp256k1-config.h'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\init\bitcoin-qt.cpp" />
|
||||
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\optiontests.cpp" />
|
||||
@@ -26,7 +27,7 @@
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
|
||||
@@ -53,9 +54,6 @@
|
||||
<ProjectReference Include="..\libbitcoin_zmq\libbitcoin_zmq.vcxproj">
|
||||
<Project>{792d487f-f14c-49fc-a9de-3fc150f31c3f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libtest_util\libtest_util.vcxproj">
|
||||
<Project>{1e065f03-3566-47d0-8fa9-daa72b084e7d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libleveldb\libleveldb.vcxproj">
|
||||
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
|
||||
</ProjectReference>
|
||||
@@ -76,7 +74,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/LTCG:OFF</AdditionalOptions>
|
||||
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
@@ -86,6 +84,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4206</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\test\*_properties.cpp" />
|
||||
<ClCompile Include="..\..\src\test\*_tests.cpp" Exclude="..\..\src\test\ipc_tests.cpp" />
|
||||
<ClCompile Include="..\..\src\test\*_tests.cpp" />
|
||||
<ClCompile Include="..\..\src\test\gen\*_gen.cpp" />
|
||||
<ClCompile Include="..\..\src\test\main.cpp" />
|
||||
<ClCompile Include="..\..\src\test\util\*.cpp" />
|
||||
@@ -22,7 +22,7 @@
|
||||
<ProjectReference Include="..\libminisketch\libminisketch.vcxproj">
|
||||
<Project>{542007e3-be0d-4b0d-a6b0-aa8813e2558d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
|
||||
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
|
||||
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
|
||||
@@ -59,11 +59,6 @@
|
||||
<Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<DisableSpecificWarnings>4018;4244;4267;4703;4715;4805</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Target Name="RawBenchHeaderGen" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>There was an error executing the JSON test header generation task.</ErrorText>
|
||||
@@ -73,7 +68,7 @@
|
||||
<RawTestFile Include="..\..\src\test\data\*.raw" />
|
||||
</ItemGroup>
|
||||
<HeaderFromHexdump RawFilePath="%(RawTestFile.FullPath)" HeaderFilePath="%(RawTestFile.FullPath).h" SourceHeader="static unsigned const char %(RawTestFile.Filename)_raw[] = {" SourceFooter="};" />
|
||||
<HeaderFromHexdump RawFilePath="%(JsonTestFile.FullPath)" HeaderFilePath="%(JsonTestFile.FullPath).h" SourceHeader="#include <string>
namespace json_tests{ static const std::string %(JsonTestFile.Filename){" SourceFooter="};}" />
|
||||
<HeaderFromHexdump RawFilePath="%(JsonTestFile.FullPath)" HeaderFilePath="%(JsonTestFile.FullPath).h" SourceHeader="namespace json_tests{ static unsigned const char %(JsonTestFile.Filename)[] = {" SourceFooter="};}" />
|
||||
</Target>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -3,19 +3,15 @@
|
||||
"version-string": "1",
|
||||
"dependencies": [
|
||||
"berkeleydb",
|
||||
"boost-date-time",
|
||||
"boost-multi-index",
|
||||
"boost-process",
|
||||
"boost-signals2",
|
||||
"boost-test",
|
||||
"libevent",
|
||||
"sqlite3",
|
||||
"zeromq"
|
||||
],
|
||||
"builtin-baseline": "9edb1b8e590cc086563301d735cae4b6e732d2d2",
|
||||
"overrides": [
|
||||
{
|
||||
"name": "libevent",
|
||||
"version": "2.1.12#7"
|
||||
}
|
||||
"features": ["thread"]
|
||||
},
|
||||
"zeromq"
|
||||
]
|
||||
}
|
||||
|
||||
25
ci/README.md
25
ci/README.md
@@ -8,23 +8,29 @@ Be aware that the tests will be built and run in-place, so please run at your ow
|
||||
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
|
||||
|
||||
The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory.
|
||||
While it should be fine to run
|
||||
While most of the actions are done inside a docker container, this is not possible for all. Thus, cache directories,
|
||||
such as the depends cache, previous release binaries, or ccache, are mounted as read-write into the docker container. While it should be fine to run
|
||||
the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and
|
||||
testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci
|
||||
system in a virtual machine with a Linux operating system of your choice.
|
||||
|
||||
To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
|
||||
requires `bash`, `docker`, and `python3` to be installed. To run on different architectures than the host `qemu` is also required. To install all requirements on Ubuntu, run
|
||||
requires `docker` to be installed. To install all requirements on Ubuntu, run
|
||||
|
||||
```
|
||||
sudo apt install bash docker.io python3 qemu-user-static
|
||||
sudo apt install docker.io bash
|
||||
```
|
||||
|
||||
It is recommended to run the ci system in a clean env. To run the test stage
|
||||
with a specific configuration,
|
||||
To run the default test stage,
|
||||
|
||||
```
|
||||
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
|
||||
./ci/test_run_all.sh
|
||||
```
|
||||
|
||||
To run the test stage with a specific configuration,
|
||||
|
||||
```
|
||||
FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
|
||||
```
|
||||
|
||||
### Configurations
|
||||
@@ -39,11 +45,14 @@ the system package manager to install build dependencies. This guarantees that
|
||||
the tester is using the same versions as the release builds, which also use
|
||||
`./depends`.
|
||||
|
||||
If no `FILE_ENV` has been specified or values are left out, `00_setup_env.sh`
|
||||
is used as the default configuration with fallback values.
|
||||
|
||||
It is also possible to force a specific configuration without modifying the
|
||||
file. For example,
|
||||
|
||||
```
|
||||
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
|
||||
MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
|
||||
```
|
||||
|
||||
The files starting with `0n` (`n` greater than 0) are the scripts that are run
|
||||
@@ -52,5 +61,5 @@ in order.
|
||||
### Cache
|
||||
|
||||
In order to avoid rebuilding all dependencies for each build, the binaries are
|
||||
cached and reused when possible. Changes in the dependency-generator will
|
||||
cached and re-used when possible. Changes in the dependency-generator will
|
||||
trigger cache-invalidation and rebuilds as necessary.
|
||||
|
||||
@@ -1,59 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
export PATH=$PWD/ci/retry:$PATH
|
||||
|
||||
${CI_RETRY_EXE} apt-get update
|
||||
# Lint dependencies:
|
||||
# - automake pkg-config libtool (for lint_includes_build_config)
|
||||
# - curl/xz-utils (to install shellcheck)
|
||||
# - git (used in many lint scripts)
|
||||
# - gpg (used by verify-commits)
|
||||
${CI_RETRY_EXE} apt-get install -y automake pkg-config libtool curl xz-utils git gpg
|
||||
${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq
|
||||
update-alternatives --install /usr/bin/clang-format clang-format "$(which clang-format-9 )" 100
|
||||
update-alternatives --install /usr/bin/clang-format-diff clang-format-diff "$(which clang-format-diff-9)" 100
|
||||
|
||||
PYTHON_PATH="/python_build"
|
||||
if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
||||
(
|
||||
${CI_RETRY_EXE} git clone https://github.com/pyenv/pyenv.git
|
||||
cd pyenv/plugins/python-build || exit 1
|
||||
./install.sh
|
||||
)
|
||||
# For dependencies see https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
${CI_RETRY_EXE} apt-get install -y build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
|
||||
clang
|
||||
env CC=clang python-build "$(cat "./.python-version")" "${PYTHON_PATH}"
|
||||
fi
|
||||
export PATH="${PYTHON_PATH}/bin:${PATH}"
|
||||
command -v python3
|
||||
python3 --version
|
||||
|
||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
||||
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
|
||||
${CI_RETRY_EXE} apt-get install -y cargo
|
||||
(
|
||||
cd ./test/lint/test_runner || exit 1
|
||||
cargo build
|
||||
mkdir -p "${LINT_RUNNER_PATH}"
|
||||
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
|
||||
)
|
||||
fi
|
||||
|
||||
${CI_RETRY_EXE} pip3 install \
|
||||
codespell==2.2.5 \
|
||||
flake8==6.1.0 \
|
||||
lief==0.13.2 \
|
||||
mypy==1.4.1 \
|
||||
pyzmq==25.1.0 \
|
||||
vulture==2.6
|
||||
${CI_RETRY_EXE} pip3 install codespell==2.1.0
|
||||
${CI_RETRY_EXE} pip3 install flake8==4.0.1
|
||||
${CI_RETRY_EXE} pip3 install mypy==0.942
|
||||
${CI_RETRY_EXE} pip3 install pyzmq==22.3.0
|
||||
${CI_RETRY_EXE} pip3 install vulture==2.3
|
||||
|
||||
SHELLCHECK_VERSION=v0.8.0
|
||||
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \
|
||||
tar --xz -xf - --directory /tmp/
|
||||
mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
|
||||
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
|
||||
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -n "$LOCAL_BRANCH" ]; then
|
||||
# To faithfully recreate CI linting locally, specify all commits on the current
|
||||
# branch.
|
||||
COMMIT_RANGE="$(git merge-base HEAD master)..HEAD"
|
||||
elif [ -n "$CIRRUS_PR" ]; then
|
||||
COMMIT_RANGE="HEAD~..HEAD"
|
||||
echo
|
||||
git log --no-merges --oneline "$COMMIT_RANGE"
|
||||
echo
|
||||
GIT_HEAD=$(git rev-parse HEAD)
|
||||
if [ -n "$CIRRUS_PR" ]; then
|
||||
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
|
||||
test/lint/commit-script-check.sh "$COMMIT_RANGE"
|
||||
else
|
||||
COMMIT_RANGE="SKIP_EMPTY_NOT_A_PR"
|
||||
fi
|
||||
export COMMIT_RANGE
|
||||
|
||||
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
|
||||
# This only checks that the trees are pure subtrees, it is not doing a full
|
||||
# check with -r to not have to fetch all the remotes.
|
||||
test/lint/git-subtree-check.sh src/crypto/ctaes
|
||||
test/lint/git-subtree-check.sh src/secp256k1
|
||||
test/lint/git-subtree-check.sh src/minisketch
|
||||
test/lint/git-subtree-check.sh src/leveldb
|
||||
test/lint/git-subtree-check.sh src/crc32c
|
||||
test/lint/check-doc.py
|
||||
test/lint/all-lint.py
|
||||
|
||||
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
||||
# Sanity check only the last few commits to get notified of missing sigs,
|
||||
@@ -38,3 +36,8 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
|
||||
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys "${KEYS[@]}" &&
|
||||
./contrib/verify-commits/verify-commits.py;
|
||||
fi
|
||||
|
||||
if [ -n "$COMMIT_RANGE" ]; then
|
||||
echo
|
||||
git log --no-merges --oneline "$COMMIT_RANGE"
|
||||
fi
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
# Fixes permission issues when there is a container UID/GID mismatch with the owner
|
||||
# of the mounted bitcoin src dir.
|
||||
git config --global --add safe.directory /bitcoin
|
||||
|
||||
export PATH="/python_build/bin:${PATH}"
|
||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -1,24 +0,0 @@
|
||||
# Copyright (c) The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
# See test/lint/README.md for usage.
|
||||
|
||||
FROM debian:bookworm
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LC_ALL=C.UTF-8
|
||||
|
||||
COPY ./.python-version /.python-version
|
||||
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
|
||||
COPY ./ci/lint/04_install.sh /install.sh
|
||||
COPY ./test/lint/test_runner /test/lint/test_runner
|
||||
|
||||
RUN /install.sh && \
|
||||
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
|
||||
chmod 755 /entrypoint.sh && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
WORKDIR /bitcoin
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -8,5 +8,4 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
set -o errexit; source ./ci/test/00_setup_env.sh
|
||||
set -o errexit; source ./ci/lint/04_install.sh
|
||||
set -o errexit
|
||||
./ci/lint/06_script.sh
|
||||
set -o errexit; source ./ci/lint/06_script.sh
|
||||
|
||||
@@ -1,30 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
set -ex
|
||||
|
||||
# The source root dir, usually from git, usually read-only.
|
||||
# The root dir.
|
||||
# The ci system copies this folder.
|
||||
BASE_READ_ONLY_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
|
||||
export BASE_READ_ONLY_DIR
|
||||
# The destination root dir inside the container.
|
||||
# This folder will also hold any SDKs.
|
||||
# This folder only exists on the ci guest and will be a copy of BASE_READ_ONLY_DIR
|
||||
export BASE_ROOT_DIR="${BASE_ROOT_DIR:-/ci_container_base}"
|
||||
# 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
|
||||
# The depends dir.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
# 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}
|
||||
# A folder for the ci system to put temporary files (build result, datadirs for tests, ...)
|
||||
# This folder only exists on the ci guest.
|
||||
# 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}
|
||||
# A folder for the ci system to put executables.
|
||||
# This folder only exists on the ci guest.
|
||||
export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
|
||||
|
||||
echo "Setting specific values in env"
|
||||
if [ -n "${FILE_ENV}" ]; then
|
||||
@@ -36,37 +28,46 @@ 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}
|
||||
# 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 RUN_TIDY=${RUN_TIDY:-false}
|
||||
export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
|
||||
# By how much to scale the test_runner timeouts (option --timeout-factor).
|
||||
# This is needed because some ci machines have slow CPU or disk, so sanitizers
|
||||
# might be slow or a reindex might be waiting on disk IO.
|
||||
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40}
|
||||
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
|
||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
|
||||
|
||||
export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}
|
||||
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:20.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_MAXSIZE=${CCACHE_MAXSIZE:-100M}
|
||||
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 only on the ci guest, and on the ci host as a volume.
|
||||
# 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}
|
||||
# Folder where the build result is put (bin and lib).
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}
|
||||
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}
|
||||
# The folder for previous release binaries.
|
||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
|
||||
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake}
|
||||
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 bison}
|
||||
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 --"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
|
||||
export HOST=aarch64-linux-android
|
||||
export PACKAGES="unzip openjdk-8-jdk gradle"
|
||||
export CONTAINER_NAME=ci_android
|
||||
export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04"
|
||||
export DOCKER_NAME_TAG="ubuntu:focal"
|
||||
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
||||
@@ -7,10 +7,18 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=arm-linux-gnueabihf
|
||||
# The host arch is unknown, so we run the tests through qemu.
|
||||
# If the host is arm and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
|
||||
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-arm -L /usr/arm-linux-gnueabihf/"}"; fi
|
||||
export DPKG_ADD_ARCH="armhf"
|
||||
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
|
||||
if [ -n "$QEMU_USER_CMD" ]; then
|
||||
# Likely cross-compiling, so install the needed gcc and qemu-user
|
||||
export PACKAGES="$PACKAGES qemu-user"
|
||||
fi
|
||||
export CONTAINER_NAME=ci_arm_linux
|
||||
export CI_IMAGE_NAME_TAG="docker.io/arm64v8/debian:bookworm"
|
||||
# Use debian to avoid 404 apt errors when cross compiling
|
||||
export DOCKER_NAME_TAG="debian:bullseye"
|
||||
export USE_BUSY_BOX=true
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -8,10 +8,9 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export CONTAINER_NAME=ci_i686_centos
|
||||
export CI_IMAGE_NAME_TAG="quay.io/centos/amd64:stream9"
|
||||
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux e2fsprogs cmake"
|
||||
export PIP_PACKAGES="pyzmq"
|
||||
export DOCKER_NAME_TAG=quay.io/centos/centos:stream8
|
||||
export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-zmq which patch lbzip2 xz procps-ng dash rsync coreutils bison"
|
||||
export GOAL="install"
|
||||
export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"
|
||||
export CONFIG_SHELL="/bin/dash"
|
||||
export TEST_RUNNER_ENV="LC_ALL=en_US.UTF-8"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-present The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -8,10 +8,10 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=i686-pc-linux-gnu
|
||||
export CONTAINER_NAME=ci_i686_multiprocess
|
||||
export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04"
|
||||
export PACKAGES="llvm clang g++-multilib"
|
||||
export DOCKER_NAME_TAG=ubuntu:20.04
|
||||
export PACKAGES="cmake python3 python3-pip llvm clang g++-multilib"
|
||||
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \
|
||||
CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE'"
|
||||
export BITCOIND=bitcoin-node # Used in functional tests
|
||||
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' LDFLAGS='--rtlib=compiler-rt -lgcc_s'"
|
||||
export TEST_RUNNER_ENV="BITCOIND=bitcoin-node"
|
||||
export TEST_RUNNER_EXTRA="--nosandbox"
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||
|
||||
export CONTAINER_NAME=ci_macos_cross
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
||||
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that Focal can cross-compile to macos
|
||||
export HOST=x86_64-apple-darwin
|
||||
export PACKAGES="zip"
|
||||
export XCODE_VERSION=15.0
|
||||
export XCODE_BUILD_ID=15A240d
|
||||
export PACKAGES="cmake libz-dev libtinfo5 python3-setuptools xorriso"
|
||||
export XCODE_VERSION=12.2
|
||||
export XCODE_BUILD_ID=12B45b
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present 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
|
||||
|
||||
export HOST=x86_64-apple-darwin
|
||||
# Homebrew's python@3.12 is marked as externally managed (PEP 668).
|
||||
# Therefore, `--break-system-packages` is needed.
|
||||
export PIP_PACKAGES="--break-system-packages zmq"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
export CCACHE_MAXSIZE=400M
|
||||
export RUN_FUZZ_TESTS=true
|
||||
17
ci/test/00_setup_env_mac_native_x86_64.sh
Executable file
17
ci/test/00_setup_env_mac_native_x86_64.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export HOST=x86_64-apple-darwin
|
||||
export PIP_PACKAGES="zmq lief"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports"
|
||||
export CI_OS_NAME="macos"
|
||||
export NO_DEPENDS=1
|
||||
export OSX_SDK=""
|
||||
export CCACHE_SIZE=300M
|
||||
export RUN_SECURITY_TESTS="true"
|
||||
@@ -1,28 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
|
||||
# Only install BCC tracing packages in CI. Container has to match the host for BCC to work.
|
||||
if [[ "${INSTALL_BCC_TRACING_TOOLS}" == "true" ]]; then
|
||||
# Required for USDT functional tests to run
|
||||
BPFCC_PACKAGE="bpfcc-tools linux-headers-$(uname --kernel-release)"
|
||||
export CI_CONTAINER_CAP="--privileged -v /sys/kernel:/sys/kernel:rw"
|
||||
else
|
||||
BPFCC_PACKAGE=""
|
||||
export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
fi
|
||||
# We install an up-to-date 'bpfcc-tools' package from an untrusted PPA.
|
||||
# This can be dropped with the next Ubuntu or Debian release that includes up-to-date packages.
|
||||
# See the if-then in ci/test/04_install.sh too.
|
||||
export ADD_UNTRUSTED_BPFCC_PPA=true
|
||||
|
||||
export CONTAINER_NAME=ci_native_asan
|
||||
export PACKAGES="systemtap-sdt-dev clang-17 llvm-17 libclang-rt-17-dev python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
|
||||
export PACKAGES="systemtap-sdt-dev bpfcc-tools clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
|
||||
export DOCKER_NAME_TAG=ubuntu:22.04 # May not run in docker unless --enable-usdt is dropped
|
||||
export NO_DEPENDS=1
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-c++20 --enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 \
|
||||
CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
|
||||
--with-sanitizers=address,float-divide-by-zero,integer,undefined \
|
||||
CC='clang-17 -ftrivial-auto-var-init=pattern' CXX='clang++-17 -ftrivial-auto-var-init=pattern'"
|
||||
export BITCOIN_CONFIG="--enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz
|
||||
export PACKAGES="clang-17 llvm-17 libclang-rt-17-dev libevent-dev libboost-dev libsqlite3-dev"
|
||||
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libsqlite3-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export RUN_FUZZ_TESTS=true
|
||||
export GOAL="install"
|
||||
export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \
|
||||
CC='clang-17 -ftrivial-auto-var-init=pattern' CXX='clang++-17 -ftrivial-auto-var-init=pattern'"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
export LLVM_SYMBOLIZER_PATH="/usr/bin/llvm-symbolizer-17"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,integer CC='clang -ftrivial-auto-var-init=pattern' CXX='clang++ -ftrivial-auto-var-init=pattern'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-present The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
LIBCXX_DIR="/msan/cxx_build/"
|
||||
export DOCKER_NAME_TAG="ubuntu:20.04"
|
||||
LIBCXX_DIR="${BASE_SCRATCH_DIR}/msan/build/"
|
||||
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
|
||||
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
|
||||
LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_DIR}include -I${LIBCXX_DIR}include/c++/v1 -lpthread -Wl,-rpath,${LIBCXX_DIR}lib -Wno-unused-command-line-argument"
|
||||
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
|
||||
|
||||
export CONTAINER_NAME="ci_native_fuzz_msan"
|
||||
export PACKAGES="ninja-build"
|
||||
export CONTAINER_NAME="ci_native_msan"
|
||||
export PACKAGES="clang-12 llvm-12 cmake"
|
||||
# BDB generates false-positives and will be removed in future
|
||||
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' sqlite_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export USE_MEMORY_SANITIZER="true"
|
||||
export RUN_UNIT_TESTS="false"
|
||||
export RUN_FUNCTIONAL_TESTS="false"
|
||||
export RUN_FUZZ_TESTS=true
|
||||
export CCACHE_MAXSIZE=250M
|
||||
export CCACHE_SIZE=250M
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_fuzz_valgrind
|
||||
export PACKAGES="clang llvm libclang-rt-dev libevent-dev libboost-dev libsqlite3-dev valgrind"
|
||||
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libsqlite3-dev valgrind"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export RUN_FUZZ_TESTS=true
|
||||
export FUZZ_TESTS_CONFIG="--valgrind"
|
||||
export GOAL="install"
|
||||
# Temporarily pin dwarf 4, until using Valgrind 3.20 or later
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CFLAGS=-gdwarf-4 CXXFLAGS=-gdwarf-4"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
|
||||
export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-present The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
LIBCXX_DIR="/msan/cxx_build/"
|
||||
export DOCKER_NAME_TAG="ubuntu:20.04"
|
||||
LIBCXX_DIR="${BASE_SCRATCH_DIR}/msan/build/"
|
||||
export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls"
|
||||
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
|
||||
LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_DIR}include -I${LIBCXX_DIR}include/c++/v1 -lpthread -Wl,-rpath,${LIBCXX_DIR}lib -Wno-unused-command-line-argument"
|
||||
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
|
||||
|
||||
export CONTAINER_NAME="ci_native_msan"
|
||||
export PACKAGES="ninja-build"
|
||||
export PACKAGES="clang-12 llvm-12 cmake"
|
||||
# BDB generates false-positives and will be removed in future
|
||||
export DEP_OPTS="DEBUG=1 NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' libevent_cflags='${MSAN_FLAGS}' sqlite_cflags='${MSAN_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no --prefix=${DEPENDS_DIR}/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
|
||||
export USE_MEMORY_SANITIZER="true"
|
||||
export RUN_FUNCTIONAL_TESTS="false"
|
||||
export CCACHE_MAXSIZE=250M
|
||||
export CCACHE_SIZE=250M
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
||||
# Use minimum supported python3.9 (or best-effort 3.10) and clang-14, see doc/dependencies.md
|
||||
export PACKAGES="python3-zmq clang-14 llvm-14 libc++abi-14-dev libc++-14-dev"
|
||||
export DEP_OPTS="NO_WALLET=1 CC=clang-14 CXX='clang++-14 -stdlib=libc++'"
|
||||
export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
|
||||
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev" # Use clang-8 to test C++17 compatibility, see doc/dependencies.md
|
||||
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present 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
|
||||
|
||||
export CONTAINER_NAME=ci_native_previous_releases
|
||||
export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
|
||||
# Use minimum supported python3.9 and gcc-10, see doc/dependencies.md
|
||||
export PACKAGES="gcc-10 g++-10 python3-zmq"
|
||||
export DEP_OPTS="NO_UPNP=1 NO_NATPMP=1 DEBUG=1 CC=gcc-10 CXX=g++-10"
|
||||
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
||||
export RUN_UNIT_TESTS="false"
|
||||
export GOAL="install"
|
||||
export DOWNLOAD_PREVIOUS_RELEASES="true"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports --enable-debug \
|
||||
CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\""
|
||||
19
ci/test/00_setup_env_native_qt5.sh
Executable file
19
ci/test/00_setup_env_native_qt5.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CONTAINER_NAME=ci_native_qt5
|
||||
export DOCKER_NAME_TAG=debian:buster # Check that buster gcc-8 can compile our C++17 and run our functional tests in python3, see doc/dependencies.md
|
||||
export PACKAGES="gcc-8 g++-8 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-8 CXX=g++-8"
|
||||
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
||||
export RUN_UNIT_TESTS="false"
|
||||
export GOAL="install"
|
||||
export DOWNLOAD_PREVIOUS_RELEASES="true"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports \
|
||||
--enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-8 CXX=g++-8"
|
||||
@@ -1,20 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||
# Copyright (c) 2022 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_tidy
|
||||
export TIDY_LLVM_V="17"
|
||||
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev qtbase5-dev qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
|
||||
export PACKAGES="clang libclang-dev llvm-dev clang-tidy bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export RUN_FUZZ_TESTS=false
|
||||
export RUN_TIDY=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="CC=clang-${TIDY_LLVM_V} CXX=clang++-${TIDY_LLVM_V} --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-${TIDY_LLVM_V}/lib/clang/${TIDY_LLVM_V}/include'"
|
||||
export CCACHE_MAXSIZE=200M
|
||||
export BITCOIN_CONFIG="CC=clang CXX=clang++ --enable-c++20 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
|
||||
export CCACHE_SIZE=200M
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CONTAINER_NAME=ci_native_tsan
|
||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
|
||||
export PACKAGES="clang-17 llvm-17 libclang-rt-17-dev libc++abi-17-dev libc++-17-dev python3-zmq"
|
||||
export DEP_OPTS="CC=clang-17 CXX='clang++-17 -stdlib=libc++'"
|
||||
export DOCKER_NAME_TAG=ubuntu:22.04
|
||||
export PACKAGES="clang-13 llvm-13 libc++abi-13-dev libc++-13-dev python3-zmq"
|
||||
export DEP_OPTS="CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread"
|
||||
export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm"
|
||||
export DOCKER_NAME_TAG="ubuntu:22.04"
|
||||
export CONTAINER_NAME=ci_native_valgrind
|
||||
export PACKAGES="valgrind clang llvm libclang-rt-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
|
||||
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
|
||||
export USE_VALGRIND=1
|
||||
export NO_DEPENDS=1
|
||||
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export TEST_RUNNER_EXTRA="--nosandbox --exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export GOAL="install"
|
||||
# Temporarily pin dwarf 4, until using Valgrind 3.20 or later
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CFLAGS=-gdwarf-4 CXXFLAGS=-gdwarf-4" # TODO enable GUI
|
||||
# Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" # TODO enable GUI
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export HOST=s390x-linux-gnu
|
||||
# The host arch is unknown, so we run the tests through qemu.
|
||||
# If the host is s390x and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
|
||||
if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-s390x"}"; fi
|
||||
export PACKAGES="python3-zmq"
|
||||
if [ -n "$QEMU_USER_CMD" ]; then
|
||||
# Likely cross-compiling, so install the needed gcc and qemu-user
|
||||
export DPKG_ADD_ARCH="s390x"
|
||||
export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x"
|
||||
fi
|
||||
# Use debian to avoid 404 apt errors
|
||||
export CONTAINER_NAME=ci_s390x
|
||||
export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
|
||||
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export DOCKER_NAME_TAG="debian:bookworm"
|
||||
export TEST_RUNNER_ENV="LC_ALL=C"
|
||||
export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
|
||||
export RUN_FUNCTIONAL_TESTS=true
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# Copyright (c) 2019-2021 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
|
||||
|
||||
export CONTAINER_NAME=ci_win64
|
||||
export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04" # Check that Jammy can cross-compile to win64
|
||||
export DOCKER_NAME_TAG=ubuntu:22.04 # Check that Jammy can cross-compile to win64
|
||||
export HOST=x86_64-w64-mingw32
|
||||
export DPKG_ADD_ARCH="i386"
|
||||
export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
|
||||
export PACKAGES="python3 nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="deploy"
|
||||
# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when
|
||||
# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/
|
||||
# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests CXXFLAGS=-Wno-return-type"
|
||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-present 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
|
||||
|
||||
set -ex
|
||||
|
||||
CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
|
||||
|
||||
if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
|
||||
echo "Skip base install"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||
dpkg --add-architecture "$DPKG_ADD_ARCH"
|
||||
fi
|
||||
|
||||
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
|
||||
bash -c "dnf -y install epel-release"
|
||||
bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
|
||||
elif [ "$CI_OS_NAME" != "macos" ]; then
|
||||
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
|
||||
echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
|
||||
fi
|
||||
${CI_RETRY_EXE} apt-get update
|
||||
${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES"
|
||||
fi
|
||||
|
||||
if [ -n "$PIP_PACKAGES" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
|
||||
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
|
||||
${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-18.1.1" /msan/llvm-project
|
||||
|
||||
cmake -G Ninja -B /msan/clang_build/ \
|
||||
-DLLVM_ENABLE_PROJECTS="clang" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native \
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
|
||||
-S /msan/llvm-project/llvm
|
||||
|
||||
ninja -C /msan/clang_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
|
||||
ninja -C /msan/clang_build/ install-runtimes
|
||||
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100
|
||||
update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100
|
||||
update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100
|
||||
|
||||
cmake -G Ninja -B /msan/cxx_build/ \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_USE_SANITIZER=MemoryWithOrigins \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native \
|
||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
|
||||
-DLIBCXX_HARDENING_MODE=debug \
|
||||
-S /msan/llvm-project/runtimes
|
||||
|
||||
ninja -C /msan/cxx_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
|
||||
fi
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
${CI_RETRY_EXE} git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_"${TIDY_LLVM_V}" /include-what-you-use
|
||||
cmake -B /iwyu-build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-"${TIDY_LLVM_V}" -S /include-what-you-use
|
||||
make -C /iwyu-build/ install "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds
|
||||
fi
|
||||
|
||||
mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
|
||||
|
||||
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers"
|
||||
|
||||
if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]; then
|
||||
OSX_SDK_FILENAME="${OSX_SDK_BASENAME}.tar.gz"
|
||||
OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_FILENAME}"
|
||||
if [ ! -f "$OSX_SDK_PATH" ]; then
|
||||
${CI_RETRY_EXE} curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
|
||||
fi
|
||||
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
|
||||
fi
|
||||
|
||||
if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then
|
||||
ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip
|
||||
if [ ! -f "$ANDROID_TOOLS_PATH" ]; then
|
||||
${CI_RETRY_EXE} curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
|
||||
fi
|
||||
mkdir -p "$ANDROID_HOME"
|
||||
unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME"
|
||||
yes | "${ANDROID_HOME}"/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platform-tools" "platforms;android-31" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${ANDROID_NDK_VERSION}"
|
||||
fi
|
||||
|
||||
git config --global ${CFG_DONE} "true"
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-present 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
|
||||
export CI_IMAGE_LABEL="bitcoin-ci-test"
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
# Export all env vars to avoid missing some.
|
||||
# Though, exclude those with newlines to avoid parsing problems.
|
||||
python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee "/tmp/env-$USER-$CONTAINER_NAME"
|
||||
# System-dependent env vars must be kept as is. So read them from the container.
|
||||
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
|
||||
echo "Creating $CI_IMAGE_NAME_TAG container to run in"
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build \
|
||||
--file "${BASE_READ_ONLY_DIR}/ci/test_imagefile" \
|
||||
--build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \
|
||||
--build-arg "FILE_ENV=${FILE_ENV}" \
|
||||
--label="${CI_IMAGE_LABEL}" \
|
||||
--tag="${CONTAINER_NAME}" \
|
||||
"${BASE_READ_ONLY_DIR}"
|
||||
|
||||
docker volume create "${CONTAINER_NAME}_ccache" || true
|
||||
docker volume create "${CONTAINER_NAME}_depends" || true
|
||||
docker volume create "${CONTAINER_NAME}_depends_sources" || true
|
||||
docker volume create "${CONTAINER_NAME}_depends_SDKs_android" || true
|
||||
docker volume create "${CONTAINER_NAME}_previous_releases" || true
|
||||
|
||||
docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true
|
||||
|
||||
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
||||
echo "Restart docker before run to stop and clear all containers started with --rm"
|
||||
podman container rm --force --all # Similar to "systemctl restart docker"
|
||||
|
||||
# Still prune everything in case the filtered pruning doesn't work, or if labels were not set
|
||||
# on a previous run. Belt and suspenders approach, should be fine to remove in the future.
|
||||
# Prune images used by --external containers (e.g. build containers) when
|
||||
# using podman.
|
||||
echo "Prune all dangling images"
|
||||
podman image prune --force --external
|
||||
fi
|
||||
echo "Prune all dangling $CI_IMAGE_LABEL images"
|
||||
# When detecting podman-docker, `--external` should be added.
|
||||
docker image prune --force --filter "label=$CI_IMAGE_LABEL"
|
||||
|
||||
# Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME
|
||||
# to allow support starting multiple runs simultaneously by the same user.
|
||||
# shellcheck disable=SC2086
|
||||
CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \
|
||||
--mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_depends_SDKs_android,dst=$DEPENDS_DIR/SDKs/android" \
|
||||
--mount "type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" \
|
||||
--env-file /tmp/env-$USER-$CONTAINER_NAME \
|
||||
--name "$CONTAINER_NAME" \
|
||||
--network ci-ip6net \
|
||||
"$CONTAINER_NAME")
|
||||
export CI_CONTAINER_ID
|
||||
export CI_EXEC_CMD_PREFIX="docker exec ${CI_CONTAINER_ID}"
|
||||
else
|
||||
echo "Running on host system without docker wrapper"
|
||||
echo "Create missing folders"
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
mkdir -p "${PREVIOUS_RELEASES_DIR}"
|
||||
fi
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt"
|
||||
export IN_GETOPT_BIN
|
||||
fi
|
||||
|
||||
CI_EXEC () {
|
||||
$CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*"
|
||||
}
|
||||
export -f CI_EXEC
|
||||
|
||||
# Normalize all folders to BASE_ROOT_DIR
|
||||
CI_EXEC rsync --archive --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh"
|
||||
|
||||
# Fixes permission issues when there is a container UID/GID mismatch with the owner
|
||||
# of the git source code directory.
|
||||
CI_EXEC git config --global --add safe.directory \"*\"
|
||||
|
||||
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
|
||||
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/03_test_script.sh"
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Stop and remove CI container by ID"
|
||||
docker container kill "${CI_CONTAINER_ID}"
|
||||
fi
|
||||
@@ -1,204 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-present 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
|
||||
|
||||
set -ex
|
||||
|
||||
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
||||
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1"
|
||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
||||
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
|
||||
else
|
||||
free -m -h
|
||||
echo "Number of CPUs (nproc): $(nproc)"
|
||||
echo "System info: $(uname --kernel-name --kernel-release)"
|
||||
lscpu
|
||||
fi
|
||||
echo "Free disk space:"
|
||||
df -h
|
||||
|
||||
# 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")}
|
||||
|
||||
(
|
||||
# compact->outputs[i].file_size is uninitialized memory, so reading it is UB.
|
||||
# The statistic bytes_written is only used for logging, which is disabled in
|
||||
# CI, so as a temporary minimal fix to work around UB and CI failures, leave
|
||||
# bytes_written unmodified.
|
||||
# See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748
|
||||
# Tee patch to stdout to make it clear CI is testing modified code.
|
||||
tee >(patch -p1) <<'EOF'
|
||||
--- a/src/leveldb/db/db_impl.cc
|
||||
+++ b/src/leveldb/db/db_impl.cc
|
||||
@@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
|
||||
stats.bytes_read += compact->compaction->input(which, i)->file_size;
|
||||
}
|
||||
}
|
||||
- for (size_t i = 0; i < compact->outputs.size(); i++) {
|
||||
- stats.bytes_written += compact->outputs[i].file_size;
|
||||
- }
|
||||
|
||||
mutex_.Lock();
|
||||
stats_[compact->compaction->level() + 1].Add(stats);
|
||||
EOF
|
||||
)
|
||||
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
|
||||
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
||||
${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
|
||||
fi
|
||||
(
|
||||
cd "${DIR_QA_ASSETS}"
|
||||
echo "Using qa-assets repo from commit ..."
|
||||
git log -1
|
||||
)
|
||||
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
|
||||
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
|
||||
mkdir -p "$DIR_UNIT_TEST_DATA"
|
||||
${CI_RETRY_EXE} curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$USE_BUSY_BOX" = "true" ]; then
|
||||
echo "Setup to use BusyBox utils"
|
||||
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
|
||||
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
|
||||
for util in $(busybox --list | grep -v "^ar$" | grep -v "^tar$" ); do ln -s "$(command -v busybox)" "${BINS_SCRATCH_DIR}/$util"; done
|
||||
# Print BusyBox version
|
||||
patch --help
|
||||
fi
|
||||
|
||||
# Make sure default datadir does not exist and is never read by creating a dummy file
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
echo > "${HOME}/Library/Application Support/Bitcoin"
|
||||
else
|
||||
echo > "${HOME}/.bitcoin"
|
||||
fi
|
||||
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
|
||||
SHELL_OPTS="CONFIG_SHELL=/bin/dash"
|
||||
else
|
||||
SHELL_OPTS="CONFIG_SHELL="
|
||||
fi
|
||||
bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1"
|
||||
fi
|
||||
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
|
||||
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="--disable-dependency-tracking"
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
|
||||
fi
|
||||
if [ -z "$NO_WERROR" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
||||
fi
|
||||
|
||||
ccache --zero-stats
|
||||
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
|
||||
|
||||
if [ -n "$ANDROID_TOOLS_URL" ]; then
|
||||
make distclean || true
|
||||
./autogen.sh
|
||||
bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
|
||||
make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk
|
||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --prefix=$BASE_OUTDIR"
|
||||
|
||||
if [ -n "$CONFIG_SHELL" ]; then
|
||||
"$CONFIG_SHELL" -c "./autogen.sh"
|
||||
else
|
||||
./autogen.sh
|
||||
fi
|
||||
|
||||
mkdir -p "${BASE_BUILD_DIR}"
|
||||
cd "${BASE_BUILD_DIR}"
|
||||
|
||||
bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
|
||||
|
||||
make distdir VERSION="$HOST"
|
||||
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST"
|
||||
|
||||
bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
MAYBE_BEAR="bear --config src/.bear-tidy-config"
|
||||
MAYBE_TOKEN="--"
|
||||
fi
|
||||
|
||||
bash -c "${MAYBE_BEAR} ${MAYBE_TOKEN} make $MAKEJOBS $GOAL" || ( echo "Build failure. Verbose build follows." && make "$GOAL" V=1 ; false )
|
||||
|
||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
||||
du -sh "${DEPENDS_DIR}"/*/
|
||||
du -sh "${PREVIOUS_RELEASES_DIR}"
|
||||
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
# Generate all binaries, so that they can be wrapped
|
||||
make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1
|
||||
"${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
|
||||
fi
|
||||
|
||||
if [ -n "$USE_VALGRIND" ]; then
|
||||
"${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "${MAKEJOBS}" check VERBOSE=1
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite
|
||||
fi
|
||||
|
||||
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --quiet --failfast
|
||||
fi
|
||||
|
||||
if [ "${RUN_TIDY}" = "true" ]; then
|
||||
cmake -B /tidy-build -DLLVM_DIR=/usr/lib/llvm-"${TIDY_LLVM_V}"/cmake -DCMAKE_BUILD_TYPE=Release -S "${BASE_ROOT_DIR}"/contrib/devtools/bitcoin-tidy
|
||||
cmake --build /tidy-build "$MAKEJOBS"
|
||||
cmake --build /tidy-build --target bitcoin-tidy-tests "$MAKEJOBS"
|
||||
|
||||
set -eo pipefail
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
|
||||
( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" ) | grep -C5 "error"
|
||||
# Filter out files by regex here, because regex may not be
|
||||
# accepted in src/.bear-tidy-config
|
||||
# Filter out:
|
||||
# * qt qrc and moc generated files
|
||||
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json
|
||||
mv tmp.json ../compile_commands.json
|
||||
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
|
||||
python3 "/include-what-you-use/iwyu_tool.py" \
|
||||
-p . "${MAKEJOBS}" \
|
||||
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
|
||||
-Xiwyu --max_line_length=160 \
|
||||
2>&1 | tee /tmp/iwyu_ci.out
|
||||
cd "${BASE_ROOT_DIR}/src"
|
||||
python3 "/include-what-you-use/fix_includes.py" --nosafe_headers < /tmp/iwyu_ci.out
|
||||
git --no-pager diff
|
||||
fi
|
||||
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
|
||||
fi
|
||||
147
ci/test/04_install.sh
Executable file
147
ci/test/04_install.sh
Executable file
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
|
||||
export LC_ALL=C
|
||||
fi
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
sudo -H pip3 install --upgrade pip
|
||||
# shellcheck disable=SC2086
|
||||
IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
|
||||
# Create folders that are mounted into the docker
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
mkdir -p "${PREVIOUS_RELEASES_DIR}"
|
||||
|
||||
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
||||
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
||||
env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env
|
||||
if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
DOCKER_ADMIN="--cap-add SYS_PTRACE"
|
||||
fi
|
||||
|
||||
export P_CI_DIR="$PWD"
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Creating $DOCKER_NAME_TAG container to run in"
|
||||
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
|
||||
|
||||
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
||||
echo "Restart docker before run to stop and clear all containers started with --rm"
|
||||
systemctl restart docker
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN --rm --interactive --detach --tty \
|
||||
--mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \
|
||||
--mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \
|
||||
--mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \
|
||||
--mount type=bind,src=$PREVIOUS_RELEASES_DIR,dst=$PREVIOUS_RELEASES_DIR \
|
||||
-w $BASE_ROOT_DIR \
|
||||
--env-file /tmp/env \
|
||||
--name $CONTAINER_NAME \
|
||||
$DOCKER_NAME_TAG)
|
||||
export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID"
|
||||
else
|
||||
echo "Running on host system without docker wrapper"
|
||||
fi
|
||||
|
||||
CI_EXEC () {
|
||||
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
|
||||
}
|
||||
export -f CI_EXEC
|
||||
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||
CI_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
|
||||
fi
|
||||
|
||||
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
|
||||
${CI_RETRY_EXE} CI_EXEC dnf -y install epel-release
|
||||
${CI_RETRY_EXE} CI_EXEC dnf -y --allowerasing install "$DOCKER_PACKAGES" "$PACKAGES"
|
||||
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
|
||||
if [[ "${ADD_UNTRUSTED_BPFCC_PPA}" == "true" ]]; then
|
||||
# Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
|
||||
# The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
|
||||
# packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
|
||||
# package.
|
||||
# TODO: drop this once we can use newer images in GCE
|
||||
CI_EXEC add-apt-repository ppa:hadret/bpfcc
|
||||
fi
|
||||
${CI_RETRY_EXE} CI_EXEC apt-get update
|
||||
${CI_RETRY_EXE} CI_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
|
||||
if [ -n "$PIP_PACKAGES" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
||||
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
|
||||
else
|
||||
CI_EXEC free -m -h
|
||||
CI_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
|
||||
CI_EXEC echo "$(lscpu | grep Endian)"
|
||||
fi
|
||||
CI_EXEC echo "Free disk space:"
|
||||
CI_EXEC df -h
|
||||
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
|
||||
if [ ! -d "$DIR_FUZZ_IN" ]; then
|
||||
CI_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
|
||||
fi
|
||||
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
|
||||
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
|
||||
CI_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
|
||||
CI_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
|
||||
fi
|
||||
fi
|
||||
|
||||
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
|
||||
|
||||
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
|
||||
CI_EXEC "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-12) 100"
|
||||
CI_EXEC "update-alternatives --install /usr/bin/clang clang \$(which clang-12) 100"
|
||||
CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/"
|
||||
CI_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project"
|
||||
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
|
||||
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx"
|
||||
fi
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
|
||||
if [ ! -d "${DIR_IWYU}" ]; then
|
||||
CI_EXEC "mkdir -p ${DIR_IWYU}/build/"
|
||||
CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${DIR_IWYU}/include-what-you-use"
|
||||
CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
|
||||
CI_EXEC "cd ${DIR_IWYU}/build && make install $MAKEJOBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||
echo "Create $BASE_ROOT_DIR"
|
||||
CI_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
|
||||
fi
|
||||
|
||||
if [ "$USE_BUSY_BOX" = "true" ]; then
|
||||
echo "Setup to use BusyBox utils"
|
||||
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
|
||||
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
|
||||
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
|
||||
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
|
||||
# shellcheck disable=SC1010
|
||||
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
|
||||
# Print BusyBox version
|
||||
CI_EXEC patch --help
|
||||
fi
|
||||
52
ci/test/05_before_script.sh
Executable file
52
ci/test/05_before_script.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
# Make sure default datadir does not exist and is never read by creating a dummy file
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
echo > "${HOME}/Library/Application Support/Bitcoin"
|
||||
else
|
||||
CI_EXEC echo \> \$HOME/.bitcoin
|
||||
fi
|
||||
|
||||
CI_EXEC mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
|
||||
|
||||
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers"
|
||||
|
||||
if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]; then
|
||||
OSX_SDK_FILENAME="${OSX_SDK_BASENAME}.tar.gz"
|
||||
OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_FILENAME}"
|
||||
if [ ! -f "$OSX_SDK_PATH" ]; then
|
||||
CI_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_FILENAME}" -o "$OSX_SDK_PATH"
|
||||
fi
|
||||
CI_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
|
||||
fi
|
||||
|
||||
if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then
|
||||
ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip
|
||||
if [ ! -f "$ANDROID_TOOLS_PATH" ]; then
|
||||
CI_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
|
||||
fi
|
||||
CI_EXEC mkdir -p "$ANDROID_HOME"
|
||||
CI_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME"
|
||||
CI_EXEC "yes | ${ANDROID_HOME}/cmdline-tools/bin/sdkmanager --sdk_root=\"${ANDROID_HOME}\" --install \"build-tools;${ANDROID_BUILD_TOOLS_VERSION}\" \"platform-tools\" \"platforms;android-${ANDROID_API_LEVEL}\" \"ndk;${ANDROID_NDK_VERSION}\""
|
||||
fi
|
||||
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
|
||||
# CentOS has problems building the depends if the config shell is not explicitly set
|
||||
# (i.e. for libevent a Makefile with an empty SHELL variable is generated, leading to
|
||||
# an error as the first command is executed)
|
||||
SHELL_OPTS="LC_ALL=en_US.UTF-8 CONFIG_SHELL=/bin/dash"
|
||||
else
|
||||
SHELL_OPTS="CONFIG_SHELL="
|
||||
fi
|
||||
CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
|
||||
fi
|
||||
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
|
||||
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
|
||||
fi
|
||||
65
ci/test/06_script_a.sh
Executable file
65
ci/test/06_script_a.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST"
|
||||
if [ -z "$NO_WERROR" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
||||
fi
|
||||
|
||||
CI_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE"
|
||||
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
|
||||
|
||||
if [ -n "$ANDROID_TOOLS_URL" ]; then
|
||||
CI_EXEC make distclean || true
|
||||
CI_EXEC ./autogen.sh
|
||||
CI_EXEC ./configure "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (CI_EXEC cat config.log) && false)
|
||||
CI_EXEC "make $MAKEJOBS && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk"
|
||||
CI_EXEC "${PRINT_CCACHE_STATISTICS}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
|
||||
|
||||
if [ -n "$CONFIG_SHELL" ]; then
|
||||
CI_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
|
||||
else
|
||||
CI_EXEC ./autogen.sh
|
||||
fi
|
||||
|
||||
CI_EXEC mkdir -p "${BASE_BUILD_DIR}"
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}"
|
||||
|
||||
CI_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (CI_EXEC cat config.log) && false)
|
||||
|
||||
CI_EXEC make distdir VERSION="$HOST"
|
||||
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST"
|
||||
|
||||
CI_EXEC ./configure --cache-file=../config.cache "$BITCOIN_CONFIG_ALL" "$BITCOIN_CONFIG" || ( (CI_EXEC cat config.log) && false)
|
||||
|
||||
set -o errtrace
|
||||
trap 'CI_EXEC "cat ${BASE_SCRATCH_DIR}/sanitizer-output/* 2> /dev/null"' ERR
|
||||
|
||||
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
|
||||
# MemorySanitizer (MSAN) does not support tracking memory initialization done by
|
||||
# using the Linux getrandom syscall. Avoid using getrandom by undefining
|
||||
# HAVE_SYS_GETRANDOM. See https://github.com/google/sanitizers/issues/852 for
|
||||
# details.
|
||||
CI_EXEC 'grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h'
|
||||
fi
|
||||
|
||||
if [[ "${RUN_TIDY}" == "true" ]]; then
|
||||
MAYBE_BEAR="bear --config src/.bear-tidy-config"
|
||||
MAYBE_TOKEN="--"
|
||||
fi
|
||||
|
||||
CI_EXEC "${MAYBE_BEAR}" "${MAYBE_TOKEN}" make "$MAKEJOBS" "$GOAL" || ( echo "Build failure. Verbose build follows." && CI_EXEC make "$GOAL" V=1 ; false )
|
||||
|
||||
CI_EXEC "${PRINT_CCACHE_STATISTICS}"
|
||||
CI_EXEC du -sh "${DEPENDS_DIR}"/*/
|
||||
CI_EXEC du -sh "${PREVIOUS_RELEASES_DIR}"
|
||||
80
ci/test/06_script_b.sh
Executable file
80
ci/test/06_script_b.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
if [[ $HOST = *-mingw32 ]]; then
|
||||
# Generate all binaries, so that they can be wrapped
|
||||
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
|
||||
fi
|
||||
|
||||
if [ -n "$QEMU_USER_CMD" ]; then
|
||||
# Generate all binaries, so that they can be wrapped
|
||||
CI_EXEC make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh"
|
||||
fi
|
||||
|
||||
if [ -n "$USE_VALGRIND" ]; then
|
||||
CI_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh"
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS" = "true" ]; then
|
||||
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" make "$MAKEJOBS" check VERBOSE=1
|
||||
fi
|
||||
|
||||
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||
CI_EXEC "${TEST_RUNNER_ENV}" DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}/bin/test_bitcoin" --catch_system_errors=no -l test_suite
|
||||
fi
|
||||
|
||||
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
|
||||
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${TEST_RUNNER_ENV}" test/functional/test_runner.py --ci "$MAKEJOBS" --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA}" --quiet --failfast
|
||||
fi
|
||||
|
||||
if [ "${RUN_TIDY}" = "true" ]; then
|
||||
set -eo pipefail
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
|
||||
( CI_EXEC run-clang-tidy -quiet "${MAKEJOBS}" ) | grep -C5 "error"
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
|
||||
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
|
||||
" src/compat"\
|
||||
" src/dbwrapper.cpp"\
|
||||
" src/init"\
|
||||
" src/kernel"\
|
||||
" src/node/chainstate.cpp"\
|
||||
" src/node/mempool_args.cpp"\
|
||||
" src/node/validation_cache_args.cpp"\
|
||||
" src/policy/feerate.cpp"\
|
||||
" src/policy/packages.cpp"\
|
||||
" src/policy/settings.cpp"\
|
||||
" src/primitives/transaction.cpp"\
|
||||
" src/rpc/fees.cpp"\
|
||||
" src/rpc/signmessage.cpp"\
|
||||
" src/test/fuzz/txorphan.cpp"\
|
||||
" src/threadinterrupt.cpp"\
|
||||
" src/util/bip32.cpp"\
|
||||
" src/util/bytevectorhash.cpp"\
|
||||
" src/util/error.cpp"\
|
||||
" src/util/getuniquepath.cpp"\
|
||||
" src/util/hasher.cpp"\
|
||||
" src/util/message.cpp"\
|
||||
" src/util/moneystr.cpp"\
|
||||
" src/util/serfloat.cpp"\
|
||||
" src/util/spanparsing.cpp"\
|
||||
" src/util/strencodings.cpp"\
|
||||
" src/util/string.cpp"\
|
||||
" src/util/syserror.cpp"\
|
||||
" src/util/url.cpp"\
|
||||
" -p . ${MAKEJOBS} -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"
|
||||
fi
|
||||
|
||||
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
|
||||
CI_EXEC make test-security-check
|
||||
fi
|
||||
|
||||
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||
CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}"
|
||||
fi
|
||||
18
ci/test/wrap-qemu.sh
Executable file
18
ci/test/wrap-qemu.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2021 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
|
||||
|
||||
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}; do
|
||||
# shellcheck disable=SC2044
|
||||
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do
|
||||
echo "Wrap $b ..."
|
||||
mv "$b" "${b}_orig"
|
||||
echo '#!/usr/bin/env bash' > "$b"
|
||||
echo "$QEMU_USER_CMD \"${b}_orig\" \"\$@\"" >> "$b"
|
||||
chmod +x "$b"
|
||||
done
|
||||
done
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2020-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2021 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
1
ci/test/wrapped-cl.bat
Normal file
1
ci/test/wrapped-cl.bat
Normal file
@@ -0,0 +1 @@
|
||||
ccache cl %*
|
||||
@@ -1,16 +0,0 @@
|
||||
# Copyright (c) The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://opensource.org/license/mit/.
|
||||
|
||||
# See ci/README.md for usage.
|
||||
|
||||
ARG CI_IMAGE_NAME_TAG
|
||||
FROM ${CI_IMAGE_NAME_TAG}
|
||||
|
||||
ARG FILE_ENV
|
||||
ENV FILE_ENV=${FILE_ENV}
|
||||
|
||||
COPY ./ci/retry/retry /usr/bin/retry
|
||||
COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_container_base/ci/test/
|
||||
|
||||
RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-present The Bitcoin Core developers
|
||||
# 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
|
||||
|
||||
set -o errexit; source ./ci/test/00_setup_env.sh
|
||||
set -o errexit
|
||||
"./ci/test/02_run_container.sh"
|
||||
set -o errexit; source ./ci/test/04_install.sh
|
||||
set -o errexit; source ./ci/test/05_before_script.sh
|
||||
set -o errexit; source ./ci/test/06_script_a.sh
|
||||
set -o errexit; source ./ci/test/06_script_b.sh
|
||||
|
||||
467
configure.ac
467
configure.ac
@@ -1,10 +1,10 @@
|
||||
AC_PREREQ([2.69])
|
||||
define(_CLIENT_VERSION_MAJOR, 27)
|
||||
define(_CLIENT_VERSION_MINOR, 2)
|
||||
define(_CLIENT_VERSION_MAJOR, 24)
|
||||
define(_CLIENT_VERSION_MINOR, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 0)
|
||||
define(_CLIENT_VERSION_RC, 4)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2024)
|
||||
define(_COPYRIGHT_YEAR, 2022)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
|
||||
AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
|
||||
@@ -70,34 +70,36 @@ else
|
||||
fi
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl libtool overrides
|
||||
dnl By default, libtool for mingw refuses to link static libs into a dll for
|
||||
dnl fear of mixing pic/non-pic objects, and import/export complications. Since
|
||||
dnl we have those under control, re-enable that functionality.
|
||||
case $host in
|
||||
*mingw*)
|
||||
dnl By default, libtool for mingw refuses to link static libs into a dll for
|
||||
dnl fear of mixing pic/non-pic objects, and import/export complications. Since
|
||||
dnl we have those under control, re-enable that functionality.
|
||||
lt_cv_deplibs_check_method="pass_all"
|
||||
|
||||
dnl Remove unwanted -DDLL_EXPORT from these variables.
|
||||
dnl We do not use this macro, but system headers may export unwanted symbols
|
||||
dnl if it's set.
|
||||
lt_cv_prog_compiler_pic="-DPIC"
|
||||
lt_cv_prog_compiler_pic_CXX="-DPIC"
|
||||
;;
|
||||
*darwin*)
|
||||
dnl Because it prints a verbose warning, lld fails the following check
|
||||
dnl for "-Wl,-single_module" from libtool.m4:
|
||||
dnl # If there is a non-empty error log, and "single_module"
|
||||
dnl # appears in it, assume the flag caused a linker warning
|
||||
dnl "-single_module" works fine on ld64 and lld, so just bypass the test.
|
||||
dnl Failure to set this to "yes" causes libtool to use a very broken
|
||||
dnl link-line for shared libs.
|
||||
lt_cv_apple_cc_single_mod="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Require C++20 compiler (no GNU extensions)
|
||||
AC_ARG_WITH([seccomp],
|
||||
[AS_HELP_STRING([--with-seccomp],
|
||||
[enable experimental syscall sandbox feature (-sandbox), default is yes if seccomp-bpf is detected under Linux x86_64])],
|
||||
[seccomp_found=$withval],
|
||||
[seccomp_found=auto])
|
||||
|
||||
AC_ARG_ENABLE([c++20],
|
||||
[AS_HELP_STRING([--enable-c++20],
|
||||
[enable compilation in c++20 mode (disabled by default)])],
|
||||
[use_cxx20=$enableval],
|
||||
[use_cxx20=no])
|
||||
|
||||
dnl Require C++17 compiler (no GNU extensions)
|
||||
if test "$use_cxx20" = "no"; then
|
||||
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
|
||||
else
|
||||
AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
|
||||
fi
|
||||
|
||||
dnl check if additional link flags are required for std::filesystem
|
||||
CHECK_FILESYSTEM
|
||||
|
||||
dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
|
||||
dnl that we get the same -std flags for both.
|
||||
@@ -118,8 +120,8 @@ AC_PATH_TOOL([AR], [ar])
|
||||
AC_PATH_TOOL([GCOV], [gcov])
|
||||
AC_PATH_TOOL([LLVM_COV], [llvm-cov])
|
||||
AC_PATH_PROG([LCOV], [lcov])
|
||||
dnl The minimum supported version is specified in .python-version and should be used if available, see doc/dependencies.md
|
||||
AC_PATH_PROGS([PYTHON], [python3.9 python3.10 python3.11 python3.12 python3 python])
|
||||
dnl Python 3.6 is specified in .python-version and should be used if available, see doc/dependencies.md
|
||||
AC_PATH_PROGS([PYTHON], [python3.6 python3.7 python3.8 python3.9 python3.10 python3.11 python3 python])
|
||||
AC_PATH_PROG([GENHTML], [genhtml])
|
||||
AC_PATH_PROG([GIT], [git])
|
||||
AC_PATH_PROG([CCACHE], [ccache])
|
||||
@@ -129,6 +131,8 @@ AC_PATH_TOOL([OBJCOPY], [objcopy])
|
||||
AC_PATH_PROG([DOXYGEN], [doxygen])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
|
||||
|
||||
AC_ARG_VAR([PYTHONPATH], [Augments the default search path for python module files])
|
||||
|
||||
AC_ARG_ENABLE([wallet],
|
||||
[AS_HELP_STRING([--disable-wallet],
|
||||
[disable wallet (enabled by default)])],
|
||||
@@ -159,12 +163,24 @@ AC_ARG_WITH([miniupnpc],
|
||||
[use_upnp=$withval],
|
||||
[use_upnp=auto])
|
||||
|
||||
AC_ARG_ENABLE([upnp-default],
|
||||
[AS_HELP_STRING([--enable-upnp-default],
|
||||
[if UPNP is enabled, turn it on at startup (default is no)])],
|
||||
[use_upnp_default=$enableval],
|
||||
[use_upnp_default=no])
|
||||
|
||||
AC_ARG_WITH([natpmp],
|
||||
[AS_HELP_STRING([--with-natpmp],
|
||||
[enable NAT-PMP (default is yes if libnatpmp is found)])],
|
||||
[use_natpmp=$withval],
|
||||
[use_natpmp=auto])
|
||||
|
||||
AC_ARG_ENABLE([natpmp-default],
|
||||
[AS_HELP_STRING([--enable-natpmp-default],
|
||||
[if NAT-PMP is enabled, turn it on at startup (default is no)])],
|
||||
[use_natpmp_default=$enableval],
|
||||
[use_natpmp_default=no])
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]),
|
||||
[use_tests=$enableval],
|
||||
@@ -226,10 +242,10 @@ dnl May be useful if warnings from external headers clutter the build output
|
||||
dnl too much, so that it becomes difficult to spot Bitcoin Core warnings
|
||||
dnl or if they cause a build failure with --enable-werror.
|
||||
AC_ARG_ENABLE([suppress-external-warnings],
|
||||
[AS_HELP_STRING([--disable-suppress-external-warnings],
|
||||
[Do not suppress warnings from external headers (default is to suppress)])],
|
||||
[AS_HELP_STRING([--enable-suppress-external-warnings],
|
||||
[Suppress warnings from external headers (default is no)])],
|
||||
[suppress_external_warnings=$enableval],
|
||||
[suppress_external_warnings=yes])
|
||||
[suppress_external_warnings=no])
|
||||
|
||||
AC_ARG_ENABLE([lcov],
|
||||
[AS_HELP_STRING([--enable-lcov],
|
||||
@@ -249,6 +265,16 @@ AC_ARG_ENABLE([threadlocal],
|
||||
[use_thread_local=$enableval],
|
||||
[use_thread_local=auto])
|
||||
|
||||
AC_ARG_ENABLE([asm],
|
||||
[AS_HELP_STRING([--disable-asm],
|
||||
[disable assembly routines (enabled by default)])],
|
||||
[use_asm=$enableval],
|
||||
[use_asm=yes])
|
||||
|
||||
if test "$use_asm" = "yes"; then
|
||||
AC_DEFINE([USE_ASM], [1], [Define this symbol to build in assembly routines])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([zmq],
|
||||
[AS_HELP_STRING([--disable-zmq],
|
||||
[disable ZMQ notifications])],
|
||||
@@ -311,17 +337,13 @@ AC_ARG_ENABLE([external-signer],
|
||||
[use_external_signer=$enableval],
|
||||
[use_external_signer=auto])
|
||||
|
||||
AC_ARG_ENABLE([lto],
|
||||
[AS_HELP_STRING([--enable-lto],[build using LTO (default is no)])],
|
||||
[enable_lto=$enableval],
|
||||
[enable_lto=no])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
dnl Always set -g -O2 in our CXXFLAGS. Autoconf will try and set CXXFLAGS to "-g -O2" by default,
|
||||
dnl so we suppress that (if CXXFLAGS hasn't been overridden by the user), given we are adding it
|
||||
dnl ourselves.
|
||||
CORE_CXXFLAGS="$CORE_CXXFLAGS -g -O2"
|
||||
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
CXXFLAGS=""
|
||||
fi
|
||||
|
||||
dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may
|
||||
dnl appear to succeed because by default they merely emit warnings when they fail.
|
||||
dnl
|
||||
@@ -346,6 +368,12 @@ case $host in
|
||||
esac
|
||||
|
||||
if test "$enable_debug" = "yes"; then
|
||||
dnl If debugging is enabled, and the user hasn't overridden CXXFLAGS, clear
|
||||
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
|
||||
dnl with "-O0 -g3 -g -O2".
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
CXXFLAGS=""
|
||||
fi
|
||||
|
||||
dnl Disable all optimizations
|
||||
AX_CHECK_COMPILE_FLAG([-O0], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"], [], [$CXXFLAG_WERROR])
|
||||
@@ -365,14 +393,18 @@ if test "$enable_debug" = "yes"; then
|
||||
AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR])
|
||||
fi
|
||||
|
||||
if test "$enable_lto" = "yes"; then
|
||||
AX_CHECK_COMPILE_FLAG([-flto], [LTO_CXXFLAGS="$LTO_CXXFLAGS -flto"], [AC_MSG_ERROR([compile failed with -flto])], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-flto], [LTO_LDFLAGS="$LTO_LDFLAGS -flto"], [AC_MSG_ERROR([link failed with -flto])], [$CXXFLAG_WERROR])
|
||||
fi
|
||||
|
||||
if test "$use_sanitizers" != ""; then
|
||||
dnl First check if the compiler accepts flags. If an incompatible pair like
|
||||
dnl -fsanitize=address,thread is used here, this check will fail. This will also
|
||||
dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[-fsanitize=$use_sanitizers],
|
||||
[SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"
|
||||
SANITIZER_CFLAGS="-fsanitize=$use_sanitizers"],
|
||||
[SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"],
|
||||
[AC_MSG_ERROR([compiler did not accept requested flags])])
|
||||
|
||||
dnl Some compilers (e.g. GCC) require additional libraries like libasan,
|
||||
@@ -399,6 +431,12 @@ if test "$enable_werror" = "yes"; then
|
||||
AC_MSG_ERROR([enable-werror set but -Werror is not usable])
|
||||
fi
|
||||
ERROR_CXXFLAGS=$CXXFLAG_WERROR
|
||||
|
||||
dnl -Wreturn-type is broken in GCC for MinGW-w64.
|
||||
dnl https://sourceforge.net/p/mingw-w64/bugs/306/
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=return-type], [], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-error=return-type"], [$CXXFLAG_WERROR],
|
||||
[AC_LANG_SOURCE([[#include <cassert>
|
||||
int f(){ assert(false); }]])])
|
||||
fi
|
||||
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
@@ -410,7 +448,7 @@ if test "$CXXFLAGS_overridden" = "no"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wvla], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wshadow-field], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wthread-safety], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wloop-analysis"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-member-function], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdate-time], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"], [], [$CXXFLAG_WERROR])
|
||||
@@ -419,10 +457,16 @@ if test "$CXXFLAGS_overridden" = "no"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"], [], [$CXXFLAG_WERROR])
|
||||
dnl -Wsuggest-override is broken with GCC before 9.2
|
||||
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
|
||||
AX_CHECK_COMPILE_FLAG([-Wsuggest-override], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"], [], [$CXXFLAG_WERROR],
|
||||
[AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wimplicit-fallthrough"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
if test "$suppress_external_warnings" != "no" ; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR])
|
||||
fi
|
||||
|
||||
dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
|
||||
dnl unknown options if any other warning is produced. Test the -Wfoo case, and
|
||||
@@ -437,12 +481,6 @@ fi
|
||||
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
|
||||
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
dnl Currently all versions of gcc are subject to a class of bugs, see the
|
||||
dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and
|
||||
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set
|
||||
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
|
||||
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"])
|
||||
|
||||
enable_arm_crc=no
|
||||
enable_arm_shani=no
|
||||
enable_sse42=no
|
||||
@@ -450,6 +488,8 @@ enable_sse41=no
|
||||
enable_avx2=no
|
||||
enable_x86_shani=no
|
||||
|
||||
if test "$use_asm" = "yes"; then
|
||||
|
||||
dnl Check for optional instruction set support. Enabling these does _not_ imply that all code will
|
||||
dnl be compiled with them, rather that specific objects/libs may use them after checking for runtime
|
||||
dnl compatibility.
|
||||
@@ -549,7 +589,7 @@ CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
|
||||
# ARM
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS"
|
||||
@@ -588,6 +628,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
)
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO"
|
||||
|
||||
AC_ARG_WITH([utils],
|
||||
@@ -676,8 +718,6 @@ case $host in
|
||||
AC_MSG_ERROR([windres not found])
|
||||
fi
|
||||
|
||||
CORE_CPPFLAGS="$CORE_CPPFLAGS -DSECP256K1_STATIC"
|
||||
|
||||
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
|
||||
dnl Prevent the definition of min/max macros.
|
||||
dnl We always want to use the standard library.
|
||||
@@ -693,10 +733,6 @@ case $host in
|
||||
|
||||
dnl We require Windows 7 (NT 6.1) or later
|
||||
AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [$LDFLAG_WERROR])
|
||||
|
||||
dnl Avoid the use of aligned vector instructions when building for Windows.
|
||||
dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
|
||||
AX_CHECK_COMPILE_FLAG([-Wa,-muse-unaligned-vector-move], [CORE_CXXFLAGS="$CORE_CXXFLAGS -Wa,-muse-unaligned-vector-move"], [], [$CXXFLAG_WERROR])
|
||||
;;
|
||||
*darwin*)
|
||||
TARGET_OS=darwin
|
||||
@@ -717,7 +753,7 @@ case $host in
|
||||
dnl option to system-ify all /usr/local/include paths without adding it to the list
|
||||
dnl of search paths in case it's not already there.
|
||||
if test "$suppress_external_warnings" != "no"; then
|
||||
AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem -Xclang /usr/local/include/], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem -Xclang /usr/local/include/"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem/usr/local/include], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem/usr/local/include"], [], [$CXXFLAG_WERROR])
|
||||
fi
|
||||
|
||||
if test "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then
|
||||
@@ -767,7 +803,7 @@ case $host in
|
||||
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
|
||||
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
|
||||
AC_PATH_TOOL([OTOOL], [otool], [otool])
|
||||
AC_PATH_PROG([ZIP], [zip], [zip])
|
||||
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
|
||||
|
||||
dnl libtool will try to strip the static lib, which is a problem for
|
||||
dnl cross-builds because strip attempts to call a hard-coded ld,
|
||||
@@ -846,7 +882,13 @@ if test "$use_lcov" = "yes"; then
|
||||
[AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])])
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"],
|
||||
[AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])])
|
||||
CORE_CXXFLAGS="$CORE_CXXFLAGS -Og"
|
||||
dnl If coverage is enabled, and the user hasn't overridden CXXFLAGS, clear
|
||||
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
|
||||
dnl with "--coverage -Og -O0 -g -O2".
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
CXXFLAGS=""
|
||||
fi
|
||||
CORE_CXXFLAGS="$CORE_CXXFLAGS -Og -O0"
|
||||
fi
|
||||
|
||||
if test "$use_lcov_branch" != "no"; then
|
||||
@@ -881,6 +923,8 @@ if test "$ac_cv_sys_large_files" != "" &&
|
||||
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
|
||||
fi
|
||||
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||
|
||||
if test "$enable_gprof" = "yes"; then
|
||||
dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense,
|
||||
dnl we simply make them mutually exclusive here. Additionally, hardened toolchains may force
|
||||
@@ -903,6 +947,10 @@ if test "$TARGET_OS" != "windows"; then
|
||||
AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"])
|
||||
fi
|
||||
|
||||
dnl All versions of gcc that we commonly use for building are subject to bug
|
||||
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
|
||||
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
|
||||
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"])
|
||||
if test "$use_hardening" != "no"; then
|
||||
use_hardening=yes
|
||||
AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
|
||||
@@ -912,8 +960,7 @@ if test "$use_hardening" != "no"; then
|
||||
|
||||
case $host in
|
||||
*mingw*)
|
||||
dnl stack-clash-protection doesn't compile with GCC 10 and earlier.
|
||||
dnl In any case, it is a no-op for Windows.
|
||||
dnl stack-clash-protection doesn't currently work, and likely should just be skipped for Windows.
|
||||
dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details.
|
||||
;;
|
||||
*)
|
||||
@@ -921,21 +968,16 @@ if test "$use_hardening" != "no"; then
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host in
|
||||
*aarch64*)
|
||||
AX_CHECK_COMPILE_FLAG([-mbranch-protection=bti], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=bti"])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl When enable_debug is yes, all optimizations are disabled.
|
||||
dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning.
|
||||
dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes.
|
||||
if test "$enable_debug" != "yes"; then
|
||||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=3],[
|
||||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
|
||||
AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
|
||||
])
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=3"
|
||||
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -947,6 +989,12 @@ if test "$use_hardening" != "no"; then
|
||||
AX_CHECK_LINK_FLAG([-Wl,-z,now], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,-z,separate-code], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
case $host in
|
||||
*mingw*)
|
||||
AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl These flags are specific to ld64, and may cause issues with other linkers.
|
||||
@@ -955,10 +1003,10 @@ dnl "ad_strip" as the symbol for the entry point.
|
||||
if test "$TARGET_OS" = "darwin"; then
|
||||
AX_CHECK_LINK_FLAG([-Wl,-dead_strip], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,-dead_strip_dylibs], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip_dylibs"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,-fixup_chains], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,-bind_at_load], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"], [], [$LDFLAG_WERROR])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
|
||||
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
|
||||
|
||||
AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
|
||||
[#include <sys/types.h>
|
||||
@@ -973,6 +1021,18 @@ AC_CHECK_DECLS([pipe2])
|
||||
|
||||
AC_CHECK_FUNCS([timingsafe_bcmp])
|
||||
|
||||
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
|
||||
[#if HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#elif HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
|
||||
[#if HAVE_BYTESWAP_H
|
||||
#include <byteswap.h>
|
||||
#endif])
|
||||
|
||||
AC_MSG_CHECKING([for __builtin_clzl])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
|
||||
(void) __builtin_clzl(0);
|
||||
@@ -1008,7 +1068,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
|
||||
dnl Check for posix_fallocate
|
||||
AC_MSG_CHECKING([for posix_fallocate])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
// same as in src/util/fs_helpers.cpp
|
||||
// same as in src/util/system.cpp
|
||||
#ifdef __linux__
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
@@ -1106,16 +1166,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ctime>]],
|
||||
)
|
||||
|
||||
dnl Check for different ways of gathering OS randomness
|
||||
AC_MSG_CHECKING([for Linux getrandom function])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/random.h>]],
|
||||
[[ getrandom(nullptr, 32, 0); ]])],
|
||||
[ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETRANDOM], [1], [Define this symbol if the Linux getrandom function call is available]) ],
|
||||
AC_MSG_CHECKING([for Linux getrandom syscall])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <linux/random.h>]],
|
||||
[[ syscall(SYS_getrandom, nullptr, 32, 0); ]])],
|
||||
[ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYS_GETRANDOM], [1], [Define this symbol if the Linux getrandom system call is available]) ],
|
||||
[ AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([for getentropy via sys/random.h])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
AC_MSG_CHECKING([for getentropy via random.h])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
|
||||
#include <sys/random.h>]],
|
||||
[[ getentropy(nullptr, 32) ]])],
|
||||
[ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY_RAND], [1], [Define this symbol if the BSD getentropy system call is available with sys/random.h]) ],
|
||||
@@ -1145,6 +1206,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
[ AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([for if type char equals int8_t])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>
|
||||
#include <type_traits>]],
|
||||
[[ static_assert(std::is_same<int8_t, char>::value, ""); ]])],
|
||||
[ AC_MSG_RESULT([yes]); AC_DEFINE([CHAR_EQUALS_INT8], [1], [Define this symbol if type char equals int8_t]) ],
|
||||
[ AC_MSG_RESULT([no])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([for fdatasync])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
|
||||
[[ fdatasync(0); ]])],
|
||||
@@ -1289,6 +1358,8 @@ if test "$enable_fuzz_binary" = "yes"; then
|
||||
]],[[
|
||||
*/ int not_main() {
|
||||
]])])
|
||||
|
||||
CHECK_RUNTIME_LIB
|
||||
fi
|
||||
|
||||
if test "$enable_wallet" != "no"; then
|
||||
@@ -1334,9 +1405,7 @@ if test "$use_usdt" != "no"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <sys/sdt.h>],
|
||||
[DTRACE_PROBE(context, event);
|
||||
int a, b, c, d, e, f, g;
|
||||
DTRACE_PROBE7(context, event, a, b, c, d, e, f, g);]
|
||||
[DTRACE_PROBE("context", "event");]
|
||||
)],
|
||||
[AC_MSG_RESULT([yes]); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])],
|
||||
[AC_MSG_RESULT([no]); use_usdt=no;]
|
||||
@@ -1344,7 +1413,7 @@ if test "$use_usdt" != "no"; then
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"])
|
||||
|
||||
if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; then
|
||||
if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then
|
||||
use_upnp=no
|
||||
use_natpmp=no
|
||||
use_zmq=no
|
||||
@@ -1354,18 +1423,19 @@ dnl Check for libminiupnpc (optional)
|
||||
if test "$use_upnp" != "no"; then
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $MINIUPNPC_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], [], [have_miniupnpc=no])
|
||||
|
||||
AC_CHECK_HEADERS(
|
||||
[miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
|
||||
[AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS])],
|
||||
[have_miniupnpc=no]
|
||||
)
|
||||
dnl The minimum supported miniUPnPc API version is set to 10. This keeps compatibility
|
||||
dnl with Ubuntu 16.04 LTS and Debian 8 libminiupnpc-dev packages.
|
||||
if test "$have_miniupnpc" != "no"; then
|
||||
AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS])
|
||||
|
||||
dnl The minimum supported miniUPnPc API version is set to 17. This excludes
|
||||
dnl versions with known vulnerabilities.
|
||||
AC_MSG_CHECKING([whether miniUPnPc API version is supported])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <miniupnpc/miniupnpc.h>
|
||||
]], [[
|
||||
#if MINIUPNPC_API_VERSION >= 17
|
||||
#if MINIUPNPC_API_VERSION >= 10
|
||||
// Everything is okay
|
||||
#else
|
||||
# error miniUPnPc API version is too old
|
||||
@@ -1374,7 +1444,7 @@ if test "$use_upnp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([miniUPnPc API version < 17 is unsupported, disabling UPnP support.])
|
||||
AC_MSG_WARN([miniUPnPc API version < 10 is unsupported, disabling UPnP support.])
|
||||
have_miniupnpc=no
|
||||
])
|
||||
fi
|
||||
@@ -1385,16 +1455,13 @@ dnl Check for libnatpmp (optional).
|
||||
if test "$use_natpmp" != "no"; then
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $NATPMP_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([natpmp.h], [], [have_natpmp=no])
|
||||
|
||||
if test "$have_natpmp" != "no"; then
|
||||
AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS="$NATPMP_LIBS -lnatpmp"], [have_natpmp=no], [$NATPMP_LIBS])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([natpmp.h],
|
||||
[AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS="$NATPMP_LIBS -lnatpmp"], [have_natpmp=no], [$NATPMP_LIBS])],
|
||||
[have_natpmp=no])
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench" = "nonononononono"; then
|
||||
use_boost=no
|
||||
else
|
||||
use_boost=yes
|
||||
@@ -1403,7 +1470,7 @@ fi
|
||||
if test "$use_boost" = "yes"; then
|
||||
|
||||
dnl Check for Boost headers
|
||||
AX_BOOST_BASE([1.73.0],[],[AC_MSG_ERROR([Boost is not available!])])
|
||||
AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])])
|
||||
if test "$want_boost" = "no"; then
|
||||
AC_MSG_ERROR([only libbitcoinconsensus can be built without Boost])
|
||||
fi
|
||||
@@ -1412,11 +1479,13 @@ if test "$use_boost" = "yes"; then
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
|
||||
|
||||
dnl Prevent use of std::unary_function, which was removed in C++17,
|
||||
dnl and will generate warnings with newer compilers for Boost
|
||||
dnl older than 1.80.
|
||||
dnl See: https://github.com/boostorg/config/pull/430.
|
||||
AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
|
||||
[AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
|
||||
dnl and will generate warnings with newer compilers.
|
||||
dnl See: https://github.com/boostorg/container_hash/issues/22.
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
|
||||
|
||||
if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then
|
||||
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
|
||||
fi
|
||||
|
||||
if test "$suppress_external_warnings" != "no"; then
|
||||
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
|
||||
@@ -1424,58 +1493,78 @@ if test "$use_boost" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$use_external_signer" != "no"; then
|
||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
dnl Boost 1.78 requires the following workaround.
|
||||
dnl See: https://github.com/boostorg/process/issues/235
|
||||
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
TEMP_LDFLAGS="$LDFLAGS"
|
||||
dnl Boost 1.73 and older require the following workaround.
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define BOOST_PROCESS_USE_STD_FS
|
||||
#include <boost/process.hpp>
|
||||
]],[[
|
||||
namespace bp = boost::process;
|
||||
bp::opstream stdin_stream;
|
||||
bp::ipstream stdout_stream;
|
||||
bp::child c("dummy", bp::std_out > stdout_stream, bp::std_err > stdout_stream, bp::std_in < stdin_stream);
|
||||
stdin_stream << std::string{"test"} << std::endl;
|
||||
if (c.running()) c.terminate();
|
||||
c.wait();
|
||||
c.exit_code();
|
||||
]])],
|
||||
[have_boost_process="yes"],
|
||||
[have_boost_process="no"])
|
||||
LDFLAGS="$TEMP_LDFLAGS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
AC_MSG_RESULT([$have_boost_process])
|
||||
if test "$have_boost_process" = "yes"; then
|
||||
case $host in
|
||||
dnl Boost Process for Windows uses Boost ASIO. Boost ASIO performs
|
||||
dnl pre-main init of Windows networking libraries, which we do not
|
||||
dnl want.
|
||||
*mingw*)
|
||||
use_external_signer="no"
|
||||
;;
|
||||
*)
|
||||
case $host in
|
||||
*mingw*)
|
||||
dnl Boost Process uses Boost Filesystem when targeting Windows. Also,
|
||||
dnl since Boost 1.71.0, Process does not work with mingw-w64 without
|
||||
dnl workarounds. See 67669ab425b52a2b6be3d2f3b3b7e3939b676a2c.
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported on Windows])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
dnl Boost 1.78 requires the following workaround.
|
||||
dnl See: https://github.com/boostorg/process/issues/235
|
||||
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
TEMP_LDFLAGS="$LDFLAGS"
|
||||
dnl Boost 1.73 and older require the following workaround.
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
|
||||
[have_boost_process="yes"],
|
||||
[have_boost_process="no"])
|
||||
LDFLAGS="$TEMP_LDFLAGS"
|
||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
AC_MSG_RESULT([$have_boost_process])
|
||||
if test "$have_boost_process" = "yes"; then
|
||||
use_external_signer="yes"
|
||||
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
||||
AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem])
|
||||
;;
|
||||
esac
|
||||
else
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported for this Boost version])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
fi
|
||||
else
|
||||
if test "$use_external_signer" = "yes"; then
|
||||
AC_MSG_ERROR([External signing is not supported for this Boost version])
|
||||
fi
|
||||
use_external_signer="no";
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "$use_external_signer" = "yes"])
|
||||
|
||||
dnl Do not compile with syscall sandbox support when compiling under the sanitizers.
|
||||
dnl The sanitizers introduce use of syscalls that are not typically used in bitcoind
|
||||
dnl (such as execve when the sanitizers execute llvm-symbolizer).
|
||||
if test "$use_sanitizers" != ""; then
|
||||
AC_MSG_WARN([Specifying --with-sanitizers forces --without-seccomp since the sanitizers introduce use of syscalls not allowed by the bitcoind syscall sandbox (-sandbox=<mode>).])
|
||||
seccomp_found=no
|
||||
fi
|
||||
if test "$seccomp_found" != "no"; then
|
||||
AC_MSG_CHECKING([for seccomp-bpf (Linux x86-64)])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <linux/seccomp.h>
|
||||
]], [[
|
||||
#if !defined(__x86_64__)
|
||||
# error Syscall sandbox is an experimental feature currently available only under Linux x86-64.
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
seccomp_found="yes"
|
||||
AC_DEFINE([USE_SYSCALL_SANDBOX], [1], [Define this symbol to build with syscall sandbox support.])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
seccomp_found="no"
|
||||
])
|
||||
fi
|
||||
dnl Currently only enable -sandbox=<mode> feature if seccomp is found.
|
||||
dnl In the future, sandboxing could be also be supported with other
|
||||
dnl sandboxing mechanisms besides seccomp.
|
||||
use_syscall_sandbox=$seccomp_found
|
||||
AM_CONDITIONAL([ENABLE_SYSCALL_SANDBOX], [test "$use_syscall_sandbox" != "no"])
|
||||
|
||||
dnl Check for reduced exports
|
||||
if test "$use_reduce_exports" = "yes"; then
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
|
||||
@@ -1534,9 +1623,12 @@ dnl ZMQ check
|
||||
|
||||
if test "$use_zmq" = "yes"; then
|
||||
PKG_CHECK_MODULES([ZMQ], [libzmq >= 4],
|
||||
AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]),
|
||||
[AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
|
||||
AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]),
|
||||
[AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
|
||||
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
|
||||
use_zmq=no])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
|
||||
if test "$use_zmq" = "yes"; then
|
||||
@@ -1548,8 +1640,6 @@ if test "$use_zmq" = "yes"; then
|
||||
esac
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
|
||||
|
||||
dnl libmultiprocess library check
|
||||
|
||||
libmultiprocess_found=no
|
||||
@@ -1675,10 +1765,17 @@ if test "$have_miniupnpc" = "no"; then
|
||||
else
|
||||
if test "$use_upnp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([whether to build with UPnP enabled by default])
|
||||
use_upnp=yes
|
||||
AC_DEFINE([USE_UPNP], [1], [Define to 1 if UPnP support should be compiled in.])
|
||||
upnp_setting=0
|
||||
if test "$use_upnp_default" != "no"; then
|
||||
use_upnp_default=yes
|
||||
upnp_setting=1
|
||||
fi
|
||||
AC_MSG_RESULT([$use_upnp_default])
|
||||
AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
|
||||
if test "$TARGET_OS" = "windows"; then
|
||||
MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DMINIUPNP_STATICLIB"
|
||||
MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DSTATICLIB -DMINIUPNP_STATICLIB"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -1696,8 +1793,15 @@ if test "$have_natpmp" = "no"; then
|
||||
else
|
||||
if test "$use_natpmp" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([whether to build with NAT-PMP enabled by default])
|
||||
use_natpmp=yes
|
||||
AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.])
|
||||
natpmp_setting=0
|
||||
if test "$use_natpmp_default" != "no"; then
|
||||
use_natpmp_default=yes
|
||||
natpmp_setting=1
|
||||
fi
|
||||
AC_MSG_RESULT($use_natpmp_default)
|
||||
AC_DEFINE_UNQUOTED([USE_NATPMP], [$natpmp_setting], [NAT-PMP support not compiled if undefined, otherwise value (0 or 1) determines default state])
|
||||
if test "$TARGET_OS" = "windows"; then
|
||||
NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB"
|
||||
fi
|
||||
@@ -1744,6 +1848,8 @@ if test "$bitcoin_enable_qt" != "no"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin])
|
||||
if test "$use_tests" = "yes"; then
|
||||
if test "$enable_fuzz" = "yes"; then
|
||||
@@ -1764,7 +1870,7 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nononononononononono"; then
|
||||
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
|
||||
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
|
||||
fi
|
||||
|
||||
@@ -1791,6 +1897,7 @@ AM_CONDITIONAL([ENABLE_AVX2], [test "$enable_avx2" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_X86_SHANI], [test "$enable_x86_shani" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_ARM_CRC], [test "$enable_arm_crc" = "yes"])
|
||||
AM_CONDITIONAL([ENABLE_ARM_SHANI], [test "$enable_arm_shani" = "yes"])
|
||||
AM_CONDITIONAL([USE_ASM], [test "$use_asm" = "yes"])
|
||||
AM_CONDITIONAL([WORDS_BIGENDIAN], [test "$ac_cv_c_bigendian" = "yes"])
|
||||
AM_CONDITIONAL([USE_NATPMP], [test "$use_natpmp" = "yes"])
|
||||
AM_CONDITIONAL([USE_UPNP], [test "$use_upnp" = "yes"])
|
||||
@@ -1841,6 +1948,8 @@ AC_SUBST(GPROF_LDFLAGS)
|
||||
AC_SUBST(HARDENED_CXXFLAGS)
|
||||
AC_SUBST(HARDENED_CPPFLAGS)
|
||||
AC_SUBST(HARDENED_LDFLAGS)
|
||||
AC_SUBST(LTO_CXXFLAGS)
|
||||
AC_SUBST(LTO_LDFLAGS)
|
||||
AC_SUBST(PIC_FLAGS)
|
||||
AC_SUBST(PIE_FLAGS)
|
||||
AC_SUBST(SANITIZER_CXXFLAGS)
|
||||
@@ -1875,8 +1984,13 @@ AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
|
||||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
|
||||
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
|
||||
AC_CONFIG_LINKS([contrib/devtools/security-check.py:contrib/devtools/security-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/symbol-check.py:contrib/devtools/symbol-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-security-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/test-symbol-check.py:contrib/devtools/test-symbol-check.py])
|
||||
AC_CONFIG_LINKS([contrib/devtools/iwyu/bitcoin.core.imp:contrib/devtools/iwyu/bitcoin.core.imp])
|
||||
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
|
||||
AC_CONFIG_LINKS([contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff])
|
||||
AC_CONFIG_LINKS([src/.bear-tidy-config:src/.bear-tidy-config])
|
||||
AC_CONFIG_LINKS([src/.clang-tidy:src/.clang-tidy])
|
||||
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
|
||||
@@ -1894,10 +2008,15 @@ CPPFLAGS_TEMP="$CPPFLAGS"
|
||||
unset CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS_TEMP"
|
||||
|
||||
if test -n "$use_sanitizers"; then
|
||||
export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS"
|
||||
fi
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
|
||||
LDFLAGS_TEMP="$LDFLAGS"
|
||||
unset LDFLAGS
|
||||
LDFLAGS="$LDFLAGS_TEMP"
|
||||
|
||||
LIBS_TEMP="$LIBS"
|
||||
unset LIBS
|
||||
LIBS="$LIBS_TEMP"
|
||||
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig"
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -1910,21 +2029,11 @@ case ${OS} in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl An old hack similar to a98356fee to remove hard-coded
|
||||
dnl bind_at_load flag from libtool
|
||||
case $host in
|
||||
*darwin*)
|
||||
AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.])
|
||||
sed < libtool > libtool-2 '/bind_at_load/d'
|
||||
mv libtool-2 libtool
|
||||
chmod 755 libtool
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo "Options used to compile and link:"
|
||||
echo " external signer = $use_external_signer"
|
||||
echo " multiprocess = $build_multiprocess"
|
||||
echo " with experimental syscall sandbox support = $use_syscall_sandbox"
|
||||
echo " with libs = $build_bitcoin_libs"
|
||||
echo " with wallet = $enable_wallet"
|
||||
if test "$enable_wallet" != "no"; then
|
||||
@@ -1945,21 +2054,23 @@ echo " with fuzz binary = $enable_fuzz_binary"
|
||||
echo " with bench = $use_bench"
|
||||
echo " with upnp = $use_upnp"
|
||||
echo " with natpmp = $use_natpmp"
|
||||
echo " use asm = $use_asm"
|
||||
echo " USDT tracing = $use_usdt"
|
||||
echo " sanitizers = $use_sanitizers"
|
||||
echo " debug enabled = $enable_debug"
|
||||
echo " gprof enabled = $enable_gprof"
|
||||
echo " werror = $enable_werror"
|
||||
echo " LTO = $enable_lto"
|
||||
echo
|
||||
echo " target os = $host_os"
|
||||
echo " build os = $build_os"
|
||||
echo
|
||||
echo " CC = $CC"
|
||||
echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS"
|
||||
echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS"
|
||||
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
|
||||
echo " CXX = $CXX"
|
||||
echo " CXXFLAGS = $CORE_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $SANITIZER_CXXFLAGS $CXXFLAGS"
|
||||
echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $SANITIZER_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
|
||||
echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||
echo " LDFLAGS = $LTO_LDFLAGS $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
|
||||
echo " AR = $AR"
|
||||
echo " ARFLAGS = $ARFLAGS"
|
||||
echo
|
||||
|
||||
@@ -26,6 +26,9 @@ The [Debian](/contrib/debian) subfolder contains the copyright file.
|
||||
|
||||
All other packaging related files can be found in the [bitcoin-core/packaging](https://github.com/bitcoin-core/packaging) repository.
|
||||
|
||||
### [Builder keys](/contrib/builder-keys)
|
||||
PGP keys used for signing Bitcoin Core [release](/doc/release-process.md) results.
|
||||
|
||||
### [MacDeploy](/contrib/macdeploy) ###
|
||||
Scripts and notes for Mac builds.
|
||||
|
||||
@@ -35,11 +38,5 @@ Test and Verify Tools
|
||||
### [TestGen](/contrib/testgen) ###
|
||||
Utilities to generate test vectors for the data-driven Bitcoin tests.
|
||||
|
||||
### [Verify-Binaries](/contrib/verify-binaries) ###
|
||||
### [Verify Binaries](/contrib/verifybinaries) ###
|
||||
This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.
|
||||
|
||||
Command Line Tools
|
||||
---------------------
|
||||
|
||||
### [Completions](/contrib/completions) ###
|
||||
Shell completions for bash and fish.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoin-cli(1)
|
||||
# Copyright (c) 2012-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoin-tx(1)
|
||||
# Copyright (c) 2016-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# bash programmable completion for bitcoind(1) and bitcoin-qt(1)
|
||||
# Copyright (c) 2012-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
33
contrib/builder-keys/README.md
Normal file
33
contrib/builder-keys/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
## PGP keys of builders and Developers
|
||||
|
||||
The file `keys.txt` contains fingerprints of the public keys of builders and
|
||||
active developers.
|
||||
|
||||
The associated keys are mainly used to sign git commits or the build results
|
||||
of Guix builds.
|
||||
|
||||
The most recent version of each pgp key can be found on most pgp key servers.
|
||||
|
||||
Fetch the latest version from the key server to see if any key was revoked in
|
||||
the meantime.
|
||||
To fetch the latest version of all pgp keys in your gpg homedir,
|
||||
|
||||
```sh
|
||||
gpg --refresh-keys
|
||||
```
|
||||
|
||||
To fetch keys of builders and active developers, feed the list of fingerprints
|
||||
of the primary keys into gpg:
|
||||
|
||||
On \*NIX:
|
||||
```sh
|
||||
while read fingerprint keyholder_name; do gpg --keyserver hkps://keys.openpgp.org --recv-keys ${fingerprint}; done < ./keys.txt
|
||||
```
|
||||
|
||||
On Windows (requires Gpg4win >= 4.0.0):
|
||||
```
|
||||
FOR /F "tokens=1" %i IN (keys.txt) DO gpg --keyserver hkps://keys.openpgp.org --recv-keys %i
|
||||
```
|
||||
|
||||
Add your key to the list if you provided Guix attestations for two major or
|
||||
minor releases of Bitcoin Core.
|
||||
57
contrib/builder-keys/keys.txt
Normal file
57
contrib/builder-keys/keys.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C Aaron Clauson (sipsorcery)
|
||||
617C90010B3BD370B0AC7D424BB42E31C79111B8 Akira Takizawa (akx20000)
|
||||
E944AE667CF960B1004BC32FCA662BE18B877A60 Andreas Schildbach (aschildbach)
|
||||
152812300785C96444D3334D17565732E08E5E41 Andrew Chow (achow101)
|
||||
590B7292695AFFA5B672CBB2E13FC145CD3F4304 Antoine Poinsot (darosior)
|
||||
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 Ben Carman (benthecarman)
|
||||
912FD3228387123DC97E0E57D5566241A0295FA9 BtcDrak (btcdrak)
|
||||
04017A2A6D9A0CCDC81D8EC296AB007F1A7ED999 Carl Dong (dongcarl)
|
||||
C519EBCF3B926298946783EFF6430754120EC2F4 Christian Decker (cdecker)
|
||||
18AE2F798E0D239755DA4FD24B79F986CBDF8736 Chun Kuan Le (ken2812221)
|
||||
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 CoinForensics (CoinForensics)
|
||||
F20F56EF6A067F70E8A5C99FFF95FAA971697405 centaur (centaur)
|
||||
C060A6635913D98A3587D7DB1C2491FFEB0EF770 Cory Fields (cfields)
|
||||
BF6273FAEF7CC0BA1F562E50989F6B3048A116B5 Dev Random (devrandom)
|
||||
6D3170C1DC2C6FD0AEEBCA6743811D1A26623924 Douglas Roark (droark)
|
||||
948444FCE03B05BA5AB0591EC37B1C1D44C786EE Duncan Dean (dunxen)
|
||||
1C6621605EC50319C463D56C7F81D87985D61612 Emanuele Cisbani (cisba)
|
||||
9A1689B60D1B3CCE9262307A2F40A9BF167FBA47 Erik Mossberg (erkmos)
|
||||
D35176BE9264832E4ACA8986BF0792FBE95DC863 fivepiece (fivepiece)
|
||||
6F993B250557E7B016ADE5713BDCDA2D87A881D9 Fuzzbawls (Fuzzbawls)
|
||||
01CDF4627A3B88AAE4A571C87588242FBE38D3A8 Gavin Andresen (gavinandresen)
|
||||
6B002C6EA3F91B1B0DF0C9BC8F617F1200A6D25C Gloria Zhao (glozow)
|
||||
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F Hennadii Stepanov (hebasto)
|
||||
A2FD494D0021AA9B4FA58F759102B7AE654A4A5A Ilyas Ridhuan (IlyasRidhuan)
|
||||
2688F5A9A4BE0F295E921E8A25F27A38A47AD566 James O'Beirne (jamesob)
|
||||
D3F22A3A4C366C2DCB66D3722DA9C5A7FA81EA35 Jarol Rodriguez (jarolrod)
|
||||
7480909378D544EA6B6DCEB7535B12980BB8A4D3 Jeffri H Frontz (jhfrontz)
|
||||
D3CC177286005BB8FF673294C5242A1AB3936517 jl2012 (jl2012)
|
||||
82921A4B88FD454B7EB8CE3C796C4109063D4EAF Jon Atack (jonatack)
|
||||
32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC Jonas Schnelli (jonasschnelli)
|
||||
4B4E840451149DD7FB0D633477DFAB5C3108B9A8 Jorge Timon (jtimon)
|
||||
C42AFF7C61B3E44A1454CD3557AF762DB3353322 Karl-Johan Alm (kallewoof)
|
||||
70A1D47DD44F59DF8B22244333E472FE870C7E5D Kristaps Kaupe (kristapsk)
|
||||
30DE693AE0DE9E37B3E7EB6BBFF0F67810C1EED1 Lisa Neigut (niftynei)
|
||||
E463A93F5F3117EEDE6C7316BD02942421F4889F Luke Dashjr (luke-jr)
|
||||
B8B3F1C0E58C15DB6A81D30C3648A882F4316B9B Marco Falke (marco)
|
||||
07DF3E57A548CCFB7530709189BBB8663E2E65CE Matt Corallo (BlueMatt)
|
||||
CA03882CB1FC067B5D3ACFE4D300116E1C875A3D MeshCollider (meshcollider)
|
||||
E777299FC265DD04793070EB944D35F9AC3DB76A Michael Ford (fanquake)
|
||||
AD5764F4ADCE1B99BDFD179E12335A271D4D62EC Michael Tidwell (miketwenty1)
|
||||
9692B91BBF0E8D34DFD33B1882C5C009628ECF0C Michagogo (michagogo)
|
||||
C57E4B42223FDE851D4F69DD28DF2724F241D8EE midnightmagic (midnightmagic)
|
||||
F4FC70F07310028424EFC20A8E4256593F177720 Oliver Gugger (guggero, Oliver Gugger)
|
||||
D62A803E27E7F43486035ADBBCD04D8E9CCCAC2A Paul Rabahy (prab)
|
||||
37EC7D7B0A217CDB4B4E007E7FAB114267E4FA04 Peter Todd (petertodd)
|
||||
D762373D24904A3E42F33B08B9A408E71DAAC974 Pieter Wuille [Location: Leuven, Belgium] (sipa)
|
||||
133EAC179436F14A5CF1B794860FEB804E669320 Pieter Wuille (sipa)
|
||||
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 Sebastian Falbesoner (theStack)
|
||||
A8FC55F3B04BA3146F3492E79303B33A305224CB Sebastian Kung (TheCharlatan)
|
||||
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 Sjors Provoost (sjors)
|
||||
867345026B6763E8B07EE73AB6737117397F5C4F Stephan Oeste (Emzy)
|
||||
9EDAFF80E080659604F4A76B2EBB056FD847F8A7 Stephan Oeste (Emzy)
|
||||
6DEEF79B050C4072509B743F8C275BC595448867 Tomas Kanocz (KanoczTomas)
|
||||
AEC1884398647C47413C1C3FB1179EB7347DC10D Warren Togami (wtogami)
|
||||
74E2DEF5D77260B98BC19438099BAD163C70FBFA Will Clark (will8clark)
|
||||
79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF Willy Ko (willyko)
|
||||
71A3B16735405025D447E8F274810B012346C9A6 Wladimir J. van der Laan (laanwj)
|
||||
@@ -1,99 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-cli --no-files
|
||||
|
||||
function __fish_bitcoin_cli_get_commands_helper
|
||||
set --local cmd (commandline -oc)
|
||||
|
||||
# Don't return commands if '-help or -?' in commandline
|
||||
if string match --quiet --regex -- '^-help$|^-\?$' $cmd
|
||||
return
|
||||
end
|
||||
|
||||
# Strip help cmd from token to avoid duplication errors
|
||||
set --local cmd (string match --invert --regex -- '^help$' $cmd)
|
||||
# Strip -stdin* options to avoid waiting for input while we fetch completions
|
||||
# TODO: this appears to be broken when run as tab completion (requires ctrl+c to exit)
|
||||
set --local cmd (string match --invert --regex -- '^-stdin.*$' $cmd)
|
||||
|
||||
# Match, format and return commands
|
||||
for command in ($cmd help 2>&1 | string match --invert -r '^\=\=.*' | string match --invert -r '^\\s*$')
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
function __fish_bitcoin_cli_get_commands
|
||||
argparse 'nohelp' 'commandsonly' -- $argv
|
||||
set --local commands
|
||||
|
||||
# Exclude description, exclude help
|
||||
if set -q _flag_nohelp; and set -q _flag_commandsonly
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help')
|
||||
# Include description, exclude help
|
||||
else if set -q _flag_nohelp
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help')
|
||||
# Exclude description, include help
|
||||
else if set -q _flag_commandsonly
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '')
|
||||
# Include description, include help
|
||||
else
|
||||
set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t)
|
||||
end
|
||||
|
||||
if string match -q -r '^.*error.*$' $commands[1]
|
||||
# RPC offline or RPC wallet not loaded
|
||||
return
|
||||
else
|
||||
for command in $commands
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function __fish_bitcoin_cli_get_options
|
||||
argparse 'nofiles' -- $argv
|
||||
set --local cmd (commandline -oc)
|
||||
# Don't return options if '-help or -?' in commandline
|
||||
if string match --quiet --regex -- '^-help$|-\?$' $cmd
|
||||
return
|
||||
end
|
||||
set --local options
|
||||
|
||||
if set -q _flag_nofiles
|
||||
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
|
||||
else
|
||||
set --append options ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
|
||||
end
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Add options with file completion
|
||||
# Don't offer after a command is given
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_options)"
|
||||
# Enable file completions only if the commandline now contains a `*.=` style option
|
||||
complete --command bitcoin-cli \
|
||||
--condition 'string match --regex -- ".*=" (commandline -pt)' \
|
||||
--force-files
|
||||
|
||||
# Add options without file completion
|
||||
# Don't offer after a command is given
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_options --nofiles)"
|
||||
|
||||
# Add commands
|
||||
# Permit command completions after `bitcoin-cli help` but not after other commands
|
||||
complete \
|
||||
--command bitcoin-cli \
|
||||
--no-files \
|
||||
--condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly --nohelp)" \
|
||||
--arguments "(__fish_bitcoin_cli_get_commands)"
|
||||
@@ -1,35 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-qt --no-files
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoinqt_get_options
|
||||
argparse 'nofiles' -- $argv
|
||||
set --local cmd (commandline -opc)[1]
|
||||
set --local options
|
||||
|
||||
if set -q _flag_nofiles
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match --invert -r '^.*=$')
|
||||
else
|
||||
set --append options ($cmd -help-debug | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=' | string match -r '^.*=$')
|
||||
end
|
||||
|
||||
for option in $options
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Add options with file completion
|
||||
complete \
|
||||
--command bitcoin-qt \
|
||||
--arguments "(__fish_bitcoinqt_get_options)"
|
||||
# Enable file completions only if the commandline now contains a `*.=` style option
|
||||
complete -c bitcoin-qt \
|
||||
--condition 'string match --regex -- ".*=" (commandline -pt)' \
|
||||
--force-files
|
||||
|
||||
# Add options without file completion
|
||||
complete \
|
||||
--command bitcoin-qt \
|
||||
--arguments "(__fish_bitcoinqt_get_options --nofiles)"
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
# Disable files from being included in completions by default
|
||||
complete --command bitcoin-tx --no-files
|
||||
|
||||
# Modified version of __fish_seen_subcommand_from
|
||||
# Uses regex to detect cmd= syntax
|
||||
function __fish_bitcoin_seen_cmd
|
||||
set -l cmd (commandline -oc)
|
||||
set -e cmd[1]
|
||||
for i in $cmd
|
||||
for j in $argv
|
||||
if string match --quiet --regex -- "^$j.*" $i
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
# Extract options
|
||||
function __fish_bitcoin_tx_get_options
|
||||
set --local cmd (commandline -oc)[1]
|
||||
if string match --quiet --regex -- '^-help$|-\?$' $cmd
|
||||
return
|
||||
end
|
||||
|
||||
for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=')
|
||||
echo $option
|
||||
end
|
||||
end
|
||||
|
||||
# Extract commands
|
||||
function __fish_bitcoin_tx_get_commands
|
||||
argparse 'commandsonly' -- $argv
|
||||
set --local cmd (commandline -oc)[1]
|
||||
set --local commands
|
||||
|
||||
if set -q _flag_commandsonly
|
||||
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '' | string replace -r '=.*' '')
|
||||
else
|
||||
set --append commands ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '')
|
||||
end
|
||||
|
||||
for command in $commands
|
||||
echo $command
|
||||
end
|
||||
end
|
||||
|
||||
# Add options
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--condition "not __fish_bitcoin_seen_cmd (__fish_bitcoin_tx_get_commands --commandsonly)" \
|
||||
--arguments "(__fish_bitcoin_tx_get_options)" \
|
||||
--no-files
|
||||
|
||||
# Add commands
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--arguments "(__fish_bitcoin_tx_get_commands)" \
|
||||
--no-files
|
||||
|
||||
# Add file completions for load and set commands
|
||||
complete \
|
||||
--command bitcoin-tx \
|
||||
--condition 'string match --regex -- "(load|set)=" (commandline -pt)' \
|
||||
--force-files
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user