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 --stop-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
89
89
90
90
timeout-minutes : 120
91
91
92
+ strategy :
93
+ fail-fast : false
94
+ matrix :
95
+ job-type : [standard, fuzz]
96
+ include :
97
+ - job-type : standard
98
+ file-env : ' ./ci/test/00_setup_env_mac_native.sh'
99
+ job-name : ' macOS 14 native, arm64, no depends, sqlite only, gui'
100
+ - job-type : fuzz
101
+ file-env : ' ./ci/test/00_setup_env_mac_native_fuzz.sh'
102
+ job-name : ' macOS 14 native, arm64, fuzz'
103
+
92
104
env :
93
105
DANGER_RUN_CI_ON_HOST : 1
94
- FILE_ENV : ' ./ci/test/00_setup_env_mac_native.sh'
95
106
BASE_ROOT_DIR : ${{ github.workspace }}
96
107
97
108
steps :
@@ -120,22 +131,24 @@ jobs:
120
131
uses : actions/cache/restore@v4
121
132
with :
122
133
path : ${{ env.CCACHE_DIR }}
123
- key : ${{ github.job }}-ccache-${{ github.run_id }}
124
- restore-keys : ${{ github.job }}-ccache-
134
+ key : ${{ github.job }}-${{ matrix.job-type }}- ccache-${{ github.run_id }}
135
+ restore-keys : ${{ github.job }}-${{ matrix.job-type }}- ccache-
125
136
126
137
- name : CI script
127
138
run : ./ci/test_run_all.sh
139
+ env :
140
+ FILE_ENV : ${{ matrix.file-env }}
128
141
129
142
- name : Save Ccache cache
130
143
uses : actions/cache/save@v4
131
144
if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
132
145
with :
133
146
path : ${{ env.CCACHE_DIR }}
134
147
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
135
- key : ${{ github.job }}-ccache-${{ github.run_id }}
148
+ key : ${{ github.job }}-${{ matrix.job-type }}- ccache-${{ github.run_id }}
136
149
137
150
win64-native :
138
- name : ' Win64 native, VS 2022 '
151
+ name : ${{ matrix.job-name }}
139
152
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
140
153
# See: https://github.com/actions/runner-images#available-images.
141
154
runs-on : windows-2022
@@ -146,6 +159,18 @@ jobs:
146
159
PYTHONUTF8 : 1
147
160
TEST_RUNNER_TIMEOUT_FACTOR : 40
148
161
162
+ strategy :
163
+ fail-fast : false
164
+ matrix :
165
+ job-type : [standard, fuzz]
166
+ include :
167
+ - job-type : standard
168
+ generate-options : ' -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
169
+ job-name : ' Win64 native, VS 2022'
170
+ - job-type : fuzz
171
+ generate-options : ' -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
172
+ job-name : ' Win64 native fuzz, VS 2022'
173
+
149
174
steps :
150
175
- name : Checkout
151
176
uses : actions/checkout@v4
@@ -186,11 +211,11 @@ jobs:
186
211
187
212
- name : Generate build system
188
213
run : |
189
- 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
214
+ cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ${{ matrix.generate-options }}
190
215
191
216
- name : Save vcpkg binary cache
192
217
uses : actions/cache/save@v4
193
- if : github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true'
218
+ if : github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
194
219
with :
195
220
path : ~/AppData/Local/vcpkg/archives
196
221
key : ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
@@ -201,11 +226,13 @@ jobs:
201
226
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
202
227
203
228
- name : Run test suite
229
+ if : matrix.job-type == 'standard'
204
230
working-directory : build
205
231
run : |
206
232
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
207
233
208
234
- name : Run functional tests
235
+ if : matrix.job-type == 'standard'
209
236
working-directory : build
210
237
env :
211
238
BITCOIND : ' ${{ github.workspace }}\build\src\Release\bitcoind.exe'
@@ -216,6 +243,23 @@ jobs:
216
243
shell : cmd
217
244
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%
218
245
246
+ - name : Clone corpora
247
+ if : matrix.job-type == 'fuzz'
248
+ run : |
249
+ git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets"
250
+ Set-Location "$env:RUNNER_TEMP\qa-assets"
251
+ Write-Host "Using qa-assets repo from commit ..."
252
+ git log -1
253
+
254
+ - name : Run fuzz tests
255
+ if : matrix.job-type == 'fuzz'
256
+ working-directory : build
257
+ env :
258
+ BITCOINFUZZ : ' ${{ github.workspace }}\build\src\test\fuzz\Release\fuzz.exe'
259
+ shell : cmd
260
+ run : |
261
+ py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
262
+
219
263
asan-lsan-ubsan-integer-no-depends-usdt :
220
264
name : ' ASan + LSan + UBSan + integer, no depends, USDT'
221
265
runs-on : ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
0 commit comments