Commit Graph

775 Commits

Author SHA1 Message Date
MarcoFalke fa2c894cbb
ci: move-only CI_CONTAINER_ID to 02_run_container.sh
This limits the scope of the CI_CONTAINER_ID symbol.

Can be reviewed with --color-moved=dimmed-zebra
2023-10-09 16:17:04 +02:00
MarcoFalke fa695b4df0
ci: Work around podman stop bug
Force remove any containers, pontentially leaving dangling processes,
which should be fine.
2023-10-09 16:16:55 +02:00
MarcoFalke fa09a031c1
ci: Add set -ex to 02_run_container.sh
The same is done by the 06 script.
2023-10-09 16:16:41 +02:00
MarcoFalke fac9abbf47
ci: Rename 04_install to 02_run_container
This reflects what the script does (docker run ...).
2023-10-09 16:16:22 +02:00
MarcoFalke fac88a874f
ci: Avoid cache depends/build 2023-10-05 13:45:04 +02:00
MarcoFalke fac054d24c
ci: Print Linux kernel info 2023-10-03 16:37:43 +02:00
fanquake 99ce8366ed
Merge bitcoin/bitcoin#28504: ci: Use nproc over MAKEJOBS in 01_base_install
fa3b5e5e57 ci: Use nproc over MAKEJOBS in 01_base_install (MarcoFalke)

Pull request description:

  Currently `$MAKEJOBS` is the default value in `01_base_install.sh` when building the container image.

  This problem can't be fixed (see below), so just use `nproc` for now.

  Other solutions would be bad:

  * Passing in the `MAKEJOBS` as a dockerfile env would create a new image if the number of tasks are changed, seems verbose and confusing.
  * Leaving `master` as-is would leave CPUs unused if there are more than `4`.

ACKs for top commit:
  fanquake:
    ACK - I think this is fine as-is, it's an improvement over the current state fa3b5e5e57

Tree-SHA512: 15014eb7b548945737b0fed5cd46f0cd4b72b1d54d044f60fce628f914053a2de6518878428a54822d236d08d6f257d8c464d3fb589400f4be56022d2ec8676d
2023-09-20 16:14:30 +00:00
fanquake e9a4793b82
Merge bitcoin/bitcoin#28432: build: Produce a `.zip` for macOS distribution
b5790c35f7 build: remove dmg dependencies (fanquake)
33ae0bd1e4 macdeploy: remove DMG generation from deploy script (fanquake)
a128111c29 build: produce a .zip for macOS distribution (Hennadii Stepanov)
c38561d6b1 build: add -zip option to macdeployqtplus (fanquake)

Pull request description:

  It is https://github.com/bitcoin/bitcoin/pull/27099 revived with addressed [comments](https://github.com/bitcoin/bitcoin/pull/27099#issuecomment-1708705686).

  From https://github.com/bitcoin/bitcoin/pull/27099#issue-1584429885:
  > Reviving the discussion around using a `.zip` for the distributed macOS binaries, as opposed to a `.dmg`.
  >
  > Given we only had a single report of the "no finder window" issue (#26176), I wonder if that means macOS users were able to figure it out, they gave up/didn't report, or, we just have very few macOS users.
  >
  > Related to #18128.

  That's how it looks on macOS:

  ![image](https://github.com/bitcoin/bitcoin/assets/32963518/baa637bb-256b-4b24-8645-8c2754c2ae64)

ACKs for top commit:
  Sjors:
    tACK b5790c35f7
  jarolrod:
    ACK b5790c35f7
  TheCharlatan:
    utACK b5790c35f7

Tree-SHA512: 6e9cb3ab0f60f8a92bfec50577e8d096c5b23ec09ebbb334826415609140ddc96d470aea37379495c1c6bb1beec0d306b09460f62e1543bb0f4396c10a1dfbe2
2023-09-20 11:40:47 +00:00
MarcoFalke fa3b5e5e57
ci: Use nproc over MAKEJOBS in 01_base_install 2023-09-19 16:13:27 +00:00
fanquake b5790c35f7
build: remove dmg dependencies 2023-09-15 13:47:50 +01:00
Hennadii Stepanov a128111c29
build: produce a .zip for macOS distribution
Instead of a .dmg.

Co-authored-by: fanquake <fanquake@gmail.com>
2023-09-15 13:47:50 +01:00
fanquake 717a4d8944
Merge bitcoin/bitcoin#28476: ci: LLVM 17 for MSAN jobs
a241d6069c ci: use LLVM 17.0.0 in MSAN jobs (fanquake)

Pull request description:

  See https://libcxx.llvm.org/Hardening.html as well as https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026.

ACKs for top commit:
  MarcoFalke:
    review ACK a241d6069c

Tree-SHA512: c374dabf307fe762be0da96f63695a150f6018c1468fe9414fad23f74f5818bbf7a5a699e109084e31467482a900cfebf1d5835821e4da94aa310b2c9570749c
2023-09-15 11:49:29 +01:00
Andrew Chow 541976b42e
Merge bitcoin/bitcoin#27850: test: Add unit & functional test coverage for blockstore
de8f9123af test: cover read-only blockstore (Matthew Zipkin)
5c2185b3b6 ci: enable chattr +i capability inside containers (Matthew Zipkin)
e573f24202 unit test: add coverage for BlockManager (Matthew Zipkin)

Pull request description:

  This PR adds unit and functional tests to cover the behavior described in #2039. In particular, that bitcoind will crash on startup if a reindex is requested but the `blk` files are read-only. Eventually this behavior can be updated with https://github.com/bitcoin/bitcoin/pull/27039. This PR just commits the test coverage from #27039 as suggested in https://github.com/bitcoin/bitcoin/pull/27039#issuecomment-1584915782

ACKs for top commit:
  jonatack:
    ACK de8f9123af modulo suggestions in https://github.com/bitcoin/bitcoin/pull/27850#discussion_r1319010039, tested on macOS, but not on Linux for the Linux-related change in the last push
  achow101:
    ACK de8f9123af
  MarcoFalke:
    lgtm ACK de8f9123af 📶

Tree-SHA512: b9bd684035dcea11c901b649fc39f397a2155a9a8459f3348e67947e387e45312fddeccb52981aef486f8a31deebb5356a7901c1bb94b78f82c24192a369af73
2023-09-14 13:21:14 -04:00
MarcoFalke bbbbdb0cd5
ci: Add filesystem lint check 2023-09-14 18:58:44 +02:00
fanquake a241d6069c
ci: use LLVM 17.0.0 in MSAN jobs
See https://libcxx.llvm.org/Hardening.html as well as
https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026.
2023-09-14 11:12:24 +01:00
MarcoFalke fa23c9aa7c
ci: clang-17 for fuzz and tsan 2023-09-13 13:35:39 +02:00
Matthew Zipkin 5c2185b3b6
ci: enable chattr +i capability inside containers 2023-09-06 10:40:09 -04:00
fanquake 260445bee8
Merge bitcoin/bitcoin#28359: ci: Asan with -ftrivial-auto-var-init=pattern
fa07ac48d8 ci: Asan with -ftrivial-auto-var-init=pattern (MarcoFalke)

Pull request description:

  This makes memory bugs deterministic. `-ftrivial-auto-var-init=pattern` is incompatible with other memory sanitizers (like valgrind and msan), but that is irrelevant here, because the address sanitizer in this fuzz CI config is already incompatible with them.

  `-ftrivial-auto-var-init=pattern` goes well with `-fsanitize=bool` and `-fsanitize=enum`, but those are already enabled via `-fsanitize=undefined`. See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks

ACKs for top commit:
  fanquake:
    ACK fa07ac48d8 - going to get back to fixing up the cxxflags usage in CI, but not a blocker here:

Tree-SHA512: 2ea6c5128a9cd262bdd1b1475c7e1be23ce2c520fad05f6c2aace6c29e203573323c0564d272e25da35ad5ff46fde488a5eae1ed14d3349e793d14a5e2533fb1
2023-09-05 10:07:50 +01:00
fanquake df5af114df
Merge bitcoin/bitcoin#28353: ci: Remove /ro_base bind mount, Remove LC_ALL=C from s390x task
fa70cbd969 ci: Remove unused TEST_RUNNER_ENV="LC_ALL=C" from s390x task (MarcoFalke)
fa33354dcb ci: Remove /ro_base bind mount (MarcoFalke)
fa0df9d4c4 doc: Remove sudo from command that is already run as root (MarcoFalke)

Pull request description:

  Remove some CI stuff no longer needed.

ACKs for top commit:
  fanquake:
    ACK  fa70cbd969 - did not test the s390x job.

Tree-SHA512: 3a6ed0cfc855a92c2f834e59494c0a19a5647510247aece5e40a1aa78074894fe7454e684a1ea1f8f0662c50ac1caf2e390398b0fcfbf81544e6488fa9b8915e
2023-08-30 16:23:39 +01:00
MarcoFalke fa07ac48d8
ci: Asan with -ftrivial-auto-var-init=pattern 2023-08-30 10:52:27 +02:00
MarcoFalke faf70c1f33
Bump python minimum version to 3.9 2023-08-29 11:54:29 +02:00
MarcoFalke fa8996b930
ci: Bump i686_multiprocess.sh to latest Ubuntu LTS
There is no need to have it stuck on the previous one.
This is needed for the next commit.
2023-08-29 11:54:22 +02:00
fanquake db57574aa8
Merge bitcoin/bitcoin#28173: ci: Run Windows native task on GitHub Actions
6a43372980 ci: Run "Win64 native" job on GitHub Actions (Hennadii Stepanov)

Pull request description:

  From https://github.com/bitcoin/bitcoin/issues/28098:
  > Thus, someone would have to sponsor an amount of roughly 5kUSD/mo for those two tasks.

  > If the goal is to stay on a free plan, I think the only option is GitHub Actions CI.

  Historical context:
  - https://github.com/bitcoin/bitcoin/pull/17697
  - https://github.com/bitcoin/bitcoin/issues/17803
  - https://github.com/bitcoin/bitcoin/pull/18031

  Security concerns:
  - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651432106
  - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651688197

  `GITHUB_TOKEN` permissions (from the build log in my personal repo):
  ```
  2023-07-27T07:30:17.8313534Z ##[group]GITHUB_TOKEN Permissions
  2023-07-27T07:30:17.8314113Z Contents: read
  2023-07-27T07:30:17.8314608Z Metadata: read
  2023-07-27T07:30:17.8314957Z Packages: read
  2023-07-27T07:30:17.8315233Z ##[endgroup]
  ```

  Comparison of resources:

  | Resource | Current, Cirrus CI | Suggested, GitHub Actions |
  |---|:-:|:-:|
  | CPU | 6 | 2 |
  | RAM, GB | 12 | 7 |

  The `TEST_RUNNER_TIMEOUT_FACTOR` variable is set to the current default value for all CI tasks: 64440bb733/ci/test/00_setup_env.sh (L48)

Top commit has no ACKs.

Tree-SHA512: ddfdaf7a1e4793a64ac0cd20f116b29608dd06f15b062769ac70b3ea2fb82775aa96aa79c7b768efefec4338aaa5b57d267b592f62d0e8d5d94ecc11001a165d
2023-08-28 11:27:29 +01:00
MarcoFalke fa70cbd969
ci: Remove unused TEST_RUNNER_ENV="LC_ALL=C" from s390x task 2023-08-27 22:50:42 +02:00
MarcoFalke fa33354dcb
ci: Remove /ro_base bind mount
Just set the bind mount to BASE_READ_ONLY_DIR, which allows to drop one
line of code and makes the code easier to understand.
2023-08-27 22:50:07 +02:00
fanquake 94955b4b1d
depends: use LLVM/Clang 15.0.6 for macOS cross-compile
There is no x86_64 binaries for 15.0.7.
2023-08-27 10:02:55 +01:00
Hennadii Stepanov 6a43372980
ci: Run "Win64 native" job on GitHub Actions 2023-08-25 13:50:04 +01:00
fanquake 27101d0f0c
Merge bitcoin/bitcoin#28330: ci: Add missing docker.io prefix for native tasks to CI_IMAGE_NAME_TAG
fab7f5c01d ci: Add missing docker.io prefix to CI_IMAGE_NAME_TAG (MarcoFalke)

Pull request description:

  Currently, the CI system may pick the wrong (non-native) architecture due to the missing prefix.

  For example, assuming the CI_IMAGE_NAME_TAG is `debian:bookworm` and the user has previously pulled an s390x image:

  ```
  $ podman run --rm 'docker.io/s390x/debian:bookworm' dpkg --print-architecture
  exec /usr/bin/dpkg: exec format error
  ```

  Now, `debian:bookworm` will refer to the same image:

  ```
  $ podman run --rm 'debian:bookworm' dpkg --print-architecture
  exec /usr/bin/dpkg: exec format error
  ```

  However, `docker.io/debian:bookworm` works fine:

  ```
   $ podman run --rm 'docker.io/debian:bookworm' dpkg --print-architecture
  arm64

ACKs for top commit:
  hebasto:
    ACK fab7f5c01d.

Tree-SHA512: c423c5cd454a95fa3e67081411ca08d316b8c680a5bba49196c514b91df65d9cc46a47700cc00d9579327842615f98146d0ac50abb016616a9b17d042598dab6
2023-08-24 10:56:03 +01:00
MarcoFalke fab7f5c01d
ci: Add missing docker.io prefix to CI_IMAGE_NAME_TAG 2023-08-23 22:33:02 +02:00
MarcoFalke fa15f7e082
ci: Remove no longer applicable section
This fails with:

"Error: determining starting point for build: no FROM statement found"
2023-08-23 15:40:21 +02:00
MarcoFalke fa378bed56
ci: Start with clean env
This should help to avoid non-determinism.
2023-08-23 15:40:05 +02:00
MarcoFalke fa8c250c2f
ci: Limit scope of some env vars
No need to have a larger scope than needed.

Can be reviewed with --color-moved=dimmed-zebra
2023-08-23 15:39:45 +02:00
fanquake 9b066da8af
Merge bitcoin/bitcoin#28295: ci: Add missing amd64 to win64-cross task
fa56d17a4b ci: Add missing amd64 to win64-cross task (MarcoFalke)

Pull request description:

  Currently the task will fail if run on non-`x86_64`.

  Fix this by adding the missing `amd64`, similar to

  7bf078f2b7/ci/test/00_setup_env_i686_multiprocess.sh (L11)

ACKs for top commit:
  hebasto:
    ACK fa56d17a4b

Tree-SHA512: faab1c5b945283b7e8d080bbcc8e9379c480cf6973506149ace5990cb4d04673f83f4bc36d08d5b4e9cb17a86fdbe23ac97ef4eab0e842616b367b8138229c58
2023-08-18 14:42:01 +01:00
MarcoFalke fa56d17a4b
ci: Add missing amd64 to win64-cross task
Also, do the same for android, which also fails.
2023-08-18 14:23:17 +02:00
MarcoFalke fa968ef6a3
ci: Add missing ${CI_RETRY_EXE} before curl 2023-08-18 14:11:40 +02:00
MarcoFalke fa26387769
ci: Refactor: Remove CI_USE_APT_INSTALL 2023-08-17 13:55:18 +02:00
MarcoFalke fa6e5d3eef
ci: Avoid error on macOS native
This avoids "mkdir: /ci_container_base: Read-only file system"
2023-08-16 10:30:51 +02:00
MarcoFalke fa193f5dfc
ci: Fix macOS-cross SDK rsync
This should fix the macOS-cross build on Cirrus CI containers.

Locally this was already working, because the SDK was cached in
/ci_container_base/ in the image, which is also the folder used for a
later CI run.

However, on Cirrus CI, when using an image *and* a custom BASE_ROOT_DIR,
the SDK will not be found in /ci_base_install/, nor in BASE_ROOT_DIR.

Fix this by normalizing *all* folders to /ci_container_base/.
2023-08-16 10:30:50 +02:00
Andrew Chow b97b05048d
Merge bitcoin/bitcoin#28187: ci: Run "macOS native x86_64" job on GitHub Actions
9658d0dc17 ci: Run "macOS native x86_64" job on GitHub Actions (Hennadii Stepanov)

Pull request description:

  From https://github.com/bitcoin/bitcoin/issues/28098:
  > Thus, someone would have to sponsor an amount of roughly 5kUSD/mo for those two tasks.

  > If the goal is to stay on a free plan, I think the only option is GitHub Actions CI.

  ---

  **IMPORTANT NOTE**. We currently ship macOS release binaries for both architectures: `x86_64` and `arm64`. If this PR gets merged, only `x86_64` architecture will be tested on CI, which implies some [drawbacks](https://github.com/bitcoin/bitcoin/pull/28187#issuecomment-1658077549).

  However, it has never been the case that our CI tested both architectures simultaneously. And we hope that GitHub Actions will soon host macOS `arm64` runners.

  Historically, we moved from `x86_64` to `arm64` in https://github.com/bitcoin/bitcoin/pull/26388 less than a year ago.

  ---

  Security concerns:
  - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651432106
  - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651688197

  `GITHUB_TOKEN` permissions (from the build log in my personal repo):
  ```
  2023-07-27T07:30:17.8313534Z ##[group]GITHUB_TOKEN Permissions
  2023-07-27T07:30:17.8314113Z Contents: read
  2023-07-27T07:30:17.8314608Z Metadata: read
  2023-07-27T07:30:17.8314957Z Packages: read
  2023-07-27T07:30:17.8315233Z ##[endgroup]
  ```

  Comparison of resources:

  | Resource | Current, Cirrus CI | Suggested, GitHub Actions |
  |---|:-:|:-:|
  | CPU | 4 | 4 \*\* |
  | RAM, GB | 8 | 14 |

  **\*\* NOTE**: However, [docs](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) are mentioning:
  > 3-core CPU (x86_64)

ACKs for top commit:
  MarcoFalke:
    re-ACK 9658d0dc17 🏂
  achow101:
    ACK 9658d0dc17
  jarolrod:
    ACK 9658d0dc17

Tree-SHA512: 6123e68e6784cdf4e53c3e77b435709261db21f09091af2c22e667d3816a305fffb9d617297a5bc1bda18aaba84a6e210cec6a75c52afa7746a3780a67b69865
2023-08-15 17:03:13 -04:00
MarcoFalke fafa17c00b
ci: Use hard-coded root path for CI containers 2023-08-09 12:32:44 +02:00
MarcoFalke fa084f5ba5
ci: Only create folders when needed
Now that container volumes are used, the folders are no longer mounted.
They are only needed when running without a container engine (docker,
podman).
2023-08-09 12:32:30 +02:00
MarcoFalke fab27127f4
ci: Drop BASE_SCRATCH_DIR from LIBCXX_DIR
Using a hard-coded path avoids non-determinism issues and improves CI
UX.
2023-08-09 12:32:15 +02:00
Hennadii Stepanov 9658d0dc17
ci: Run "macOS native x86_64" job on GitHub Actions
Also, the "macOS native arm64" task has been removed from Cirrus CI.
2023-08-09 10:59:43 +01:00
MarcoFalke fad0b67c21
ci: Use qemu-user through container engine 2023-08-07 17:36:14 +02:00
fanquake 624333455a
Merge bitcoin/bitcoin#26296: ci: Integrate `bitcoin-tidy` clang-tidy plugin
1c976c691c tidy: Integrate bicoin-tidy clang-tidy plugin (fanquake)
7de23cceb8 refactor: fix unterminated LogPrintf()s (fanquake)
0a1029aa29 lint: remove  /* Continued */ markers from codebase (fanquake)
910007995d lint: remove lint-logs.py (fanquake)
d86a83d6b8 lint: drop DIR_IWYU global (fanquake)

Pull request description:

  Demo of integrating the [bitcoin-tidy](https://github.com/theuni/bitcoin-tidy-plugin), [clang-tidy plugin](https://clang.llvm.org/extra/clang-tidy/) written by theuni into our tidy CI job.

  The plugin currently has a single check, `bitcoin-unterminated-logprintf`. This would replace our current Python driven, `git-grep`-based, `.cpp` file only, lint-logs linter.

ACKs for top commit:
  TheCharlatan:
    ACK 1c976c691c
  theuni:
    ACK 1c976c691c
  MarcoFalke:
    re-ACK 1c976c691c  👠

Tree-SHA512: 725b45c70e431d48e6f276671e05c694e10b6047cae1a31906ac3ee9093bc8105fb226b36a5bac6709557526ca6007222112d66aecec05a574434edc4897e4b8
2023-08-07 17:14:07 +02:00
fanquake 1c976c691c
tidy: Integrate bicoin-tidy clang-tidy plugin
Enable `bitcoin-unterminated-logprintf`.

Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
2023-08-03 17:52:24 +01:00
fanquake d86a83d6b8
lint: drop DIR_IWYU global 2023-08-03 17:52:24 +01:00
MarcoFalke fa474397b5
ci: Add missing linux-headers package to ASan task
Otherwise the task will throw in skip_if_no_python_bcc.

Also, adjust CI_CONTAINER_CAP for all needed permissions.
2023-08-01 17:33:36 +02:00
Jon Atack bee2d57a65 script: update flake8 to 6.1.0
and touch up the spelling returned by lint-spelling.py
2023-07-31 12:14:06 -06:00
Hennadii Stepanov 79ceb161db
ci: Use documented `CCACHE_MAXSIZE` instead of `CCACHE_SIZE`
This change aims to:
1) Remove our own `CCACHE_SIZE` environment variable that violates
Ccache's `CCACHE_*` namespace.
2) Introduce the `CCACHE_MAXSIZE` environment variable that is
documented since v3.3, which makes its usage consistent with other ones,
such as `CCACHE_DIR` and `CCACHE_NOHASHDIR`.
2023-07-30 21:36:56 +01:00
fanquake 4c57e53a61
Merge bitcoin/bitcoin#28138: ci: Keep system env vars as-is (bugfix)
fabc04a4d9 ci: Keep system env vars as-is (MarcoFalke)
fa8dcdcc8b ci: Set PATH inside the CI env (MarcoFalke)
fac229ab1f ci: Remove P_CI_DIR and --workdir (MarcoFalke)

Pull request description:

  This fixes a bug where the `$PATH` from the host is used inside the container. This will lead to bugs when the `$PATH` is different. For example on a host of Fedora 38, and a container of `debian:bullseye`.

  This can be tested with the `FILE_ENV=./ci/test/00_setup_env_arm.sh` CI env. On master:

  ```
  Error: crun: executable file `bash` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
  ```

  On this pull:

  (everything passes)

ACKs for top commit:
  TheCharlatan:
    lgtm ACK fabc04a4d9

Tree-SHA512: 51d2affed91624d0e5b43a3ee1e696313f934e05fde6b5a19e8ac4e6666c1e7b667a444bf3de3f77190bcd00e81efb7576196afb0f6b5e788d1a50e7ddb28d7e
2023-07-28 15:56:14 +01:00
fanquake 04f66ce500
Merge bitcoin/bitcoin#28092: ci: document that -Wreturn-type has been fixed upstream (mingw-w64)
08eb5f1b67 ci: document that -Wreturn-type has been fixed upstream (Windows) (fanquake)

Pull request description:

  `noreturn` attributes have been added to the mingw-w64 headers, 1690994f51, meaning that [from 11.0.0 onwards](https://www.mingw-w64.org/changelog/), you'll no-longer see `-Wreturn-type` warnings when using `assert(false)`.

  Add -Wno-return-type to the Windows CI, where is should have been all
  along, and document why it's required. This can be dropped when we are
  using the fixed version of the mingw-w64 headers there.

  Drop the -Werror -Wno-return-type special case from our build system.
  -Wreturn-type is on by default in Clang and GCC.

  The new mingw-w64 header behaviour can be checked on Ubuntu mantic, [which ships with 11.0.0](https://packages.ubuntu.com/mantic/mingw-w64), using:
  ```cpp
  #include <cassert>

  int f(){ assert(false); }

  int main() {
  return 0;
  }
  ```

  On Mantic (with 11.0.0):
  ```bash
  x86_64-w64-mingw32-g++ test.cpp -Wreturn-type
  # nada
  ```

  On Lunar ([with 10.0.0](https://packages.ubuntu.com/lunar/mingw-w64)):
  ```bash
  x86_64-w64-mingw32-g++ test.cpp -Wreturn-type
  test.cpp: In function 'int f()':
  test.cpp:3:25: warning: no return statement in function returning non-void [-Wreturn-type]
      3 | int f(){ assert(false); }
        |                         ^
  ```

ACKs for top commit:
  TheCharlatan:
    ACK 08eb5f1b67

Tree-SHA512: 9cd4310a96abd87bf8ceb37949ad0259fe4adee3367c604f4c4ad521a0cf09bdcc5dd305db19a0f45ce74c85178b0d739e2fca5ad0fc841ac935523a23b28a7f
2023-07-27 11:21:49 +01:00
MarcoFalke fabc04a4d9
ci: Keep system env vars as-is 2023-07-24 16:14:24 +02:00
MarcoFalke fa8dcdcc8b
ci: Set PATH inside the CI env
This is needed for the next commit.

This also requires dropping CI_RETRY from the docker build step, which
is fine, because CI_RETRY should be called inside the build script, not
outside.

Also, fix a doc typo.
2023-07-24 16:14:24 +02:00
MarcoFalke fac229ab1f
ci: Remove P_CI_DIR and --workdir
The --workdir setting to the docker run command is not needed. And
P_CI_DIR/PWD is equal to BASE_ROOT_DIR, so just use that directly.
2023-07-24 16:10:47 +02:00
MarcoFalke ffff4b5dc5
lint: Add missing `set -ex` to ci/lint/06_script.sh
This is needed for the container-entrypoint.sh

Also, remove unused `source` from ci/lint_run_all.sh, since it is the
last step.
2023-07-19 11:39:50 +02:00
MarcoFalke fadc5232f4
doc: Add doc comment to ci/test_imagefile
(Similar to the doc comment in ci/lint_imagefile)

Also, rename docker-entrypoint.sh to container-entrypoint.sh

Also, add copyright header to touched files.
2023-07-19 11:27:28 +02:00
fanquake 08eb5f1b67
ci: document that -Wreturn-type has been fixed upstream (Windows)
`noreturn` attributes have been added to the mingw-w64 headers, meaning
that from 11.0.0 onwards, you'll no-longer see `-Wreturn-type` warnings
when using assert(false):
1690994f51.

Add -Wno-return-type to the Windows CI, where is should have been all
along, and document why it's required. This can be dropped when we are
using the fixed version of the mingw-w64 headers there.

Drop the -Werror -Wno-return-type special case from our build system.
-Wreturn-type is on by default in Clang and GCC.
2023-07-18 14:27:30 +01:00
MarcoFalke fa2f18ad8e
ci: Use DOCKER_BUILDKIT for lint image
Can be reviewed with:
--color-moved=dimmed-zebra  --ignore-all-space
2023-07-16 13:18:18 +02:00
MarcoFalke fa4ccf1511
ci: Add missing -O2 to valgrind tasks 2023-07-12 15:41:49 +02:00
MarcoFalke fa956d2048
ci: Print full lscpu output 2023-07-06 11:13:05 +02:00
fanquake 3367e1c850
Merge bitcoin/bitcoin#28009: script, test: python typing and linter updates
6c97757a48 script: appease spelling linter (Jon Atack)
1316119ce7 script: update ignored-words.txt (Jon Atack)
146c861da2 script: update linter dependencies (Jon Atack)
92408224a4 test: fix PEP484 no implicit optional argument types errors (Jon Atack)
f86a301433 script, test: add missing python type annotations (Jon Atack)

Pull request description:

  With these updates, `./test/lint/lint-python.py` and `./test/lint/lint-spelling.py` should be green again for developers using relatively recent Python dependencies, in particular mypy 0.991 (released 11/2022) and later. Please see the commit messages for details.

ACKs for top commit:
  fanquake:
    ACK 6c97757a48

Tree-SHA512: 8a46a4d36d5978affdcecf4f2ace20ca1b52d483e098304911a2169afe60ccb9b042fa90c04b762d94f3ce53d2cafe6f24476ae839867a770c7f31e7e7242d99
2023-06-30 16:20:37 +01:00
fanquake 9be4565c2d
ci: re-enable gui tests for s390x
These work for me now. If they still don't work in other setups,
maybe we can better document the issues.

```bash
time FILE_ENV="./ci/test/00_setup_env_s390x.sh" ./ci/test_run_all.sh
...
Running tests: coins_tests from test/coins_tests.cpp
PASS: qt/test/test_bitcoin-qt
Running tests: coinstatsindex_tests from test/coinstatsindex_tests.cpp
...
Stop and remove CI container by ID
+ docker container kill 617bef8accb87530e5fbb03ff07b3b9f0aa9e3030d4da424c9612d153ab98dbf
617bef8accb87530e5fbb03ff07b3b9f0aa9e3030d4da424c9612d153ab98dbf

real	51m37.809s
```
2023-06-30 11:15:57 +01:00
Jon Atack 146c861da2 script: update linter dependencies 2023-06-29 16:14:07 -06:00
fanquake c6287faae4
Merge bitcoin/bitcoin#27996: ci: filter all subtrees from tidy output
62633b5046 ci: filter all subtrees from tidy output (fanquake)

Pull request description:

  We are currently dumping output for some. i.e:
  ```bash
  diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp
  index 8826af9..7fd6f2a 100644
  --- a/src/minisketch/src/fields/clmul_1byte.cpp
  +++ b/src/minisketch/src/fields/clmul_1byte.cpp
  @@ -4,21 +4,16 @@
    * file LICENSE or http://www.opensource.org/licenses/mit-license.php.*
    **********************************************************************/

  -/* This file was substantially auto-generated by doc/gen_params.sage. */
  -#include "../fielddefines.h"
  -
  +class Sketch;
   #if defined(ENABLE_FIELD_BYTES_INT_1)
  ```

ACKs for top commit:
  hebasto:
    re-ACK 62633b5046

Tree-SHA512: fd0a17af6b37fc7641547dab329c2d14ec784941c4d100db1e80d232aff39e45ad9c588982810a2cfc54b4fe820bfe0d50638b53209fec6774fd556b9b0ae180
2023-06-29 13:35:47 +01:00
fanquake 3d51f7c9a8
Merge bitcoin/bitcoin#27932: test: Fuzz on macOS
fae7c50d20 test: Run fuzz tests on macOS (MarcoFalke)

Pull request description:

  Any reason not to?

ACKs for top commit:
  jamesob:
    Github ACK fae7c50d20
  dergoegge:
    utACK fae7c50d20

Tree-SHA512: e45122d73fafb17cea312258314b826cb0745e08daadd28465f687ec02d4c127d2f8cbe20179a9fff5712038850c02c968abb4838fa088b7555e28709317d3a3
2023-06-29 13:08:58 +01:00
fanquake 62633b5046
ci: filter all subtrees from tidy output
We are currently dumping output for some. i.e:
```bash
diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp
index 8826af9..7fd6f2a 100644
--- a/src/minisketch/src/fields/clmul_1byte.cpp
+++ b/src/minisketch/src/fields/clmul_1byte.cpp
@@ -4,21 +4,16 @@
  * file LICENSE or http://www.opensource.org/licenses/mit-license.php.*
  **********************************************************************/

-/* This file was substantially auto-generated by doc/gen_params.sage. */
-#include "../fielddefines.h"
-
+class Sketch;
 #if defined(ENABLE_FIELD_BYTES_INT_1)
```
2023-06-29 11:59:31 +01:00
fanquake 248a17addf
ci: remove duplicate python3 from CI configs 2023-06-28 11:10:51 +01:00
fanquake b50767fdde
ci: remove duplicate bsdmainutils from CI configs 2023-06-28 10:07:51 +01:00
Andrew Chow caff95a023
Merge bitcoin/bitcoin#27896: Remove the syscall sandbox
32e2ffc393 Remove the syscall sandbox (fanquake)

Pull request description:

  After initially being merged in #20487, it's no-longer clear that an internal syscall sandboxing mechanism is something that Bitcoin Core should have/maintain, especially when compared to better maintained/supported alterantives, i.e [firejail](https://github.com/netblue30/firejail).

  There is more related discussion in #24771.

  Note that given where it's used, the sandbox also gets dragged into the kernel.

  If it's removed, this should not require any sort of deprecation, as this was only ever an opt-in, experimental feature.

  Closes #24771.

ACKs for top commit:
  davidgumberg:
     crACK 32e2ffc393
  achow101:
    ACK 32e2ffc393
  dergoegge:
    ACK 32e2ffc393

Tree-SHA512: 8cf71c5623bb642cb515531d4a2545d806e503b9d57bfc15a996597632b06103d60d985fd7f843a3c1da6528bc38d0298d6b8bcf0be6f851795a8040d71faf16
2023-06-27 18:19:21 -04:00
MarcoFalke fae7c50d20
test: Run fuzz tests on macOS
Also, fix a few bugs:

* Error: RPC command "enumeratesigners" not found in RPC_COMMANDS_SAFE_FOR_FUZZING or RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update test/fuzz/rpc.cpp.
* in run_once: ...format(" ".join(result.args), ... TypeError: sequence item 2: expected str instance, PosixPath found
2023-06-22 13:54:17 +02:00
fanquake 0c84a0e484
Merge bitcoin/bitcoin#27798: depends: modernize clang flags for Darwin
cbee1d7091 depends: modernize clang flags (Cory Fields)
2a85857ce5 ci: disable false-positive warnings for now (Cory Fields)

Pull request description:

  This is a cleaner and simpler alternative to #25098. Inspired by [this conversation](https://github.com/bitcoin/bitcoin/pull/27737#issuecomment-1562543301). The diff is large but the change itself is quite small.

  Fixes builds with llvm >= 11 in guix by working around the problem. As a bonus, this is much cleaner and more maintainable than what we had before.

  See the updated comment for more info. At a high level: rather than playing tricks and trying to work around clang's default includes, disable them and re-add what we want.

ACKs for top commit:
  fanquake:
    ACK cbee1d7091 - tested Guix and the depends cross-compile. Would like to move this along, to unblock #27676, which itself might be a blocker for #27897. Note that macOS might seem somewhat in flux for the moment, but once we finish the migration to LLVM Clang + LLD, things will be must simpler, and ultimately more maintainable.
  TheCharlatan:
    ACK cbee1d7091

Tree-SHA512: 5a8300be528f550e15ab23d869e77df7a62201c6d40c0384795a9eecee38118a676e0b79b2b76c5e597597181443caada54a01b75a544dbcde76da1deba8e3a4
2023-06-22 09:47:30 +01:00
fanquake a596bdf3e9
Merge bitcoin/bitcoin#27919: ci: Run fuzz target even if input folder is empty
0000f55293 ci: Run fuzz target even if input folder is empty (MarcoFalke)

Pull request description:

  This should catch trivial integer sanitizer bugs if the author and all reviewers forget to look for them.

ACKs for top commit:
  brunoerg:
    reACK 0000f55293
  dergoegge:
    reACK 0000f55293

Tree-SHA512: f139b9d56f0cf1aae339c2890721c77c88d1fea77b73d492c1386ec99b4f393c5b664029919ff4a22e4e8a2929f085699a148c6acc2cc3e40df8a72fd39ff474
2023-06-21 10:08:53 +01:00
Cory Fields 2a85857ce5 ci: disable false-positive warnings for now
clang <=17 warns on -nostdlibinc, which causes an error on our -Werror builds.

Note that this breaks the "-fPIE" check in configure because it relies on
catching warnings, but that is not a problem for macOS.
2023-06-20 19:55:02 +00:00
MarcoFalke 0000f55293
ci: Run fuzz target even if input folder is empty 2023-06-20 18:19:01 +02:00
fanquake 682274aab0
ci: install llvm-symbolizer in MSAN jobs 2023-06-20 17:16:22 +01:00
fanquake 96527cd51e
ci: use LLVM 16.0.6 in MSAN jobs 2023-06-20 17:14:06 +01:00
fanquake 32e2ffc393
Remove the syscall sandbox
After initially being merged in #20487, it's no-longer clear that an
internal syscall sandboxing mechanism is something that Bitcoin Core
should have/maintain, especially when compared to better
maintained/supported alterantives, i.e firejail.

Note that given where it's used, the sandbox also gets dragged into the
kernel.

There is some related discussion in #24771.

This should not require any sort of deprecation, as this was only ever
an opt-in, experimental feature.

Closes #24771.
2023-06-16 10:38:19 +01:00
fanquake 3b2acfcfec
build: suppress external warnings by default 2023-06-15 14:12:10 +01:00
MarcoFalke fa70e85e00
ci: Bump macOS cross task to ubuntu:jammy 2023-06-14 10:49:27 +02:00
MarcoFalke faaa62754e
ci: Use podman stop over podman kill
This should avoid a race where the kill is not done when spinning up the
new container. podman stop waits 10 seconds by default.
2023-06-09 16:58:38 +02:00
MarcoFalke fac7f4ab5e
ci: Invalidate Cirrus CI docker cache 2023-06-08 10:28:38 +02:00
fanquake 2ebeb421dd
ci: enable AArch64 target in MSAN jobs
Use Native.
2023-06-05 15:39:51 +01:00
fanquake c93bfc54e8
ci: use LLVM 16.0.5 in MSAN jobs 2023-06-05 11:23:25 +01:00
fanquake 8a972813ba
Merge bitcoin/bitcoin#27737: ci: compile Clang and compiler-rt in msan jobs
5763b232e6 ci: return to using Ubuntu 22.04 in MSAN jobs (fanquake)
d3cbcbf626 ci: compile clang and compiler-rt in MSAN jobs (fanquake)
796bd1d0d1 ci: use LLVM 16.0.4 in MSAN jobs (fanquake)
883bc9f561 ci: remove extra CC & CXX from MSAN jobs (fanquake)
2d4f4b8f29 ci: standardize custom libc++ usage in MSAN jobs (fanquake)

Pull request description:

  This reworks the MSAN CIs, to first compile Clang and compiler-rt (using GCC 12), and then, compile an MSAN instrumented libc++ using the just-built Clang 16. This fixes the `native_fuzz_with_msan` job, working around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341, by not using the Debian provided Clang/LLVM.

  Also included are changes to streamline how we use our "custom libc++", according to upstream: https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#using-a-custom-built-libc, as well as other minor cleanups in the CI configs.

  An example job is currently running in the qa-assets repo: https://github.com/bitcoin-core/qa-assets/pull/129 (https://cirrus-ci.com/task/4632561431871488).

ACKs for top commit:
  dergoegge:
    utACK 5763b232e6

Tree-SHA512: 4f2a6e0b796bb1830b8346dd1e55eaa86a79037b8b4f16a336c1e29f4fc460acca2ecba076635459370bcbb4009333cb79d27ef1521c1fb5db7599cd5bdf558c
2023-06-02 10:42:05 +01:00
fanquake f08bde7f71
Merge bitcoin/bitcoin#27778: ci: Enable float-divide-by-zero check
fa3ab45203 ci: Enable float-divide-by-zero check (MarcoFalke)

Pull request description:

  Enable it, because

  * It is enabled on OSS-Fuzz, so to be able to catch bugs earlier, enable it here as well.
  * It makes sense to enable, because when a float is divided by zero, it may be a logic bug in our code, so it should be suppressed in the suppressions file.

ACKs for top commit:
  willcl-ark:
    utACK fa3ab45203
  dergoegge:
    ACK fa3ab45203

Tree-SHA512: 2c2c025af4fe3ec267b3cfa38f25495e9da678cf6c529a6438ec923ef09a06ad37fa4503c30cbacc83578ac2856a7f729ef70a24befffd61d10ec075132d1ee0
2023-05-31 14:42:46 +01:00
fanquake 08722f20c2
Merge bitcoin/bitcoin#27777: ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN
fa123077bc ci: Use podman for persistent workers (MarcoFalke)
fa9c65a74c ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN (MarcoFalke)

Pull request description:

  This should prevent the persistent workers from running out of disk space. Containers are already removed, but not images. This is required since CI images are built and cached.

ACKs for top commit:
  hebasto:
    ACK fa123077bc

Tree-SHA512: 07c4faec57d659d1762e4e6d776c882ee48d4bac6ce6d438d56d9ab13277be3e39d6aa38816165a5a3e0938ac5d47674ee2921b6e115a4bb54e3e4910b34c4b6
2023-05-31 09:56:31 +01:00
MarcoFalke fa3ab45203
ci: Enable float-divide-by-zero check 2023-05-30 12:01:38 +02:00
MarcoFalke fa123077bc
ci: Use podman for persistent workers 2023-05-30 10:27:23 +02:00
MarcoFalke fa9c65a74c
ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN 2023-05-30 08:51:53 +02:00
fanquake 5763b232e6
ci: return to using Ubuntu 22.04 in MSAN jobs
We no-longer need to use 23.04, now that we aren't installing clang-16
and friends.
2023-05-29 17:20:50 +01:00
fanquake d3cbcbf626
ci: compile clang and compiler-rt in MSAN jobs
This works around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341.
2023-05-29 17:20:50 +01:00
fanquake 796bd1d0d1
ci: use LLVM 16.0.4 in MSAN jobs 2023-05-29 17:20:49 +01:00
fanquake 883bc9f561
ci: remove extra CC & CXX from MSAN jobs
This is passed through from depends.
2023-05-29 17:20:47 +01:00
fanquake 2d4f4b8f29
ci: standardize custom libc++ usage in MSAN jobs
Use `-isystem` & `-nostd*` flags, which is the preferred way to use a
custom libc++ (ours is libc++ build with MSAN) with Clang, as opposed to
our current ad-hoc flags.

See: https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#using-a-custom-built-libc
for more info.
2023-05-29 17:19:42 +01:00
fanquake 6cf47a8f44
Merge bitcoin/bitcoin#27507: lint: stop ignoring LIEF imports
015cc5e588 lint: stop ignoring LIEF imports (fanquake)

Pull request description:

  Type stubs are now available as of 0.13.0.
  See https://github.com/lief-project/LIEF/issues/650.

ACKs for top commit:
  TheCharlatan:
    ACK 015cc5e588

Tree-SHA512: ebb754f293c2a61a0ef64c3552f7c700ceb3054b50fd3f1573e4a9e87773ddeba47bd9875f6ab055043012dbc20aeb71e4d76cd3da535c76651dfb1fbfc66e89
2023-05-29 17:11:31 +01:00
fanquake fb4f047686
Merge bitcoin/bitcoin#27724: build: disable boost multi index safe mode in debug mode
59c8944749 build: disable boost multi index safe mode (willcl-ark)

Pull request description:

  Fixes #27586

  Disable boost multi index safe mode by default when configuring with
  --enable-debug.

  This option can cause transactions to take a long time to be accepted
  into the mempool under certain conditions; iterator destruction takes
  O(n) time vs O(1) as they are stored in a singly linked list. See
  27586 and the [boost docs](https://www.boost.org/doc/libs/1_58_0/boost/multi_index/detail/safe_mode.hpp) for more information.

  Re-enable it on the CI builds which previously had it enabled.

  Re-enable it on the msan fuzz task so that we have fuzz tasks testing
  with it enabled and disabled in this repo.

ACKs for top commit:
  hebasto:
    ~ACK 59c89447499bd9d6202269879555b8bc37373aa2~
  fanquake:
    ACK 59c8944749

Tree-SHA512: ed654f63dbebdd02e4414d1f81147d92a4d490dbb5a2e0376858e3129097645f3a2df45191d6b40c410a76e803b0d28796d1a01c1d2fd995b94e8b7eb3949027
2023-05-29 17:09:47 +01:00
fanquake dfe658009d
Merge bitcoin/bitcoin#27759: Fix `#include`s in `src/wallet`
1f97572b9c Fix `#include`s in `src/wallet` (Hennadii Stepanov)

Pull request description:

  This PR is a minimum required changes to fix https://github.com/bitcoin/bitcoin/pull/27571#discussion_r1195497290.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 1f97572b9c

Tree-SHA512: de885210076d23f3394c42ca50e6ae2470c0ae6523399a2fa3ebb7c06383bdacef9c26166fa19747200396bed796c8772165e24416eb30ed8edd024e3394b2fe
2023-05-29 16:33:14 +01:00
fanquake 015cc5e588
lint: stop ignoring LIEF imports
Type stubs are now available as of 0.13.0.
See https://github.com/lief-project/LIEF/issues/650.
2023-05-29 10:23:52 +01:00
MarcoFalke fa12558d21
ci: Avoid leaking HOME var into CI pod
This will lead to a duplicate install, see https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564122573
2023-05-29 09:16:43 +02:00
MarcoFalke aaaa432603
ci: Remove "default" test env
It is unclear what the point is of maintaining a "default", the meaning
of which is unclear.
2023-05-29 09:16:21 +02:00
MarcoFalke fa7a87bc7c
ci: Add missing set -e to 01_base_install.sh
Also, set -x for easier debugging.

Also, do the same for ci/test/00_setup_env.sh
2023-05-29 09:16:10 +02:00
Hennadii Stepanov 1f97572b9c
Fix `#include`s in `src/wallet` 2023-05-25 15:52:08 +01:00
willcl-ark 59c8944749
build: disable boost multi index safe mode
Disable boost multi index safe mode by default when configuring with
--enable-debug.

This option can cause transactions to take a long time to be accepted
into the mempool under certain conditions; iterator destruction takes
O(n) time vs O(1) as they are stored in a singly linked list. See
27586 for more information.

Re-enable it on the CI builds which previously had it enabled.

Re-enable it on the msan fuzz target so that we have fuzz tasks testing
with it enabeld and disabled in this repo.
2023-05-23 13:44:07 +01:00
fanquake 456701420b
Merge bitcoin/bitcoin#27672: fuzz: Print error message when FUZZ is missing
fa1b3abc83 ci: Log qa-assets repo last commit (MarcoFalke)
fa22966f33 fuzz: Print error message when FUZZ is missing (MarcoFalke)

Pull request description:

  Some trivial UX improvements.

  * Change the exit code for `PRINT_ALL_FUZZ_TARGETS_AND_ABORT` and `WRITE_ALL_FUZZ_TARGETS_AND_ABORT` to `EXIT_SUCCESS` instead of `Aborted (core dumped)`.
  * Print readable error message when `FUZZ` is missing instead of `Aborted (core dumped)`.
  * Clarify that a fuzz target needs to be compiled into the executable.

ACKs for top commit:
  dergoegge:
    ACK fa1b3abc83

Tree-SHA512: 065ef8920449c64b3516f89a61cb397b505eccf531318c4f3830895d5ff6cd7ae2525cb857320481e3d0ed0b2f8a522cd8f7835e69f021241b6ec297a6102fc8
2023-05-22 12:55:18 +01:00
fanquake 09351f51d2
Merge bitcoin/bitcoin#27699: random: drop syscall wrapper usage for getrandom()
5228223e1f ci: remove MSAN getrandom syscall workaround (fanquake)
d5e06919db random: switch to using getrandom() directly (fanquake)
c2ba3f5b0c random: add [[maybe_unused]] to GetDevURandom (fanquake)
c13c97dbf8 random: getentropy on macOS does not need unistd.h (fanquake)

Pull request description:

  This requires a linux kernel of `3.17`+, which seems entirely
  reasonable. `3.17` went EOL in 2015, and the last supported `3.x` kernel
  (`3.16`) went EOL > 4 years ago, in 2020. For reference, the current
  oldest maintained kernel is `4.14` (released 2017, going EOL Jan 2024).

  Support for `getrandom()` (and `getentropy()`) was added to
  glibc `2.25` https://sourceware.org/legacy-ml/libc-alpha/2017-02/msg00079.html:
  > * The getentropy and getrandom functions, and the <sys/random.h> header
    file have been added.

  and we already require `2.27` or later.

  All that being said, I don't think you would encounter a current day (+~6 months from now)
  system, running with kernel headers older than 3.17 (released 2014) but also having a
  glibc of 2.27+ (released 2018)?

  Removing this (our only) use of `syscall()` also means we can drop a workaround in our MSAN jobs.
  If this is merged, I'll drop the [same workaround in oss-fuzz](25946a5448/projects/bitcoin-core/build.sh (L49-L56)).

ACKs for top commit:
  josibake:
    ACK 5228223e1f
  hebasto:
    ACK 5228223e1f, I've tested build system changes on Ubuntu 22.04 and macOS Monterey 12.6.6 (x86_64).

Tree-SHA512: cc978e08510c461b875ca8c08ae176b4519fa1108f0efd74dcb7474518945357e0184e54423282c9a496de195e4ddc3e221ee78623bd63e24c50cc86acdf32e2
2023-05-22 11:34:58 +01:00
fanquake f998eb7662
Merge bitcoin/bitcoin#27683: ci: remove `RUN_SECURITY_TESTS`
6a936580d1 ci: remove RUN_SECURITY_TESTS (fanquake)

Pull request description:

  We no-longer run any security/symbol checks in the CI, and doubt we will in future (if we do, it'll be via Guix, where this var would be redundant in any case). The CI environment doesn't (exactly) match the release build environment (and is semi-regularly changing), and the binaries produced in the CI don't match how we build release binaries, so there is no point trying to run these checks, especially as we add more involved tests, i.e #26953.

ACKs for top commit:
  josibake:
    code review ACK 6a936580d1
  TheCharlatan:
    ACK 6a936580d1

Tree-SHA512: c0eec61a4b873bac487ba9321b50116a215b4796bd7d416d98ffcd09969dbf635c2cb5aeb225c89d1e6462838fa2a48565048ebe730f48d76d3db46b64855a91
2023-05-22 09:52:27 +01:00
MarcoFalke fa1b3abc83
ci: Log qa-assets repo last commit
This documents the state in the CI output and may help debugging in case
of failure.
2023-05-22 10:02:40 +02:00
fanquake 5228223e1f
ci: remove MSAN getrandom syscall workaround
The corresponding workaround will also be dropped in oss-fuzz:
25946a5448/projects/bitcoin-core/build.sh (L49).
2023-05-20 17:20:06 +01:00
Hennadii Stepanov 98ea798411
ci, iwyu: Double maximum line length for includes 2023-05-20 13:16:26 +01:00
MarcoFalke fa953f15bf
build: Bump minimum supported GCC to g++-9
Also, update the code to use constexpr, which does not work in g++-8.

Also, drop the no longer needed build-aux/m4/l_filesystem.m4.
2023-05-18 12:24:40 +02:00
MarcoFalke fa69955e74
ci: Bump centos:stream8 to centos:stream9
This is required for the next commit. Also, drop CI_RETRY_EXE before
"dnf install", because it requires getopt, which will only be installed
later on via util-linux
2023-05-18 12:24:38 +02:00
MarcoFalke fa6a755d9f
ci: Document the false positive error for g++-9 2023-05-18 12:24:28 +02:00
fanquake 77b0a80ce7
Merge bitcoin/bitcoin#27682: build: Bump minimum supported Clang to clang-10
fa199ee614 ci: Drop NO_WERROR=1 for clang-10 build (MarcoFalke)
fad2c200f4 build: Bump minimum Clang to clang-10 (MarcoFalke)
fad7cfee8d doc: Remove outdated CentOS comment (MarcoFalke)

Pull request description:

  It doesn't make sense to support a minimum clang version that is difficult to install on all supported operating systems, which generally ship a later version:

  * Ubuntu Focal 20.04: https://packages.ubuntu.com/focal/clang-10 and https://packages.ubuntu.com/focal/clang-12
  * Debian Bullseye: https://packages.debian.org/bullseye/clang-13
  * CentOS 8 Stream: All Clang versions from 11.0 to 15.0

  Also, it allows to drop build code, which means it won't waste review when rolling over into cmake (`cmake/module/CheckStdFilesystem.cmake`).

ACKs for top commit:
  hebasto:
    ACK fa199ee614
  fanquake:
    ACK fa199ee614

Tree-SHA512: c1a0e8f191a6db866b8be3c9d254dc3f576fa021e2eaaeb68f3354554a8b38eaa90bbf9871ff92351b715e62a6b7b98cf94eba6dc53d7c951bddb6ad49ba7716
2023-05-18 11:05:08 +01:00
fanquake 4c3d67a2d0
Merge bitcoin/bitcoin#27571: ci: Run iwyu on all src files
ddddf4957b ci: Run iwyu on all src files (MarcoFalke)

Pull request description:

  This makes it easier to look at the CI output of a file without having to manually add it first to the list.

ACKs for top commit:
  hebasto:
    ACK ddddf4957b

Tree-SHA512: 342b52838ae45ea343731c30058cdd5595d5ea5601a1f396de4466ccdd63f7ab07b3a193df3669e4dca7cb535557dcc98f866b3cf986b98176b20ecead123868
2023-05-17 13:06:23 +01:00
fanquake 6a936580d1
ci: remove RUN_SECURITY_TESTS
We no-longer run any security/syymbol checks in the CI, and doubt we
will in future (if we do, it'll be via Guix, where this var would be
redundant in any case). The CI environment doesn't (exactly) match the
release build environment (and is semi-regularly changing), and the
binaries produced in the CI don't match how we build release binaries,
so there is no point trying to run these checks, especially as we add
more involved tests, i.e #26953.
2023-05-17 10:57:39 +01:00
MarcoFalke fa199ee614
ci: Drop NO_WERROR=1 for clang-10 build
This partially reverts commit 71383f2fad.
This should be fine, because if warnings are issues again in the future,
it can be disabled again, along with a list of the false warnings.
2023-05-17 10:55:03 +02:00
MarcoFalke fad2c200f4
build: Bump minimum Clang to clang-10 2023-05-17 10:30:41 +02:00
MarcoFalke fad7cfee8d
doc: Remove outdated CentOS comment
No longer applicable after CONFIG_SHELL must be explicitly set to dash
after commit fafc55a489.
2023-05-17 09:54:31 +02:00
fanquake 904631e0fc
Merge bitcoin/bitcoin#27667: ci: Remove unused errtrace trap ERR
fad09b703f ci: Remove unused errtrace trap ERR (MarcoFalke)

Pull request description:

  This was added in commit 069752b726, presumably at a time when the functional tests wouldn't capture stderr.

  Now that all tests capture and print stderr on failure, it can be removed. Reference:

  * Unit tests capture via `2>&1`:

  d7700d3a26/src/Makefile.test.include (L421)

  * Functional tests capture as well:

  d7700d3a26/test/functional/test_framework/test_node.py (L356)

ACKs for top commit:
  fanquake:
    ACK fad09b703f
  hebasto:
    ACK fad09b703f, tested on Ubuntu 22.04: I can still see warnings from the sanitizers in both unit and functional tests.

Tree-SHA512: 1e786eee432a7a50eb9f78b06b2b157321cc16f91b613e3b476e9e51572592fe4bcf4dc15df176e5f019f24497ac68cf332d2037b55b57498c93f4e19613163c
2023-05-16 15:28:04 +01:00
Hennadii Stepanov 5d49d98731
ci: Fix "Number of CPUs" output 2023-05-16 12:45:32 +01:00
MarcoFalke fad09b703f
ci: Remove unused errtrace trap ERR 2023-05-16 10:00:47 +02:00
fanquake 3a63ef5020
Merge bitcoin/bitcoin#27616: ci: Remove CI_EXEC bloat
fa01c3c59c ci: Remove CI_EXEC bloat (MarcoFalke)
fa8a428c92 move-only: Move almost all CI_EXEC code to 06_script_b.sh (MarcoFalke)

Pull request description:

  `CI_EXEC` has many issues:

  * It is roughly equivalent to `bash -c "$*"`, meaning that the full command will be treated as a single string, ignoring tokens.
  * It must be put in front of (almost) every command, making it easy to forget, hard to debug the resulting failure, and the code verbose.

  Fix all issues by removing it almost completely.

ACKs for top commit:
  TheCharlatan:
    ACK fa01c3c59c

Tree-SHA512: 4a65d61f5c35ca945d31f270dba3e96305fd83333a7713f0452c67f02a78e1901113e9f18d21e1dc016403c0033eb32038a9308d0a0ded7ee6b970d18381a1c2
2023-05-15 11:15:25 +01:00
MarcoFalke ddddf4957b
ci: Run iwyu on all src files
This makes it easier to look at the CI output of a file without having
to manually add it first.
2023-05-13 10:45:52 +02:00
TheCharlatan a498d699e3
refactor/iwyu: Complete includes for blockmanager_args 2023-05-10 19:07:30 +02:00
MarcoFalke fa01c3c59c
ci: Remove CI_EXEC bloat 2023-05-10 15:28:19 +02:00
MarcoFalke fa8a428c92
move-only: Move almost all CI_EXEC code to 06_script_b.sh
[WARN] The commit is obviously broken and will not run the CI system. In
the rare case this is hit in a git bisect, just skip the commit.

The goal here was to make it trivial to review with the git option:
--color-moved=dimmed-zebra

It is required to move everything into one file because "exit 0" will
otherwise stop working as intended when the containing bash script is no
longer executed with "source ...".

If there is desire to split up 06_script_b.sh into logical chunks in the
future, it will also be easier after the following commit.
2023-05-10 14:10:38 +02:00
MarcoFalke fa1dbd04ca
ci: Remove CI_EXEC bloat in test/06_script_b.sh 2023-05-05 08:51:43 +02:00
MarcoFalke fae8de926a
ci: Move CI container kill out of 06_script_b.sh
This cleans up 06_script_b.sh to only contain code to be executed inside
the CI pod, which avoids confusion and is needed for the next commit.
2023-05-05 08:50:39 +02:00
MarcoFalke fa7d75540e
ci: Pass full env to CI pod to avoid missing a var
Instead of enumerating each passed env var, just pass all. This avoids
the risk of missing to enumerate one. Also, it is less code.

The risk could be that an env var causes non-deterministic behavior, but
this can be fixed by explicitly excluding it once the issue is known.

Values with newlines can not be stored in the file and parsed by
docker/podman, so they are excluded.
2023-05-05 08:46:35 +02:00
fanquake f952e679cd
ci: remove usage of untrusted bpfcc-tools
We've migrated this job to Ubuntu 23.04, which
ships with newer versions of the tools:
https://packages.ubuntu.com/lunar/bpfcc-tools.
2023-05-02 12:02:45 +01:00
fanquake 1232c2f6b9
ci: use LLVM/clang-16 in native_asan job
Similar to #27298.
2023-05-02 12:02:23 +01:00
fanquake d89aca1bdb
Merge bitcoin/bitcoin#27483: Bump python minimum version to 3.8
fac395e5eb ci: Bump ci/lint/Dockerfile (MarcoFalke)
fa6eb65167 test: Use python3.8 pow() (MarcoFalke)
88881cf7ac Bump python minimum version to 3.8 (MarcoFalke)

Pull request description:

  There is no pressing reason to drop support for 3.7, however there are several maintenance issues:

  * There is no supported operating system that ships 3.7 by default. (debian:buster is EOL and unmaintained to the extent that it doesn't run in the CI environment. See https://github.com/bitcoin/bitcoin/pull/27340#issuecomment-1484988445)
  * Compiling python 3.7 from source is also unsupported on at least macos, according to https://github.com/bitcoin/bitcoin/pull/24017#issuecomment-1107820790
  * Recent versions of lief require 3.8, see https://github.com/bitcoin/bitcoin/pull/27507#issuecomment-1517561645

  Fix all maintenance issues by bumping the minimum.

ACKs for top commit:
  RandyMcMillan:
    ACK fac395e
  fjahr:
    ACK fac395e5eb
  fanquake:
    ACK fac395e5eb

Tree-SHA512: c198decdbbe29d186d73ea3f6549d8a38479383495d14a965a2f9211ce39637b43f13a4c2a5d3bf56e2d468be4bbe49b4ee8e8e19ec69936ff43ddf2b714c712
2023-04-28 10:22:20 +01:00
MarcoFalke fac395e5eb
ci: Bump ci/lint/Dockerfile
This bump should not be needed, see discussion starting at
https://github.com/bitcoin/bitcoin/pull/27483#issuecomment-1517739626
2023-04-21 14:31:13 +02:00
fanquake 669af32632
Merge bitcoin/bitcoin#27419: move-only: Extract common/args from util/system
be55f545d5 move-only: Extract common/args and common/config.cpp from util/system (TheCharlatan)

Pull request description:

  This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". It is part of a series of patches splitting up the `util/system` files. Its preceding pull request is https://github.com/bitcoin/bitcoin/pull/27254.

  The pull request contains an extraction of ArgsManager related functions from util/system into their own common/ file.

  The background of this commit is an ongoing effort to decouple the libbitcoinkernel library from the ArgsManager. The ArgsManager belongs into the common library, since the kernel library should not depend on it. See [doc/design/libraries.md](https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md) for more information on this rationale.

ACKs for top commit:
  MarcoFalke:
    re-ACK be55f545d5  🚲
  ryanofsky:
    Code review ACK be55f545d5. Just small cleanups since the last review.
  hebasto:
    ACK be55f545d5, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 90eb03334af0155b823030b4f2ecf286d35058d700ee2ddbbaa445be19e31eb0fe982656f35bd14ecee3ad2c3d0db3746855cb8f3777eff7253713e42873e111
2023-04-21 11:19:08 +01:00
MarcoFalke 88881cf7ac
Bump python minimum version to 3.8
Also, switch ci_native_qt5 to g++-9 (from g++-8) to work around bugs.
This should be fine, because the i686_centos task still checks for g++-8
compatibility.

See
https://github.com/bitcoin/bitcoin/pull/27483#issuecomment-1513477050
for the list of bugs.
2023-04-21 10:18:19 +02:00
fanquake 4de9c2a65f
ci: build libc++ with assertions in MSAN jobs 2023-04-19 11:54:44 +01:00
fanquake 23b8b2026a
ci: build libc++ in DEBUG mode in MSAN jobs 2023-04-19 11:54:44 +01:00
TheCharlatan be55f545d5
move-only: Extract common/args and common/config.cpp from util/system
This is an extraction of ArgsManager related functions from util/system
into their own common file.

Config file related functions are moved to common/config.cpp.

The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager. The ArgsManager belongs
into the common library, since the kernel library should not depend on
it. See doc/design/libraries.md for more information on this rationale.
2023-04-19 10:48:30 +02:00
fanquake 5165984afc
Merge bitcoin/bitcoin#27340: ci: Use Cirrus CI dockerfile env
fa4a46de0b ci: Bump nowallet_libbitcoinkernel task to ubuntu:focal (MarcoFalke)
fabc7d90a9 ci: Use credits in more tasks (MarcoFalke)
facae3b149 ci: Use Cirrus CI dockerfile env (MarcoFalke)

Pull request description:

  Currently the CI env has many intermittent issues:

  * The Ubuntu package servers are frequently down
  * Occasionally other stuff is down, such as dnf, pip, or the android sdk
  * Installing packages is slower than downloading them, at least on Cirrus, which has a fast download speed

  Fix all issues by using the Cirrus CI dockerfile env.

ACKs for top commit:
  josibake:
    code review ACK fa4a46de0b

Tree-SHA512: fea5663f7b6dc1c4ea9f87188026ec542b9269bac8ee3398cd58d4df6c86a0af9d275f1876e03f92fb1f6166ec49b817d9e588e6fe1ed54b77592502c2eccd9d
2023-04-18 10:39:39 +01:00
fanquake 2c60826b50
ci: explicitly install libclang-rt-dev in valgrind jobs
This fixes some cases, i.e under --no-install-recommends, where
libclang-rt-dev wouldn't be installed, and configuring would then fail.

Followup to #27444.
2023-04-13 11:22:39 +01:00
fanquake ba29143d98
ci: use Debian Bookworm and Valgrind 3.19 in Valgrind jobs
https://packages.debian.org/bookworm/valgrind
2023-04-12 17:45:14 +01:00
MarcoFalke fa4a46de0b
ci: Bump nowallet_libbitcoinkernel task to ubuntu:focal
This is needed to work around
https://github.com/bitcoin/bitcoin/pull/27340#issuecomment-1484988445

The only change should be that python3.7 is bumped to 3.8, but this is
fine because ci/test/00_setup_env_native_qt5.sh still checks for
python3.7 compatibility.
2023-04-11 14:12:37 +02:00
fanquake 676671527f
test: LLVM/Clang 16 for MSAN jobs
Sync up with other CI infra.
2023-04-10 10:57:05 +01:00
MarcoFalke fa5af94de6
ci: Run base install at most once
This should avoid errors when running it twice. For example, network
errors on the second invocation of 'apt update'; or unguarded
modifications such as APPEND_APT_SOURCES_LIST, which will append the
same string repeatedly.

The base install may be run twice in Cirrus CI with dockerfiles, or
locally when running twice with DANGER_RUN_CI_ON_HOST specified.
2023-04-06 11:52:30 +02:00
fanquake 5a8bd45056
Merge bitcoin/bitcoin#27423: ci: fix git dubious permissions error
ed4a8339b8 ci: fix git dubious permissions error (josibake)

Pull request description:

  fixes https://github.com/bitcoin/bitcoin/pull/27376#issuecomment-1496449588

  this appears to be caused by a more recent version of git being sensitive to mismatched permissions on directories. we didn't notice this before because we were using two separate user accounts to fix up dir permissions in the container , but the second account was removed in #27376

  there might be a more elegant way to do this, but this does the trick and seems to be the way others are fixing this issue around the internets.

ACKs for top commit:
  RandyMcMillan:
    ACK ed4a833
  hebasto:
    re-ACK ed4a8339b8

Tree-SHA512: dad467deca101a24f3ed34b3e26a1db5099a5bd5c3e9c9a22771c59848f7d7e7843c7386348e6fdf86d5a556e4706e5e20005d7a6637193e1c8aef7a5ff7fb19
2023-04-06 10:04:01 +01:00
josibake ed4a8339b8
ci: fix git dubious permissions error 2023-04-05 14:25:13 +02:00
fanquake a56c96507a
ci: use clang-16 in tidy task 2023-04-05 11:43:42 +01:00
MarcoFalke fafe3a8e38
ci: Remove second user account 2023-03-31 08:28:38 +02:00
fanquake 45be6af694
Merge bitcoin/bitcoin#27333: ci: cleanup of CI_EXEC & CI_EXEC_ROOT
b5ef1419ec ci: cleanup of CI_EXEC & CI_EXEC_ROOT (refs #27321) (Vasil Stoyanov)

Pull request description:

  Basically it removes the above-mentioned env-vars as per MarcoFalke's instructions. The only deviation from the plan laid out there was that I double-quoted the last instance of $ANDROID_HOME for the sake of consistency and future-proofing and the rest of the non-quoted vars due to lint failing the build.

  Fixes #27321.

ACKs for top commit:
  josibake:
    ACK b5ef1419ec
  hernanmarino:
    untested ACK b5ef1419ec. LGTM

Tree-SHA512: a79776bf64a2fa8b38195cc84445e171fd689f156aac5a1e5d39040300567eb9f4c2ebd00fbf3fa0e55b68793f8f752d94f7d817f6097ed9dd3a8ea57651b981
2023-03-30 18:55:27 +01:00