f49840dd90doc: Fix typo in files.md (Ryan Ofsky)f5cf0b1cccbitcoin wrapper: improve help output (Ryan Ofsky)c810b168b8doc: Add description of installed files to files.md (Ryan Ofsky)94ffd01a02doc: Add release notes describing libexec/ binaries (Ryan Ofsky)cd97905ebccmake: Move internal binaries from bin/ to libexec/ (Ryan Ofsky) Pull request description: This change moves binaries that are not typically invoked directly by users from the `bin/` directory to the `libexec/` directory in CMake installs and binary releases. The goal of the PR is to introduce a distinction between internal and external binaries so starting with #31802, we can use IPC to implement features in new binaries without adding those binaries to the CLI. The change also helps reduce clutter in `bin/`, making it easier for users to identify useful tools to run. Summary of changes: - For **source builds** (i.e. developer builds) — There are no changes. - For **source installs** (i.e. `cmake --install` result) — `test_bitcoin`, `test_bitcoin-qt`, and `bench_bitcoin` are installed in `${CMAKE_PREFIX_PATH}/libexec` instead of `${CMAKE_PREFIX_PATH}/bin`, so they are no longer on the system `PATH`. However, they can still be invoked from the `libexec/` directory, or from the CLI as `bitcoin test`, `bitcoin test-gui`, and `bitcoin bench`, respectively. - For **binary releases** — Since `test_bitcoin` is the only test binary enabled in releases, the only change is moving `test_bitcoin` from `bin/` to `libexec/`. <details><summary>Details</summary> <p> The table below shows the install location of each binary after this change, and the availability of each binary. | Binary | Location | Availability | Change | |----------------------|--------------|----------------------|-------------------------------| | `bitcoin` | `bin/` | 📦 Binary release (since #31375) | Unchanged | | `bitcoin-cli` | `bin/` | 📦 Binary release | Unchanged | | `bitcoind` | `bin/` | 📦 Binary release | Unchanged | | `bitcoin-qt` | `bin/` | 📦 Binary release | Unchanged | | `bitcoin-tx` | `bin/` | 📦 Binary release | Unchanged | | `bitcoin-util` | `bin/` | 📦 Binary release | Unchanged | | `bitcoin-wallet` | `bin/` | 📦 Binary release | Unchanged | | `bench_bitcoin` | `libexec/` | 🛠 Source build only | Moved from `bin/` | | `bitcoin-chainstate` | `libexec/` | 🛠 Source build only | Newly installed (was built) | | `bitcoin-gui` | `libexec/` | 🛠 Source build only (until #31802) | Moved from `bin/` | | `bitcoin-node` | `libexec/` | 🛠 Source build only (until #31802) | Moved from `bin/` | | `test_bitcoin` | `libexec/` | 📦 Binary release | Moved from `bin/` | | `test_bitcoin-qt` | `libexec/` | 🛠 Source build only | Moved from `bin/` | </p> </details> --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722). ACKs for top commit: l0rinc: re-ACKf49840dd90Sjors: re-ACKf49840dd90achow101: ACKf49840dd90janb84: re ACKf49840dd90BrandonOdiwuor: Tested ACKf49840dd90hodlinator: re-ACKf49840dd90willcl-ark: utACKf49840dd90Tree-SHA512: 858a2e1a53db11ee3c5c759bfdeea566f242b9ce5e8a898fa435222e41662b8184577c0dc2c4c058294b4de41d8cb3ba3e5d24c748c280efa4a3f84e3ec4344d
CI Scripts
This directory contains scripts for each build step in each build stage.
Running a Stage Locally
Be aware that the tests will be built and run in-place, so please run at your own risk. 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 the ci system locally on your 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
sudo apt install bash docker.io python3 qemu-user-static
It is recommended to run the ci system in a clean env. To run the test stage with a specific configuration,
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
Configurations
The test files (FILE_ENV) are constructed to test a wide range of
configurations, rather than a single pass/fail. This helps to catch build
failures and logic errors that present on platforms other than the ones the
author has tested.
Some builders use the dependency-generator in ./depends, rather than using
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.
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'
The files starting with 0n (n greater than 0) are the scripts that are run
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 trigger cache-invalidation and rebuilds as necessary.