55 pull_request :
66
77jobs :
8- test-each-commit :
9- name : ' test each commit'
10- runs-on : ubuntu-24.04
11- if : github.event_name == 'pull_request' && github.event.pull_request.commits != 1
12- timeout-minutes : 360 # Use maximum time, see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below.
13- env :
14- MAX_COUNT : 6
8+ build-openbsd :
9+ runs-on : ubuntu-latest
10+ name : build • openbsd
11+ defaults :
12+ run :
13+ shell : openbsd {0}
1514 steps :
16- - name : Determine fetch depth
17- run : echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
1815 - uses : actions/checkout@v5
19- with :
20- ref : ${{ github.event.pull_request.head.sha }}
21- fetch-depth : ${{ env.FETCH_DEPTH }}
22- - name : Determine commit range
23- run : |
24- # Checkout HEAD~ and find the test base commit
25- # Checkout HEAD~ because it would be wasteful to rerun tests on the PR
26- # head commit that are already run by other jobs.
27- git checkout HEAD~
28- # Figure out test base commit by listing ancestors of HEAD, excluding
29- # ancestors of the most recent merge commit, limiting the list to the
30- # newest MAX_COUNT ancestors, ordering it from oldest to newest, and
31- # taking the first one.
32- #
33- # If the branch contains up to MAX_COUNT ancestor commits after the
34- # most recent merge commit, all of those commits will be tested. If it
35- # contains more, only the most recent MAX_COUNT commits will be
36- # tested.
37- #
38- # In the command below, the ^@ suffix is used to refer to all parents
39- # of the merge commit as described in:
40- # https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand_notations
41- # and the ^ prefix is used to exclude these parents and all their
42- # ancestors from the rev-list output as described in:
43- # https://git-scm.com/docs/git-rev-list
44- MERGE_BASE=$(git rev-list -n1 --merges HEAD)
45- EXCLUDE_MERGE_BASE_ANCESTORS=
46- # MERGE_BASE can be empty due to limited fetch-depth
47- if test -n "$MERGE_BASE"; then
48- EXCLUDE_MERGE_BASE_ANCESTORS=^${MERGE_BASE}^@
49- fi
50- echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV"
51- - run : |
52- git fetch origin "${GITHUB_BASE_REF}"
53- git config user.email "[email protected] " 54- git config user.name "CI"
55- - run : |
56- sudo apt-get update
57- sudo apt-get install clang mold ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev capnproto libcapnp-dev -y
58- - name : Compile and run tests
59- run : |
60- # Run tests on commits after the last merge commit and before the PR head commit
61- git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && python3 ./.github/ci-test-each-commit-exec.py && git reset --hard" ${{ env.TEST_BASE }}
62-
63- macos-native-arm64 :
64- name : ${{ matrix.job-name }}
65- # Use any image to support the xcode-select below, but hardcode version to avoid silent upgrades (and breaks).
66- # See: https://github.com/actions/runner-images#available-images.
67- runs-on : macos-14
68-
69- # When a contributor maintains a fork of the repo, any pull request they make
70- # to their own fork, or to the main repository, will trigger two CI runs:
71- # one for the branch push and one for the pull request.
72- # This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
73- # in Github repository settings.
74- if : ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
75-
76- timeout-minutes : 120
77-
78- strategy :
79- fail-fast : false
80- matrix :
81- job-type : [standard, fuzz]
82- include :
83- - job-type : standard
84- file-env : ' ./ci/test/00_setup_env_mac_native.sh'
85- job-name : ' macOS 14 native, arm64, no depends, sqlite only, gui'
86- - job-type : fuzz
87- file-env : ' ./ci/test/00_setup_env_mac_native_fuzz.sh'
88- job-name : ' macOS 14 native, arm64, fuzz'
89-
90- env :
91- DANGER_RUN_CI_ON_HOST : 1
92- BASE_ROOT_DIR : ${{ github.workspace }}
93-
94- steps :
95- - name : Checkout
96- uses : actions/checkout@v5
97-
98- - name : Clang version
99- run : |
100- # Use the earliest Xcode supported by the version of macOS denoted in
101- # doc/release-notes-empty-template.md and providing at least the
102- # minimum clang version denoted in doc/dependencies.md.
103- # See: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes
104- sudo xcode-select --switch /Applications/Xcode_15.0.app
105- clang --version
106-
107- - name : Install Homebrew packages
108- env :
109- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK : 1
110- run : |
111- # A workaround for "The `brew link` step did not complete successfully" error.
112- brew install --quiet python@3 || brew link --overwrite python@3
113- brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp
114-
115- - name : Set Ccache directory
116- run : echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
11716
118- - name : Restore Ccache cache
119- id : ccache-cache
120- uses : actions/cache/restore@v4
17+ - name : Start OpenBSD VM
18+ uses : vmactions/openbsd-vm@v1
12119 with :
122- path : ${{ env.CCACHE_DIR }}
123- key : ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
124- restore-keys : ${{ github.job }}-${{ matrix.job-type }}-ccache-
125-
126- - name : CI script
127- run : ./ci/test_run_all.sh
128- env :
129- FILE_ENV : ${{ matrix.file-env }}
130-
131- - name : Save Ccache cache
132- uses : actions/cache/save@v4
133- if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
134- with :
135- path : ${{ env.CCACHE_DIR }}
136- # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
137- key : ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
138-
139- windows-native-dll :
140- name : ${{ matrix.job-name }}
141- runs-on : windows-2022
142-
143- if : ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
20+ prepare : |
21+ pkg_add -v cmake ninja git python bash
22+ run : |
23+ git clone --depth=1 https://codeberg.org/OpenBSD/ports.git /usr/ports
24+ sync : ' rsync'
25+ copyback : false
14426
145- env :
146- PYTHONUTF8 : 1
147- TEST_RUNNER_TIMEOUT_FACTOR : 40
148-
149- strategy :
150- fail-fast : false
151- matrix :
152- job-type : [standard, fuzz]
153- include :
154- - job-type : standard
155- generate-options : ' -DBUILD_GUI=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
156- job-name : ' Windows native, VS 2022'
157- - job-type : fuzz
158- generate-options : ' -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
159- job-name : ' Windows native, fuzz, VS 2022'
160-
161- steps :
162- - name : Checkout
163- uses : actions/checkout@v5
164-
165- - name : Configure Developer Command Prompt for Microsoft Visual C++
166- # Using microsoft/setup-msbuild is not enough.
167- uses : ilammy/msvc-dev-cmd@v1
168- with :
169- arch : x64
170-
171- - name : Get tool information
172- shell : pwsh
173- run : |
174- cmake -version | Tee-Object -FilePath "cmake_version"
175- Write-Output "---"
176- msbuild -version | Tee-Object -FilePath "msbuild_version"
177- $env:VCToolsVersion | Tee-Object -FilePath "toolset_version"
178- py -3 --version
179- Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
180- bash --version
181-
182- - name : Using vcpkg with MSBuild
27+ - name : Install capnproto
18328 run : |
184- echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
185- # Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
186- sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
187-
188- - name : vcpkg tools cache
189- uses : actions/cache@v4
190- with :
191- path : C:/vcpkg/downloads/tools
192- key : ${{ github.job }}-vcpkg-tools
193-
194- - name : Restore vcpkg binary cache
195- uses : actions/cache/restore@v4
196- id : vcpkg-binary-cache
197- with :
198- path : ~/AppData/Local/vcpkg/archives
199- key : ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
29+ cd /usr/ports/devel/capnproto/
30+ make install
20031
201- - name : Generate build system
32+ - name : Run CI script
20233 run : |
203- cmake -B build -Werror=dev --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
34+ cd ${{ github.workspace }}
35+ CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh
20436
205- - name : Save vcpkg binary cache
206- uses : actions/cache/save@v4
207- if : github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
208- with :
209- path : ~/AppData/Local/vcpkg/archives
210- key : ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
211-
212- - name : Build
213- working-directory : build
214- run : |
215- cmake --build . -j $NUMBER_OF_PROCESSORS --config Release
216-
217- - name : Get bitcoind manifest
218- if : matrix.job-type == 'standard'
219- working-directory : build
220- run : |
221- mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -out:bitcoind.manifest
222- cat bitcoind.manifest
223- echo
224- mt.exe -nologo -inputresource:bin/Release/bitcoind.exe -validate_manifest
225-
226- - name : Run test suite
227- if : matrix.job-type == 'standard'
228- working-directory : build
229- env :
230- QT_PLUGIN_PATH : ' ${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
231- run : |
232- ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
233-
234- - name : Run functional tests
235- if : matrix.job-type == 'standard'
236- working-directory : build
237- env :
238- BITCOIND : ' ${{ github.workspace }}\build\bin\Release\bitcoind.exe'
239- BITCOINCLI : ' ${{ github.workspace }}\build\bin\Release\bitcoin-cli.exe'
240- BITCOINTX : ' ${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe'
241- BITCOINUTIL : ' ${{ github.workspace }}\build\bin\Release\bitcoin-util.exe'
242- BITCOINWALLET : ' ${{ github.workspace }}\build\bin\Release\bitcoin-wallet.exe'
243- TEST_RUNNER_EXTRA : ${{ github.event_name != 'pull_request' && '--extended' || '' }}
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}
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 "${RUNNER_TEMP}/qa-assets"
250- cd "${RUNNER_TEMP}/qa-assets"
251- echo "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\bin\Release\fuzz.exe'
259- run : |
260- py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
261-
262- windows-cross :
263- name : ' Linux->Windows cross, no tests'
37+ build :
26438 runs-on : ubuntu-latest
26539
26640 strategy :
26741 fail-fast : false
26842 matrix :
269- config : [default, llvm, gnu32, sanitize]
43+ config : [default, llvm, gnu32, sanitize, olddeps ]
27044
27145 name : build • ${{ matrix.config }}
27246
27347 steps :
274- - name : Checkout
275- uses : actions/checkout@v5
48+ - uses : actions/checkout@v5
27649
27750 - name : Install Nix
27851 uses : cachix/install-nix-action@v31 # 2025-05-27, from https://github.com/cachix/install-nix-action/tags
32598 with :
32699 name : x86_64-w64-mingw32-executables-${{ github.run_id }}
327100
328- - name : Run bitcoind .exe
329- run : ./bin/bitcoind .exe -version
101+ - name : Run BGLd .exe
102+ run : ./bin/BGLd .exe -version
330103
331104 - name : Find mt.exe tool
332105 shell : pwsh
@@ -335,25 +108,25 @@ jobs:
335108 $sdk_latest = (Get-ChildItem "$sdk_dir\bin" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object Name -Descending | Select-Object -First 1).Name
336109 "MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
337110
338- - name : Get bitcoind manifest
111+ - name : Get BGLd manifest
339112 shell : pwsh
340113 run : |
341- & $env:MT_EXE -nologo -inputresource:bin\bitcoind .exe -out:bitcoind .manifest
342- Get-Content bitcoind .manifest
343- & $env:MT_EXE -nologo -inputresource:bin\bitcoind .exe -validate_manifest
114+ & $env:MT_EXE -nologo -inputresource:bin\BGLd .exe -out:BGLd .manifest
115+ Get-Content BGLd .manifest
116+ & $env:MT_EXE -nologo -inputresource:bin\BGLd .exe -validate_manifest
344117
345118 - name : Run unit tests
346119 # Can't use ctest here like other jobs as we don't have a CMake build tree.
347120 run : |
348- ./bin/test_bitcoin .exe -l test_suite
121+ ./bin/test_BGL .exe -l test_suite
349122 ./src/secp256k1/bin/exhaustive_tests.exe
350123 ./src/secp256k1/bin/noverify_tests.exe
351124 ./src/secp256k1/bin/tests.exe
352125 ./src/univalue/object.exe
353126 ./src/univalue/unitester.exe
354127
355128 - name : Run benchmarks
356- run : ./bin/bench_bitcoin .exe -sanity-check
129+ run : ./bin/bench_BGL .exe -sanity-check
357130
358131 - name : Adjust paths in test/config.ini
359132 shell : pwsh
0 commit comments