Skip to content

Commit 5cf7a73

Browse files
committed
ci: run Bitcoin Core CI jobs
Add a workflow that runs Bitcoin Core CI jobs against libmultiprocess by overlaying the repository into the bitcoin/src/ipc/libmultiprocess subtree during CI.
1 parent 22bec91 commit 5cf7a73

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

.github/workflows/bitcoin-ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Bitcoin Core CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
bitcoin-ci-matrix:
14+
name: ${{ matrix.name }}
15+
runs-on: ubuntu-latest
16+
timeout-minutes: ${{ matrix.timeout-minutes }}
17+
if: ${{ github.repository_owner == 'bitcoin-core' }}
18+
19+
env:
20+
CI_FAILFAST_TEST_LEAVE_DANGLING: 1
21+
DANGER_CI_ON_HOST_FOLDERS: 1
22+
FILE_ENV: ${{ matrix.file-env }}
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- name: 'ASan'
29+
timeout-minutes: 120
30+
file-env: './ci/test/00_setup_env_native_asan.sh'
31+
- name: 'fuzz'
32+
timeout-minutes: 240
33+
file-env: './ci/test/00_setup_env_native_fuzz.sh'
34+
- name: 'TSan'
35+
timeout-minutes: 120
36+
file-env: './ci/test/00_setup_env_native_tsan.sh'
37+
- name: 'MSan'
38+
timeout-minutes: 120
39+
file-env: './ci/test/00_setup_env_native_msan.sh'
40+
41+
steps:
42+
- name: Checkout Bitcoin Core
43+
uses: actions/checkout@v6
44+
with:
45+
repository: bitcoin/bitcoin
46+
fetch-depth: 1
47+
48+
- name: Show Bitcoin Core revision
49+
run: |
50+
git rev-parse HEAD
51+
git log -1 --oneline
52+
53+
- name: Checkout libmultiprocess
54+
uses: actions/checkout@v6
55+
with:
56+
path: libmultiprocess
57+
fetch-depth: 1
58+
59+
- name: Replace vendored libmultiprocess subtree
60+
run: |
61+
set -euxo pipefail
62+
rsync -a --delete \
63+
--exclude=.git \
64+
./libmultiprocess/ \
65+
./src/ipc/libmultiprocess/
66+
67+
- name: Clear unnecessary files on bloated GHA VM
68+
uses: bitcoin/bitcoin/.github/actions/clear-files@master
69+
70+
- name: Configure environment
71+
uses: bitcoin/bitcoin/.github/actions/configure-environment@master
72+
73+
- name: Restore caches
74+
id: restore-cache
75+
uses: bitcoin/bitcoin/.github/actions/restore-caches@master
76+
77+
- name: Configure Docker
78+
uses: bitcoin/bitcoin/.github/actions/configure-docker@master
79+
with:
80+
cache-provider: 'gha'
81+
82+
- name: Enable bpfcc script for ASan job
83+
if: ${{ matrix.file-env == './ci/test/00_setup_env_native_asan.sh' }}
84+
run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh
85+
86+
- name: Set mmap_rnd_bits for TSan/MSan jobs
87+
if: ${{ matrix.file-env == './ci/test/00_setup_env_native_tsan.sh' || matrix.file-env == './ci/test/00_setup_env_native_msan.sh' }}
88+
run: sudo sysctl -w vm.mmap_rnd_bits=28
89+
90+
- name: Run Bitcoin Core CI script
91+
run: ./ci/test_run_all.sh
92+
93+
- name: Save caches
94+
uses: bitcoin/bitcoin/.github/actions/save-caches@master

0 commit comments

Comments
 (0)