dash/ci
MarcoFalke 5a8df5e996
partial Merge #18735: ci: Add and document BASE_BUILD_DIR
fae49f6e424f31e93c5620d5ff893fb517ef4a8b ci: Add and document BASE_BUILD_DIR (MarcoFalke)

Pull request description:

  Also fixes #18768

ACKs for top commit:
  hebasto:
    re-ACK fae49f6e424f31e93c5620d5ff893fb517ef4a8b, which is essentially the same as the previously [reviewed changes](https://github.com/bitcoin/bitcoin/pull/18735#pullrequestreview-400581536).

Tree-SHA512: 216565a05ccd513dd9f114b2333d3c283fd71914d32f9b05f145cb7c70633b083ff8ef60798d6f22f4be6a4d652b03806551fd74b5b596c92968501a4d9726d2
2024-01-09 08:13:04 -06:00
..
dash partial Merge #20182: ci: Build with --enable-werror by default, and document exceptions 2024-01-06 19:30:15 -06:00
lint Merge #20567: test: Add option to git-subtree-check to do full check, add help 2023-12-06 11:40:14 -06:00
retry
test partial Merge #18735: ci: Add and document BASE_BUILD_DIR 2024-01-09 08:13:04 -06:00
README.md Merge #12134: Build previous releases and run functional tests 2023-09-19 08:54:12 -05:00
test_run_all.sh

ci scripts

This directory contains scripts for each build step in each build stage.

Currently three stages lint, extended_lint and test are defined. Each stage has its own lifecycle, similar to the Travis CI lifecycle. Every script in here is named and numbered according to which stage and lifecycle step it belongs to.

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 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 docker to be installed. To install all requirements on Ubuntu, run

sudo apt install docker.io bash

To run the default test stage,

./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