108 Commits

Author SHA1 Message Date
Ava Chow
1c521ae922
ci: Properly include $FILE_ENV in DEPENDS_HASH
$FILE_ENV has a full relative path already, prepending with ci/test/
results in a non-existent path which means that DEPENDS_HASH was not
actually committing to the test's environment file.

Github-Pull: #33581
Rebased-From: ceeb53adcd0a6a87a65c8ebbb20472c15c502dfd
2025-10-13 16:56:17 +01:00
Hennadii Stepanov
2cd432dc6d
[28.x] ci: Fix Qt 5.15 URL 2025-10-07 13:43:24 +01:00
MarcoFalke
ea4e0aa8c4
ci: Checkout latest merged pulls
Github-Pull: #33303
Rebased-From: fa8f081af31
2025-09-19 08:41:22 +01:00
will
48761444e2
ci: reduce runner sizes on various jobs
Github Pull: #33319
Rebased-From: 5eeb2facbbbbf68a2c30ef9e6747e39c85d7b116

These jobs can use reduced runner size to avoid wasting CPU, as much of
the long-running part of the job is single-threaded.

Suggested in: https://github.com/bitcoin/bitcoin/pull/32989#discussion_r2321775620

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2025-09-19 08:41:17 +01:00
will
1bfe9f56c3
ci: dynamically match makejobs with cores
Github-Pull: #32989
Rebased-From: 3f339e99e00

Previously jobs were running on a large multi-core server where 10 jobs
as default made sense (or may even have been on the low side).

Using hosted runners with fixed (and lower) numbers of vCPUs we should
adapt compilation to match the number of cpus we have dynamically.

This is cross-platform compatible with macos and linux only.
2025-09-19 08:40:58 +01:00
will
8ab684eeb7
ci: port win64-no_gui job 2025-09-19 08:40:51 +01:00
will
99411458b4
ci: port lint
Github-Pull: #32989
Rebased-From: bc41848d00f

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:48 +01:00
will
4b3468389b
ci: port msan-depends
Github-Pull: #32989
Rebased-From: d290a8e6eab

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:44 +01:00
will
cf18a500d7
ci: port tsan-depends-gui
Github-Pull: #32989
Rebased-From: 9bbae61e3b4

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:41 +01:00
will
49ff9d7e6e
ci: port tidy
Github-Pull: #32989
Rebased-From: bf7d5364527

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:37 +01:00
will
c2c69cd6ec
ci: port 32-bit-centos-dash-gui
Github-Pull: #32989
Rebased-From: 549074bc643

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:34 +01:00
will
fa259b4e72
ci: port previous-releases-depends-debug
Github-Pull: #32989
Rebased-From: 58e38c3a042

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:30 +01:00
will
96cd28f146
ci: port fuzzer-address-undefined-integer-nodepends
Github-Pull: #32989
Rebased-From: 341196d75c3

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:27 +01:00
will
0fc3fd1eb5
ci: port i686-multiprocess-DEBUG
Github-Pull: #32989
Rebased-From: f2068f26c12

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:23 +01:00
will
f61cb6be58
ci: port nowallet-libbitcoinkernel
Github-Pull: #32989
Rebased-From: 2a00b12d73b

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:20 +01:00
will
6237cd537d
ci: port mac-cross-gui-notests
Github-Pull: #32989
Rebased-From: 9c2514de534

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:13 +01:00
will
61bb5180d5
ci: update asan-lsan-ubsan
Github-Pull: #32989
Rebased-From: 884251441bb

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:06 +01:00
will
bb455c9594
ci: port arm job
Github-Pull: #32989
Rebased-From: f253031cb8e

Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
2025-09-19 08:40:03 +01:00
will
5538ce4f32
ci: add job to determine runner type
Github-Pull: #32989
Rebased-From: cc1735d7771

To remove multiple occurances of the respository name, against which we
compare `${{ github.repository }}` to check if we should use Cirrus
Runners, introduce a helper job which can check a single environment
variable and output this as an input to subsequent jobs.

Forks can maintain a trivial patch of their repo name against the
`REPO_USE_CIRRUS_RUNNERS` variable in ci.yml if they have Cirrus Runners
of their own, which will then enable cache actions and docker build
cache to use Cirrus Cache.

It's not possible to use `${{ env.USE_CIRRUS_RUNNERS }}` in the
`runs-on:` directive as the context is not supported by GitHub.

If it was, this job would no longer be necessary.
2025-09-19 08:39:59 +01:00
will
82cfddbc9a
ci: add Cirrus cache host
Github-Pull: #32989
Rebased-From: 020069e6b71

Whilst the action cirruslabs/actions/cache will automatically set this
host, the docker `gha` build cache backend will not be aware of it.

Set the value here, which will later be used in the docker build args to
enable docker build cache on the cirrus cache.
2025-09-19 08:39:56 +01:00
will
f8cb31d064
ci: add configure-docker action
Github-Pull: #32989
Rebased-From: fdf64e55324

Another action to reduce boilerplate in the main ci.yml file.

This action will set up a docker builder compatible with caching build
layers to a container registry using the `gha` build driver.

It will then configure the docker build cache args.
2025-09-19 08:39:45 +01:00
will
270191c3c0
ci: add REPO_USE_CIRRUS_RUNNERS
Github-Pull: #32989
Rebased-From: 33ba073df7a

If set, Cirrus runners will be used on pushes to, and pull requests
against, this repository.

Forks can set this if they have their own cirrus runners.
2025-09-19 08:39:42 +01:00
will
8d6d70f555
ci: add caching actions
Github-Pull: #32989
Rebased-From: b232b0fa5e9

Add "Restore" and "Save" caching actions.

These actions reduce boilerplate in the main ci.yml configuration file.

These actions are implemented so that caches will be saved on `push`
only.

When a pull request is opened it will cache hit on the caches from the
lastest push, or in the case of depends will hit on any matching depends
hash, falling back to partial matches.

Depends caches are hashed using
`$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)`
and this hash is passed in as an input to the actions. This means we
direct cache hit in cases where depends would not be re-built, otherwise
falling back to a partial match.

Previous releases cache is hashed similarly to depends, but using the
test/get_previous_releases.py file.

The cirruslabs cache action will fallback transparently to GitHub's
cache in the case that the job is not being run on a Cirrus Runner,
making these compatible with running on forks (on free GH hardware).
2025-09-19 08:39:38 +01:00
will
d8ad667f94
ci: add configure environment action
Github-Pull: #32989
Rebased-From: b8fcc9fcbcd
2025-09-19 08:39:21 +01:00
Hennadii Stepanov
032ebe5be4
ci: Silent Homebrew's reinstall warnings 2024-08-05 17:14:33 +01:00
Max Edwards
93ee17c1d6 ci: enable berkley db on test each commit job 2024-07-29 11:43:47 +01:00
Sjors Provoost
576828e732
ci: test-each-commit merge base optional
The ci "test-each-commit" job fetches the PR branch being tested with a depth of (# of commits in PR + 2), and then tries to run tests on commits after the most recent merge commit.

When a PR is opened against a bitcoin core branch, a merge commit is always guaranteed to exist within the fetch depth, because bitcoin core branches always point at merge commits.

However, in fork repositories, pull requests can be opened based on other branches that don't contain recent merge commits, and this will currently cause git rev-list to fail with fatal: bad revision '^^@'.

Work around this problem by not requiring a recent merge commit, and just testing on all fetched commits if a merge commit can't be found.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2024-06-25 20:03:44 +02:00
Max Edwards
4ecbbd9b7f ci: add option for running tests without volume
DANGER_CI_ON_HOST_CACHE_FOLDERS if set will mount caches in directories on the host rather than in docker volumes. Supports saving and restoring caches on Github Actions.
2024-06-20 17:42:28 +01:00
Max Edwards
518b06c4b8 ci: remove unused bcc variable from workflow 2024-06-18 10:16:30 +01:00
Ava Chow
d97ddbe797
Merge bitcoin/bitcoin#30193: ci: move ASan job to GitHub Actions from Cirrus CI
9eea51d9058ad638861aa4b94c1c6e71caeb8765 ci: move Asan / LSan / USDT job to Github Actions (Max Edwards)
4b527fa93b9763a33842069bc07446313cbf5e0f ci: add IPV6 network to ci container (Max Edwards)

Pull request description:

  PR for moving the ASAN + LSAN + USDT + friends job to github actions from Cirrus.

  The motivation for this PR is that this task needs a full VM (or bare metal) to function, because of the tracepoints. It can not run in a container on an arbitrary Linux, because the outside machine must exactly match the specification of the distro used in the CI task config. This requires more maintenance for the persistent worker, and I think moving to GHA will reduce the maintenance burden, or at least make it possible for anyone to work on.

  Also, it makes it easier to run the task on forks (bitcoin-inquisition, bitcoin-knots, devel forks, ...) without having to set-up a real machine.

ACKs for top commit:
  maflcko:
    review ACK 9eea51d9058ad638861aa4b94c1c6e71caeb8765
  achow101:
    ACK 9eea51d9058ad638861aa4b94c1c6e71caeb8765
  hebasto:
    ACK 9eea51d9058ad638861aa4b94c1c6e71caeb8765.

Tree-SHA512: 1111c1c9e3a11e725dff1344643fff3c91fb9b4d7c1cc9a7d507a8f146f5223316a00272030b41ae37ecb59d044f2e90e1cd907450049b25f094f0b60643d4c7
2024-06-17 15:49:43 -04:00
Max Edwards
9eea51d905 ci: move Asan / LSan / USDT job to Github Actions
Moving it from Cirrus CI so it can be easier to maintain and used by forks
2024-06-12 14:20:25 +01:00
Hennadii Stepanov
0d3ef83433
ci: Use relative paths in win64-native CI job consistently
This change improves readability. Also the `Tee-Object` cmdlet is used
when appropriate.
2024-06-07 10:47:36 +01:00
Hennadii Stepanov
501aceefcf
ci: Remove no longer needed workaround for GHA Windows images
GHA Windows images previously had multiple VC Build Tools installed,
which required specifying the `VCPKG_PLATFORM_TOOLSET_VERSION`
explicitly to avoid linker errors. This issue has been resolved as per
https://github.com/actions/runner-images/issues/9701.
2024-06-07 09:55:34 +01:00
MarcoFalke
fa90ad23c0
ci: Roll test-each-commit Ubuntu 2024-05-15 09:53:04 +02:00
MarcoFalke
fa6c82dd9b
ci: Remove clang version pin in test-each-commit 2024-05-15 09:53:00 +02:00
Hennadii Stepanov
18fd522ca9
ci, msvc: Add "Run fuzz binaries" step 2024-04-18 10:27:55 +01:00
Hennadii Stepanov
23cb8207cd
ci, msvc: Add "Clone fuzz corpus" step 2024-04-18 10:27:34 +01:00
laanwj
6c2990416e ci: Pull in qtbase5-dev instead of seperate low-level libraries
Fix CI build for t64 migration.
2024-03-29 11:17:39 +01:00
fanquake
d14c7286b6
Merge bitcoin/bitcoin#29620: ci: add print of powershell version to win64 job
115c283516b8550485df752656e9b863be5903a1 ci: add print of powershell version to win64 job (Max Edwards)

Pull request description:

  Extraction of just printing powershell version from closed PR: https://github.com/bitcoin/bitcoin/pull/29581

  See https://github.com/bitcoin/bitcoin/pull/29581#issuecomment-1984212990 for the cause of a CI failure which was a powershell update.

  This PR will make it easier to notice in the future that PS has changed.

ACKs for top commit:
  hebasto:
    ACK 115c283516b8550485df752656e9b863be5903a1. We still use PowerShell in some steps of the "Win64 native" CI job.

Tree-SHA512: 4c7ba9df4f0a98491120326f05e877a995f43a387fe9bbd193549b32f5a4488f85f83e472c9277db457110a7deda04f08832fe6e8129aff4b0b7278be23d4e35
2024-03-12 11:53:26 +00:00
Hennadii Stepanov
ae5f72027f
ci: Add workaround for Homebrew's python link error
Promoting Homebrew's python@3.12 to the default python3 breaks symbolic
links on macOS x86_64.

This change adds a workaround for that issue.

Also see: https://github.com/actions/runner-images/issues/9471 etc.
2024-03-10 13:08:42 +00:00
Max Edwards
115c283516 ci: add print of powershell version to win64 job 2024-03-06 15:27:26 +00:00
Hennadii Stepanov
57e6e2279e
ci: Fix functional tests step for pull requests in Windows GHA job
This functionality has been broken since the Windows runner image
version `20240128.1.0`.
2024-03-02 01:14:14 +00:00
Max Edwards
1484998b6b ci: print python version on win64 native job 2024-02-28 13:52:22 +00:00
Hennadii Stepanov
ec25e74542
ci: Update cache action
This change fixes deprecation warnings for Node.js 16 actions in the GHA
CI.

See:
- https://github.com/marketplace/actions/cache
- https://github.com/actions/cache/releases/tag/v4.0.0
2024-01-25 11:55:57 +00:00
Hennadii Stepanov
d742be3d3f
ci: Switch native macOS CI job to Xcode 15.0 2024-01-08 10:30:28 +00:00
Hennadii Stepanov
43c3246af7
ci: Set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK to avoid failures
Homebrew attempts to check for outdated dependents or those with broken
linkage. Such behavior might lead to failures when Homebrew updates them
on old macOS images.

This change prevents such behavior.
2023-12-14 12:18:53 +00:00
Hennadii Stepanov
7b22cd80e0
Revert "ci: Only run functional tests on windows in master"
This reverts commit aba4a5887b44bf7cbee9ea0a8e02bb92c1b4147b.
2023-12-12 10:04:49 +00:00
MarcoFalke
fa67f096bd
build: Require C++20 compiler 2023-12-07 11:05:33 +01:00
Hennadii Stepanov
70100f8584
Revert "ci: Avoid toolset ambiguity that MSVC can't handle"
This reverts commit 91d5bd8ac9a28725c735f8e6900bc85673bb190a.
2023-11-24 15:47:49 +00:00
Hennadii Stepanov
1a889f7ea0
ci: Set MSVC toolset version explicitly
This change avoids toolset incompatibilities that cause linker errors.
2023-11-24 15:47:28 +00:00