From 875e3927554ef5dfd09ca313a80d94e9d94395cc Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Wed, 6 May 2026 11:00:36 -0700 Subject: [PATCH 1/3] Regenerate with CI matrix changes. --- .github/workflows/ci.yml | 128 ++++++++++++++++--------------------- builds/msvc/build-msvc.cmd | 36 +++++------ 2 files changed, 73 insertions(+), 91 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a81b5e69..2984c8bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,17 +17,6 @@ jobs: matrix: include: - - image: macos-latest - config: "release" - link: "dynamic" - cc: "clang" - cxx: "clang++" - flags: "" - coverage: "" - boost: "--build-boost" - secp256k1: "--build-secp256k1" - options: "--enable-isystem" - - image: macos-latest config: "release" link: "static" @@ -42,21 +31,22 @@ jobs: - image: ubuntu-24.04 config: "debug" link: "dynamic" - cc: "clang-18" - cxx: "clang++-18" + cc: "clang-19" + cxx: "clang++-19" flags: "" coverage: "" + package: "clang-19 clang++-19" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "--enable-isystem" - image: ubuntu-24.04 - config: "release" + config: "debug" link: "static" cc: "clang-18" cxx: "clang++-18" - flags: "" - coverage: "" + flags: "--coverage -fprofile-update=atomic" + coverage: "lcov" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "--enable-isystem" @@ -64,8 +54,8 @@ jobs: - image: ubuntu-24.04 config: "release" link: "dynamic" - cc: "gcc-12" - cxx: "g++-12" + cc: "gcc-13" + cxx: "g++-13" flags: "" coverage: "" boost: "--build-boost" @@ -73,12 +63,13 @@ jobs: options: "--enable-isystem" - image: ubuntu-24.04 - config: "debug" + config: "release" link: "static" - cc: "gcc" - cxx: "g++" - flags: "--coverage -fprofile-update=atomic" - coverage: "lcov" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "--enable-isystem" @@ -121,6 +112,13 @@ jobs: shell: bash run: | sudo apt-get update + if [[ "${{ matrix.package }}" == *"g++-15"* ]] || + [[ "${{ matrix.package }}" == *"gcc-15"* ]] || + [[ "${{ matrix.package }}" == *"g++-16"* ]] || + [[ "${{ matrix.package }}" == *"gcc-16"* ]]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update + fi sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.package || '' }} if [[ "${{ matrix.coverage }}" == "lcov" ]]; then sudo apt-get install lcov @@ -215,32 +213,10 @@ jobs: matrix: include: - image: macos-latest - config: "release" + config: "debug" link: "dynamic" cc: "clang" cxx: "clang++" - flags: "-DNDEBUG" - coverage: "" - boost: "--build-boost" - secp256k1: "--build-secp256k1" - options: "--verbose" - - - image: macos-latest - config: "release" - link: "static" - cc: "clang" - cxx: "clang++" - flags: "" - coverage: "" - boost: "--build-boost" - secp256k1: "--build-secp256k1" - options: "--verbose" - - - image: ubuntu-24.04 - config: "debug" - link: "dynamic" - cc: "clang-18" - cxx: "clang++-18" flags: "" coverage: "" boost: "--build-boost" @@ -250,10 +226,11 @@ jobs: - image: ubuntu-24.04 config: "release" link: "static" - cc: "clang-18" - cxx: "clang++-18" + cc: "clang-19" + cxx: "clang++-19" flags: "" coverage: "" + package: "clang-19 clang++-19" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "" @@ -272,10 +249,22 @@ jobs: - image: ubuntu-24.04 config: "debug" link: "static" - cc: "gcc" - cxx: "g++" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-16" + cxx: "g++-16" flags: "" coverage: "" + package: "g++-16 gcc-16" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "" @@ -318,6 +307,13 @@ jobs: shell: bash run: | sudo apt-get update + if [[ "${{ matrix.package }}" == *"g++-15"* ]] || + [[ "${{ matrix.package }}" == *"gcc-15"* ]] || + [[ "${{ matrix.package }}" == *"g++-16"* ]] || + [[ "${{ matrix.package }}" == *"gcc-16"* ]]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update + fi sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.package || '' }} if [[ "${{ matrix.coverage }}" == "lcov" ]]; then sudo apt-get install lcov @@ -412,7 +408,7 @@ jobs: matrix: include: - image: ubuntu-24.04 - preset: "nix-gnu-debug-shared" + preset: "nix-gnu-release-shared" cc: "clang-18" cxx: "clang++-18" flags: "" @@ -423,16 +419,6 @@ jobs: - image: ubuntu-24.04 preset: "nix-gnu-release-static" - cc: "clang-18" - cxx: "clang++-18" - flags: "" - coverage: "" - boost: "--build-boost" - secp256k1: "--build-secp256k1" - options: "" - - - image: ubuntu-24.04 - preset: "nix-gnu-release-shared" cc: "gcc-12" cxx: "g++-12" flags: "" @@ -479,6 +465,13 @@ jobs: shell: bash run: | sudo apt-get update + if [[ "${{ matrix.package }}" == *"g++-15"* ]] || + [[ "${{ matrix.package }}" == *"gcc-15"* ]] || + [[ "${{ matrix.package }}" == *"g++-16"* ]] || + [[ "${{ matrix.package }}" == *"gcc-16"* ]]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update + fi sudo apt-get install git build-essential autoconf automake libtool pkg-config ${{ matrix.package || '' }} if [[ "${{ matrix.coverage }}" == "lcov" ]]; then sudo apt-get install lcov @@ -567,25 +560,14 @@ jobs: matrix: include: - - image: windows-latest - configuration: "StaticRelease" - platform: "x64" - version: "vs2022" - tests: "*" - - image: windows-latest configuration: "StaticDebug" platform: "x64" version: "vs2022" tests: "*" - - image: windows-2025-vs2026 - configuration: "StaticRelease" - platform: "x64" - version: "vs2026" - tests: "*" - image: windows-2025-vs2026 - configuration: "StaticDebug" + configuration: "StaticRelease" platform: "x64" version: "vs2026" tests: "*" diff --git a/builds/msvc/build-msvc.cmd b/builds/msvc/build-msvc.cmd index 86ee2793..07c3cd2a 100644 --- a/builds/msvc/build-msvc.cmd +++ b/builds/msvc/build-msvc.cmd @@ -472,8 +472,8 @@ if "!libbitcoin_database_TAG!" == "" ( if "!CD_MODE!" == "-f" ( call :msg_warn "Reinitializing '%CD_DIRECTORY%'..." rmdir /S /Q "!CD_DIRECTORY!" - if %ERRORLEVEL% neq 0 ( - exit /b %ERRORLEVEL% + if !ERRORLEVEL! neq 0 ( + exit /b !ERRORLEVEL! ) mkdir "!CD_DIRECTORY!" @@ -483,40 +483,40 @@ if "!libbitcoin_database_TAG!" == "" ( ) else ( call :msg "Initializing '!CD_DIRECTORY!'..." ) - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :create_directory_force call :create_directory "%~1" -f - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :pop_directory call :msg_verbose "*** move pre: '!CD!'" popd - if %ERRORLEVEL% neq 0 ( - exit /b %ERRORLEVEL% + if !ERRORLEVEL! neq 0 ( + exit /b !ERRORLEVEL! ) call :msg_verbose "*** move post: '!CD!'" - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :push_directory call :msg_verbose "*** move pre: '!CD!'" pushd %1 - if %ERRORLEVEL% neq 0 ( - exit /b %ERRORLEVEL% + if !ERRORLEVEL! neq 0 ( + exit /b !ERRORLEVEL! ) call :msg_verbose "*** move post: '!CD!'" - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :remove_directory_force call :msg_verbose "*** removing: '%~1'" rmdir /S /Q "%~1" - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_heading call :msg "***************************************************************************" call :msg "%~1" call :msg "***************************************************************************" - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg if "%~1" == "" ( @@ -524,26 +524,26 @@ if "!libbitcoin_database_TAG!" == "" ( ) else ( echo %~1 ) - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_empty echo. - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_verbose if "!DISPLAY_VERBOSE!" == "yes" ( echo %~1 ) - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_success echo %~1 - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_warn echo %~1 - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! :msg_error echo %~1 - exit /b %ERRORLEVEL% + exit /b !ERRORLEVEL! From ccd7378d0fcb444c6d534768d00db9c7cf57bcca Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Wed, 6 May 2026 12:48:15 -0700 Subject: [PATCH 2/3] Move lcov test to gcc-13 to match tooling. --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2984c8bf..bbfdc8b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,23 +41,23 @@ jobs: options: "--enable-isystem" - image: ubuntu-24.04 - config: "debug" - link: "static" + config: "release" + link: "dynamic" cc: "clang-18" cxx: "clang++-18" - flags: "--coverage -fprofile-update=atomic" - coverage: "lcov" + flags: "" + coverage: "" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "--enable-isystem" - image: ubuntu-24.04 - config: "release" - link: "dynamic" + config: "debug" + link: "static" cc: "gcc-13" cxx: "g++-13" - flags: "" - coverage: "" + flags: "--coverage -fprofile-update=atomic" + coverage: "lcov" boost: "--build-boost" secp256k1: "--build-secp256k1" options: "--enable-isystem" From c67eef8bc0e6a798294aab9e676cef67d232eb9e Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Wed, 6 May 2026 21:03:18 -0700 Subject: [PATCH 3/3] Explicitly declare type to avoid compiler type confusion. --- include/bitcoin/database/primitives/arrayhead.hpp | 2 +- include/bitcoin/database/primitives/hashhead.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bitcoin/database/primitives/arrayhead.hpp b/include/bitcoin/database/primitives/arrayhead.hpp index fc351e44..e1f3b296 100644 --- a/include/bitcoin/database/primitives/arrayhead.hpp +++ b/include/bitcoin/database/primitives/arrayhead.hpp @@ -95,7 +95,7 @@ class arrayhead { using namespace system; BC_ASSERT(!is_multiply_overflow(index, bucket_size)); - BC_ASSERT(!is_add_overflow(bucket_size, index * bucket_size)); + BC_ASSERT(!is_add_overflow(bucket_size, index * bucket_size)); return possible_narrow_cast(add1(index) * bucket_size); } diff --git a/include/bitcoin/database/primitives/hashhead.hpp b/include/bitcoin/database/primitives/hashhead.hpp index fafd1bc6..dd04318f 100644 --- a/include/bitcoin/database/primitives/hashhead.hpp +++ b/include/bitcoin/database/primitives/hashhead.hpp @@ -130,7 +130,7 @@ class hashhead { using namespace system; BC_ASSERT(!is_multiply_overflow(index, cell_size)); - BC_ASSERT(!is_add_overflow(cell_size, index * cell_size)); + BC_ASSERT(!is_add_overflow(cell_size, index * cell_size)); return possible_narrow_cast(add1(index) * cell_size); }