75
75
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && CC=clang CXX=clang++ cmake -B build -DWERROR=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWITH_BDB=ON -DWITH_USDT=ON -DCMAKE_CXX_FLAGS='-Wno-error=unused-member-function' && cmake --build build -j $(nproc) && ctest --output-on-failure --test-dir build -j $(nproc) && ./build/test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
76
76
77
77
macos-native-arm64 :
78
- name : ' macOS 14 native, arm64, no depends, sqlite only, gui '
78
+ name : ${{ matrix.job-name }}
79
79
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
80
80
# See: https://github.com/actions/runner-images#available-images.
81
81
runs-on : macos-14
85
85
86
86
timeout-minutes : 120
87
87
88
+ strategy :
89
+ fail-fast : false
90
+ matrix :
91
+ job-type : [standard, fuzz]
92
+ include :
93
+ - job-type : standard
94
+ file-env : ' ./ci/test/00_setup_env_mac_native.sh'
95
+ job-name : ' macOS 14 native, arm64, no depends, sqlite only, gui'
96
+ - job-type : fuzz
97
+ file-env : ' ./ci/test/00_setup_env_mac_native_fuzz.sh'
98
+ job-name : ' macOS 14 native, arm64, fuzz'
99
+
88
100
env :
89
101
DANGER_RUN_CI_ON_HOST : 1
90
- FILE_ENV : ' ./ci/test/00_setup_env_mac_native.sh'
91
102
BASE_ROOT_DIR : ${{ github.workspace }}
92
103
93
104
steps :
@@ -115,22 +126,24 @@ jobs:
115
126
uses : actions/cache/restore@v4
116
127
with :
117
128
path : ${{ env.CCACHE_DIR }}
118
- key : ${{ github.job }}-ccache-${{ github.run_id }}
119
- restore-keys : ${{ github.job }}-ccache-
129
+ key : ${{ github.job }}-${{ matrix.job-type }}- ccache-${{ github.run_id }}
130
+ restore-keys : ${{ github.job }}-${{ matrix.job-type }}- ccache-
120
131
121
132
- name : CI script
122
133
run : ./ci/test_run_all.sh
134
+ env :
135
+ FILE_ENV : ${{ matrix.file-env }}
123
136
124
137
- name : Save Ccache cache
125
138
uses : actions/cache/save@v4
126
139
if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
127
140
with :
128
141
path : ${{ env.CCACHE_DIR }}
129
142
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
130
- key : ${{ github.job }}-ccache-${{ github.run_id }}
143
+ key : ${{ github.job }}-${{ matrix.job-type }}- ccache-${{ github.run_id }}
131
144
132
145
win64-native :
133
- name : ' Win64 native, VS 2022 '
146
+ name : ${{ matrix.job-name }}
134
147
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
135
148
# See: https://github.com/actions/runner-images#available-images.
136
149
runs-on : windows-2022
@@ -142,6 +155,18 @@ jobs:
142
155
PYTHONUTF8 : 1
143
156
TEST_RUNNER_TIMEOUT_FACTOR : 40
144
157
158
+ strategy :
159
+ fail-fast : false
160
+ matrix :
161
+ job-type : [standard, fuzz]
162
+ include :
163
+ - job-type : standard
164
+ generate-options : ' -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
165
+ job-name : ' Win64 native, VS 2022'
166
+ - job-type : fuzz
167
+ generate-options : ' -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
168
+ job-name : ' Win64 native fuzz, VS 2022'
169
+
145
170
steps :
146
171
- name : Checkout
147
172
uses : actions/checkout@v4
@@ -182,11 +207,11 @@ jobs:
182
207
183
208
- name : Generate build system
184
209
run : |
185
- cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON
210
+ cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
186
211
187
212
- name : Save vcpkg binary cache
188
213
uses : actions/cache/save@v4
189
- if : github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
214
+ if : github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
190
215
with :
191
216
path : ~/AppData/Local/vcpkg/archives
192
217
key : ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
@@ -197,11 +222,13 @@ jobs:
197
222
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
198
223
199
224
- name : Run test suite
225
+ if : matrix.job-type == 'standard'
200
226
working-directory : build
201
227
run : |
202
228
ctest --output-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
203
229
204
230
- name : Run functional tests
231
+ if : matrix.job-type == 'standard'
205
232
working-directory : build
206
233
env :
207
234
BITCOIND : ' ${{ github.workspace }}\build\src\Release\bitcoind.exe'
@@ -212,6 +239,23 @@ jobs:
212
239
shell : cmd
213
240
run : py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
214
241
242
+ - name : Clone corpora
243
+ if : matrix.job-type == 'fuzz'
244
+ run : |
245
+ git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
246
+ Set-Location "$env:RUNNER_TEMP\qa-assets"
247
+ Write-Host "Using qa-assets repo from commit ..."
248
+ git log -1
249
+
250
+ - name : Run fuzz tests
251
+ if : matrix.job-type == 'fuzz'
252
+ working-directory : build
253
+ env :
254
+ BITCOINFUZZ : ' ${{ github.workspace }}\build\src\test\fuzz\Release\fuzz.exe'
255
+ shell : cmd
256
+ run : |
257
+ py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
258
+
215
259
asan-lsan-ubsan-integer-no-depends-usdt :
216
260
name : ' ASan + LSan + UBSan + integer, no depends, USDT'
217
261
runs-on : ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
0 commit comments