From efa03004bcbcfdd491fc92c97c93ba9bb3d103ec Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Fri, 8 May 2026 12:44:10 -0700 Subject: [PATCH] Alter ci coverage, add expanded ci matrix for manual execution. --- .github/workflows/ci-expanded.yml | 1656 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- 2 files changed, 1657 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-expanded.yml diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml new file mode 100644 index 00000000..4ef84c68 --- /dev/null +++ b/.github/workflows/ci-expanded.yml @@ -0,0 +1,1656 @@ +############################################################################### +# Copyright (c) 2014-2026 libbitcoin-node developers (see COPYING). +# +# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY +# +############################################################################### + +name: Expanded Continuous Integration + +on: [ workflow_dispatch ] + +jobs: + + gnu: + strategy: + fail-fast: false + + matrix: + include: + - image: macos-latest + config: "debug" + link: "dynamic" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: macos-latest + config: "debug" + link: "static" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - 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" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + 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: "debug" + link: "static" + 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: "dynamic" + 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" + 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: "debug" + link: "dynamic" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + 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: "release" + link: "dynamic" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - 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: "--enable-isystem" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "--enable-isystem" + + runs-on: ${{ matrix.image }} + + env: + CC: '${{ matrix.cc }}' + CXX: '${{ matrix.cxx }}' + CFLAGS: '${{ matrix.flags }}' + CXXFLAGS: '${{ matrix.flags }}' + + steps: + - name: Get branch name + id: get-branch + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT + else + echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi + + - name: Checkout repository [libbitcoin-system] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-system' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-database' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-database + + - name: Checkout repository [libbitcoin-network] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-network' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-network + + - name: Checkout repository [libbitcoin-node] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-node' + repository: ${{ github.repository }} + + - name: Prepare toolchain [linux] + if: ${{ startsWith(matrix.image, 'ubuntu') }} + 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 + fi + + - name: Prepare toolchain [macos] + if: ${{ startsWith(matrix.image, 'macos') }} + shell: bash + run: | + brew install autoconf automake libtool ${{ matrix.package || '' }} + if [[ -n "${{ matrix.llvm }}" ]]; then + echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:${PATH}" >> $GITHUB_ENV + fi + + - name: Environmental Computation + shell: bash + run: | + if [[ "${{ matrix.link }}" == "dynamic" ]]; then + echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV + fi + + - name: Execute installation + shell: bash + working-directory: 'libbitcoin-node' + run: > + ./builds/gnu/install-gnu.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --prefix="${{ github.workspace }}/prefix" + --build-post-install-clean + --build-obj-dir="obj" + --build-obj-dir-relative + --build-config="${{ matrix.config }}" + --build-link="${{ matrix.link }}" + ${{ matrix.boost }} + ${{ matrix.secp256k1 }} + ${{ matrix.options }} + + - name: Coverage calculation + if: ${{ matrix.coverage == 'lcov' }} + shell: bash + working-directory: 'libbitcoin-node' + run: | + lcov --ignore-errors version,gcov,mismatch,mismatch --directory . --capture --output-file coverage.info + lcov --ignore-errors unused --remove coverage.info "${{ github.workspace }}/prefix/*" "${{ github.workspace }}/libbitcoin-node/examples/*" "${{ github.workspace }}/libbitcoin-node/test/*" --output-file coverage.info + + - name: Coveralls.io upload + if: ${{ matrix.coverage == 'lcov' }} + uses: coverallsapp/github-action@v2.3.6 + with: + format: lcov + files: "libbitcoin-node/coverage.info" + github-token: ${{ secrets.github_token }} + + - name: Test artifact collection + if: failure() + shell: bash + working-directory: ${{ github.workspace }} + run: | + if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors + fi + if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then + cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors + fi + if [[ -e "libbitcoin-system/obj/test.log" ]]; then + cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors + fi + if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors + fi + if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then + cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors + fi + if [[ -e "libbitcoin-database/obj/test.log" ]]; then + cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors + fi + if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors + fi + if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then + cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors + fi + if [[ -e "libbitcoin-network/obj/test.log" ]]; then + cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors + fi + if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors + fi + if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then + cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors + fi + if [[ -e "libbitcoin-node/obj/test.log" ]]; then + cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors + fi + + - name: Test artifact upload + if: failure() + uses: actions/upload-artifact@v7.0.1 + with: + name: testlogs + path: ${{ github.workspace }}/*.errors + retention-days: 1 + if-no-files-found: warn + + cmake: + strategy: + fail-fast: false + + matrix: + include: + - image: macos-latest + config: "debug" + link: "dynamic" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: macos-latest + config: "debug" + link: "static" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: macos-latest + config: "release" + link: "dynamic" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: macos-latest + config: "release" + link: "static" + cc: "clang" + cxx: "clang++" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "dynamic" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + 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-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + 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: "" + + - image: ubuntu-24.04 + config: "debug" + link: "static" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "dynamic" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + config: "release" + link: "static" + 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: + CC: '${{ matrix.cc }}' + CXX: '${{ matrix.cxx }}' + CFLAGS: '${{ matrix.flags }}' + CXXFLAGS: '${{ matrix.flags }}' + + steps: + - name: Get branch name + id: get-branch + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT + else + echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi + + - name: Checkout repository [libbitcoin-system] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-system' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-database' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-database + + - name: Checkout repository [libbitcoin-network] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-network' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-network + + - name: Checkout repository [libbitcoin-node] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-node' + repository: ${{ github.repository }} + + - name: Prepare toolchain [linux] + if: ${{ startsWith(matrix.image, 'ubuntu') }} + 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 + fi + + - name: Prepare toolchain [macos] + if: ${{ startsWith(matrix.image, 'macos') }} + shell: bash + run: | + brew install autoconf automake libtool ${{ matrix.package || '' }} + if [[ -n "${{ matrix.llvm }}" ]]; then + echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:${PATH}" >> $GITHUB_ENV + fi + + - name: Environmental Computation + shell: bash + run: | + if [[ "${{ matrix.link }}" == "dynamic" ]]; then + echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV + fi + + - name: Execute installation + shell: bash + working-directory: 'libbitcoin-node' + run: > + ./builds/cmake/install-cmake.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --prefix="${{ github.workspace }}/prefix" + --build-post-install-clean + --build-obj-dir="obj" + --build-obj-dir-relative + --build-config="${{ matrix.config }}" + --build-link="${{ matrix.link }}" + ${{ matrix.boost }} + ${{ matrix.secp256k1 }} + ${{ matrix.options }} + + - name: Coverage calculation + if: ${{ matrix.coverage == 'lcov' }} + shell: bash + working-directory: 'libbitcoin-node' + run: | + lcov --ignore-errors version,gcov,mismatch,mismatch --directory . --capture --output-file coverage.info + lcov --ignore-errors unused --remove coverage.info "${{ github.workspace }}/prefix/*" "${{ github.workspace }}/libbitcoin-node/examples/*" "${{ github.workspace }}/libbitcoin-node/test/*" --output-file coverage.info + + - name: Coveralls.io upload + if: ${{ matrix.coverage == 'lcov' }} + uses: coverallsapp/github-action@v2.3.6 + with: + format: lcov + files: "libbitcoin-node/coverage.info" + github-token: ${{ secrets.github_token }} + + - name: Test artifact collection + if: failure() + shell: bash + working-directory: ${{ github.workspace }} + run: | + if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors + fi + if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then + cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors + fi + if [[ -e "libbitcoin-system/obj/test.log" ]]; then + cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors + fi + if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors + fi + if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then + cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors + fi + if [[ -e "libbitcoin-database/obj/test.log" ]]; then + cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors + fi + if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors + fi + if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then + cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors + fi + if [[ -e "libbitcoin-network/obj/test.log" ]]; then + cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors + fi + if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors + fi + if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then + cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors + fi + if [[ -e "libbitcoin-node/obj/test.log" ]]; then + cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors + fi + + - name: Test artifact upload + if: failure() + uses: actions/upload-artifact@v7.0.1 + with: + name: testlogs + path: ${{ github.workspace }}/*.errors + retention-days: 1 + if-no-files-found: warn + + presets: + strategy: + fail-fast: false + + matrix: + include: + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-shared" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + cc: "clang-19" + cxx: "clang++-19" + flags: "" + coverage: "" + package: "clang-19 clang++-19" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-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: "clang-18" + cxx: "clang++-18" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - 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-debug-shared" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "gcc-12" + cxx: "g++-12" + 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: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + cc: "gcc-12" + cxx: "g++-12" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-shared" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + cc: "gcc-13" + cxx: "g++-13" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-shared" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + cc: "gcc-14" + cxx: "g++-14" + flags: "" + coverage: "" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-shared" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + cc: "gcc-15" + cxx: "g++-15" + flags: "" + coverage: "" + package: "g++-15 gcc-15" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-shared" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-debug-static" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-shared" + cc: "gcc-16" + cxx: "g++-16" + flags: "" + coverage: "" + package: "g++-16 gcc-16" + boost: "--build-boost" + secp256k1: "--build-secp256k1" + options: "" + + - image: ubuntu-24.04 + preset: "nix-gnu-release-static" + 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: + CC: '${{ matrix.cc }}' + CXX: '${{ matrix.cxx }}' + CFLAGS: '${{ matrix.flags }}' + CXXFLAGS: '${{ matrix.flags }}' + + steps: + - name: Get branch name + id: get-branch + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT + else + echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi + + - name: Checkout repository [libbitcoin-system] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-system' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-database' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-database + + - name: Checkout repository [libbitcoin-network] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-network' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-network + + - name: Checkout repository [libbitcoin-node] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-node' + repository: ${{ github.repository }} + + - name: Prepare toolchain [linux] + if: ${{ startsWith(matrix.image, 'ubuntu') }} + 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 + fi + + - name: Prepare toolchain [macos] + if: ${{ startsWith(matrix.image, 'macos') }} + shell: bash + run: | + brew install autoconf automake libtool ${{ matrix.package || '' }} + if [[ -n "${{ matrix.llvm }}" ]]; then + echo "PATH=/opt/homebrew/opt/${{ matrix.llvm }}/bin:${PATH}" >> $GITHUB_ENV + fi + + - name: Environmental Computation + shell: bash + run: | + if [[ "${{ matrix.preset }}" == *shared* ]]; then + echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV + fi + + - name: Execute installation + shell: bash + working-directory: 'libbitcoin-node' + run: > + ./builds/cmake/install-presets.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --build-preset="${{ matrix.preset }}" + ${{ matrix.boost }} + ${{ matrix.secp256k1 }} + ${{ matrix.options }} + + - name: Coverage calculation + if: ${{ matrix.coverage == 'lcov' }} + shell: bash + working-directory: 'libbitcoin-node' + run: | + lcov --ignore-errors version,gcov,mismatch,mismatch --directory . --capture --output-file coverage.info + lcov --ignore-errors unused --remove coverage.info "${{ github.workspace }}/prefix/*" "${{ github.workspace }}/libbitcoin-node/examples/*" "${{ github.workspace }}/libbitcoin-node/test/*" --output-file coverage.info + + - name: Coveralls.io upload + if: ${{ matrix.coverage == 'lcov' }} + uses: coverallsapp/github-action@v2.3.6 + with: + format: lcov + files: "libbitcoin-node/coverage.info" + github-token: ${{ secrets.github_token }} + + - name: Test artifact collection + if: failure() + shell: bash + working-directory: ${{ github.workspace }} + run: | + if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors + fi + if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then + cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors + fi + if [[ -e "libbitcoin-system/obj/test.log" ]]; then + cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors + fi + if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors + fi + if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then + cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors + fi + if [[ -e "libbitcoin-database/obj/test.log" ]]; then + cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors + fi + if [[ -e "libbitcoin-network/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-network/obj/Testing/Temporary/LastTest.log" libbitcoin-network-LastTest.errors + fi + if [[ -e "libbitcoin-network/obj/test-suite.log" ]]; then + cp "libbitcoin-network/obj/test-suite.log" libbitcoin-network-test-suite.errors + fi + if [[ -e "libbitcoin-network/obj/test.log" ]]; then + cp "libbitcoin-network/obj/test.log" libbitcoin-network-test.errors + fi + if [[ -e "libbitcoin-node/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-node/obj/Testing/Temporary/LastTest.log" libbitcoin-node-LastTest.errors + fi + if [[ -e "libbitcoin-node/obj/test-suite.log" ]]; then + cp "libbitcoin-node/obj/test-suite.log" libbitcoin-node-test-suite.errors + fi + if [[ -e "libbitcoin-node/obj/test.log" ]]; then + cp "libbitcoin-node/obj/test.log" libbitcoin-node-test.errors + fi + + - name: Test artifact upload + if: failure() + uses: actions/upload-artifact@v7.0.1 + with: + name: testlogs + path: ${{ github.workspace }}/*.errors + retention-days: 1 + if-no-files-found: warn + + msvc: + strategy: + fail-fast: false + + 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" + platform: "x64" + version: "vs2026" + tests: "*" + + runs-on: ${{ matrix.image }} + + steps: + - name: Get branch name + id: get-branch + shell: bash + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT + else + echo "branch=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi + + - name: Set msbuild path + uses: microsoft/setup-msbuild@v3 + with: + msbuild-architecture: x64 + + - name: Checkout repository [libbitcoin-system] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-system' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-database] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-database' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-database + + - name: Checkout repository [libbitcoin-network] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-network' + ref: ${{ steps.get-branch.outputs.branch_name }} + repository: ${{ github.repository_owner }}/libbitcoin-network + + - name: Checkout repository [libbitcoin-node] + uses: actions/checkout@v6 + with: + fetch-depth: 1 + path: 'libbitcoin-node' + repository: ${{ github.repository }} + + - name: Execute build + shell: cmd + working-directory: 'libbitcoin-node' + run: > + .\builds\msvc\build-msvc.cmd + --build-src-dir "${{ github.workspace }}" + --build-config ${{ matrix.configuration }} + --build-platform ${{ matrix.platform }} + --build-version ${{ matrix.version }} + --build-use-local-src + + - name: Execute tests + shell: powershell + working-directory: 'libbitcoin-node' + run: | + Write-Host "Locating test executables..." -ForegroundColor Yellow; + $BC_TEST_EXES = @(Get-ChildItem -Path "bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-node-test.exe" }); + If ($BC_TEST_EXES.Count -ne 1) { + Write-Host "Failure, invalid count of test executables." -ForegroundColor Red; + exit 1; + } + Write-Host "Found single test executable: " $BC_TEST_EXES.FullName -ForegroundColor Green; + $BC_TEST_SINGLETON = $BC_TEST_EXES.FullName; + Write-Host "Executing $BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS" -ForegroundColor Yellow; + try { + Invoke-Expression "$BC_TEST_SINGLETON --log_level=warning --run_test=${{ matrix.tests }} $env:BOOST_UNIT_TEST_OPTIONS" + } + catch { + $ERR = $_; + Write-Host "Test execution failure: " $ERR -ForegroundColor Red; + exit $ERR; + } + Write-Host "Test execution complete." -ForegroundColor Green; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e523c83..fc81e2c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -486,7 +486,7 @@ jobs: options: "" - image: ubuntu-24.04 - preset: "nix-gnu-release-static" + preset: "nix-gnu-debug-static" cc: "gcc-12" cxx: "g++-12" flags: ""