diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a81b5e696..bbfdc8b23 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,17 +31,18 @@ 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" - link: "static" + link: "dynamic" cc: "clang-18" cxx: "clang++-18" flags: "" @@ -62,23 +52,24 @@ jobs: options: "--enable-isystem" - image: ubuntu-24.04 - config: "release" - link: "dynamic" - cc: "gcc-12" - cxx: "g++-12" - flags: "" - coverage: "" + config: "debug" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "--coverage -fprofile-update=atomic" + coverage: "lcov" boost: "--build-boost" secp256k1: "--build-secp256k1" 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,14 +249,26 @@ 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: "" + runs-on: ${{ matrix.image }} env: @@ -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 86ee27934..07c3cd2aa 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! diff --git a/include/bitcoin/database/primitives/arrayhead.hpp b/include/bitcoin/database/primitives/arrayhead.hpp index fc351e44e..e1f3b296b 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 fafd1bc63..dd04318fd 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); }