From b5d03f820a43be18d9ca3bcc87fb4d9fc5340f74 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:45:04 -0400 Subject: [PATCH 01/37] feat(ci): standardize BSD tests with matrix strategy --- .github/workflows/validation.yaml | 138 ++++++++---------------------- 1 file changed, 37 insertions(+), 101 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 0a9b817a4..cb0c1cc24 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -196,7 +196,7 @@ jobs: exit 1 fi - run-nodebuilder-baremetal: + test-nodebuilder-baremetal: name: Test ${{ matrix.job-purpose }} on ${{ matrix.os-friendly-name }} needs: [changes, shell-lint, yaml-lint] if: >- @@ -275,8 +275,8 @@ jobs: if: steps.test-nodebuilder.outcome == 'failure' run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 - run-nodebuilder-freebsd: - name: Test source on FreeBSD + run-nodebuilder-bsd-vm: + name: Test source on ${{ matrix.friendly-name }} [${{ matrix-arch }}] needs: [changes, shell-lint, yaml-lint] if: >- ${{ @@ -288,126 +288,62 @@ jobs: needs.changes.outputs.test == 'true' }} runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 3 + matrix: + os: [freebsd, netbsd, openbsd] + arch: [x86_64, arm64] + include: + - os: freebsd + friendly-name: FreeBSD + test-script: './test/test-nodebuilder' + - os: netbsd + test-script: './nodebuilder' + - os: openbsd + test-script: './test/test-nodebuilder' steps: - uses: actions/checkout@v5 - name: Test the console output - uses: vmactions/freebsd-vm@v1 + uses: vmactions/${{ matrix.os }}-vm@v1 timeout-minutes: 180 with: + arch: ${{ matrix.arch }} prepare: | echo "${TERM:-TERM is not found}" - uname -a - cat /etc/os-release - nproc - sysctl -a | grep ' memory' | head -2 - df -h - commmand -v tput - tput colors date -u - run: | - sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + uname -a + [ -f /etc/os-release ] && cat /etc/os-release + if [ '${{ matrix.os }}' = 'openbsd' ]; then + sysctl -n hw.ncpu + sysctl -n hw.physmem64 + swapctl -l else - echo "test_nodebuilder exited with non-zero status" >&2 - echo "Running nodebuilder with xtrace enabled" >&2 - sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - exit 1 + nproc + sysctl -a | grep ' memory' | head -2 fi - - name: Save Bitcoin Core log as artifact - uses: actions/upload-artifact@v4 - with: - name: freebsd-source-bitcoin-debug.log - path: /home/runner/work/nodebuilder/nodebuilder/debug.log - - run-nodebuilder-netbsd: - name: Test source on NetBSD - needs: [changes, shell-lint, yaml-lint] - if: >- - ${{ - github.event.action == 'prerelease' || - github.event.action == 'published' || - needs.changes.outputs.ci == 'true' || - needs.changes.outputs.dependencies == 'true' || - needs.changes.outputs.shell == 'true' || - needs.changes.outputs.test == 'true' - }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Test the console output - uses: vmactions/netbsd-vm@v1 - timeout-minutes: 180 - with: - prepare: | - echo "${TERM:-TERM is not found}" - uname -a - sysctl -n hw.ncpu - sysctl -n hw.physmem64 - swapctl -l df -h - date -u + command -v tput > /dev/null 2>&1 && tput colors run: | - sh -c ./nodebuilder - if [ "$?" -eq 0 ]; then - [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . + if [ "${{ matrix.os }}" = 'netbsd' ]; then + sh -c ./nodebuilder else - echo "nodebuilder exited with non-zero status" >&2 - echo "Re-running nodebuilder with xtrace enabled" >&2 - sh -x ./nodebuilder - [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . - exit 1 + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" fi - - name: Save Bitcoin Core log as artifact - uses: actions/upload-artifact@v4 - with: - name: netbsd-source-bitcoin-debug.log - path: /home/runner/work/nodebuilder/nodebuilder/debug.log - - run-nodebuilder-openbsd: - name: Test source on OpenBSD - needs: [changes, shell-lint, yaml-lint] - if: >- - ${{ - github.event.action == 'prerelease' || - github.event.action == 'published' || - needs.changes.outputs.ci == 'true' || - needs.changes.outputs.dependencies == 'true' || - needs.changes.outputs.shell == 'true' || - needs.changes.outputs.test == 'true' - }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Test the console output - uses: vmactions/openbsd-vm@v1 - timeout-minutes: 180 - with: - prepare: | - echo "${TERM:-TERM is not found}" - uname -a - sysctl hw.ncpu - sysctl -a | grep 'hw.physmem\|hw.usermem' - df -h - commmand -v tput - tput colors - date -u - run: | - sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + if [ "$?" -eq 0 ]; then - [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else - echo "test_nodebuilder exited with non-zero status" >&2 - echo "Running nodebuilder with xtrace enabled" >&2 + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . exit 1 fi - name: Save Bitcoin Core log as artifact uses: actions/upload-artifact@v4 with: - name: openbsd-source-bitcoin-debug.log + name: ${{ matrix.os }}-source-bitcoin-debug.log path: /home/runner/work/nodebuilder/nodebuilder/debug.log run-nodebuilder-docker: From e01a4399f60038e8e2cf0857b53d774e1c2089c8 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:46:25 -0400 Subject: [PATCH 02/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index cb0c1cc24..9690488f9 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -276,7 +276,7 @@ jobs: run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 run-nodebuilder-bsd-vm: - name: Test source on ${{ matrix.friendly-name }} [${{ matrix-arch }}] + name: Test source on ${{ matrix.friendly-name }} [${{ matrix.arch }}] needs: [changes, shell-lint, yaml-lint] if: >- ${{ From 15002ed4954f2633ceddfae96c1df1186b4e9c8f Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:49:03 -0400 Subject: [PATCH 03/37] Update validation.yaml --- .github/workflows/validation.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 9690488f9..f6db69163 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -297,11 +297,10 @@ jobs: include: - os: freebsd friendly-name: FreeBSD - test-script: './test/test-nodebuilder' - os: netbsd - test-script: './nodebuilder' + friendly-name: NetBSD - os: openbsd - test-script: './test/test-nodebuilder' + friendly-name: OpenBSD steps: - uses: actions/checkout@v5 - name: Test the console output From 8425c01c2ad0a3765a386ec5ce7b6b3e411a95e5 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:50:52 -0400 Subject: [PATCH 04/37] Update validation.yaml --- .github/workflows/validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index f6db69163..e6c3eddeb 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -293,7 +293,7 @@ jobs: max-parallel: 3 matrix: os: [freebsd, netbsd, openbsd] - arch: [x86_64, arm64] + vm-arch: [x86_64, arm64] include: - os: freebsd friendly-name: FreeBSD @@ -307,7 +307,7 @@ jobs: uses: vmactions/${{ matrix.os }}-vm@v1 timeout-minutes: 180 with: - arch: ${{ matrix.arch }} + arch: ${{ matrix.vm-arch }} prepare: | echo "${TERM:-TERM is not found}" date -u From aaf0e67bbd8a14f1a77803110ab5049f3c6d1bad Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sun, 28 Sep 2025 15:53:32 -0400 Subject: [PATCH 05/37] Update validation.yaml --- .github/workflows/validation.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index e6c3eddeb..86a6ef641 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -296,15 +296,18 @@ jobs: vm-arch: [x86_64, arm64] include: - os: freebsd + vm-action: vmactions/freebsd-vm@v1 friendly-name: FreeBSD - os: netbsd + vm-action: vmactions/netbsd-vm@v1 friendly-name: NetBSD - os: openbsd + vm-action: vmactions/openbsd-vm@v1 friendly-name: OpenBSD steps: - uses: actions/checkout@v5 - name: Test the console output - uses: vmactions/${{ matrix.os }}-vm@v1 + uses: ${{ matrix.vm-action }} timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} From da3debeae2e3e45f8dec5d0d9731db8469af3357 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:19:20 -0400 Subject: [PATCH 06/37] use separate steps for each os --- .github/workflows/validation.yaml | 82 ++++++++++++++++++------------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 2f9c6c39b..202d674be 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -306,42 +306,54 @@ jobs: friendly-name: OpenBSD steps: - uses: actions/checkout@v5 - - name: Test the console output - uses: ${{ matrix.vm-action }} + - name: Test the FreeBSD console output + if: ${{ matrix.os == 'freebsd' }} + uses: vmactions/freebsd-vm@v1 timeout-minutes: 180 - with: - arch: ${{ matrix.vm-arch }} - prepare: | - echo "${TERM:-TERM is not found}" - date -u - uname -a - [ -f /etc/os-release ] && cat /etc/os-release - if [ '${{ matrix.os }}' = 'openbsd' ]; then - sysctl -n hw.ncpu - sysctl -n hw.physmem64 - swapctl -l - else - nproc - sysctl -a | grep ' memory' | head -2 - fi - df -h - command -v tput > /dev/null 2>&1 && tput colors - run: | - if [ "${{ matrix.os }}" = 'netbsd' ]; then - sh -c ./nodebuilder - else - sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - fi - - if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 - echo "Running nodebuilder with xtrace enabled" - sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - exit 1 - fi + run: | + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi + - name: Test the NetBSD console output + if: ${{ matrix.os == 'netbsd' }} + uses: vmactions/netbsd-vm@v1 + timeout-minutes: 180 + run: | + sh -c ./nodebuilder + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi + - name: Test the OpenBSD console output + if: ${{ matrix.os == 'openbsd' }} + uses: vmactions/openbsd-vm@v1 + timeout-minutes: 180 + run: | + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi - name: Save Bitcoin Core log as artifact uses: actions/upload-artifact@v4 with: From 80ae00e6355b9dc748a4407f077ab7cfc5221b43 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:24:06 -0400 Subject: [PATCH 07/37] fix syntax and add arch strategy --- .github/workflows/validation.yaml | 78 +++++++++++++++++-------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 202d674be..032d2d4cf 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -310,50 +310,56 @@ jobs: if: ${{ matrix.os == 'freebsd' }} uses: vmactions/freebsd-vm@v1 timeout-minutes: 180 - run: | - sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - - if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 - echo "Running nodebuilder with xtrace enabled" - sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - exit 1 - fi + with: + arch: ${{ matrix.vm-arch }} + run: | + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi - name: Test the NetBSD console output if: ${{ matrix.os == 'netbsd' }} uses: vmactions/netbsd-vm@v1 timeout-minutes: 180 - run: | - sh -c ./nodebuilder - - if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 - echo "Running nodebuilder with xtrace enabled" - sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - exit 1 - fi + with: + arch: ${{ matrix.vm-arch }} + run: | + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi - name: Test the OpenBSD console output if: ${{ matrix.os == 'openbsd' }} uses: vmactions/openbsd-vm@v1 timeout-minutes: 180 - run: | - sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - - if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 - echo "Running nodebuilder with xtrace enabled" - sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . - exit 1 - fi + with: + arch: ${{ matrix.vm-arch }} + run: | + sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" + + if [ "$?" -eq 0 ]; then + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + else + echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "Running nodebuilder with xtrace enabled" + sh -x ./nodebuilder + [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + exit 1 + fi - name: Save Bitcoin Core log as artifact uses: actions/upload-artifact@v4 with: From 174befce48d40a623e5f767e5c5796003d730402 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:26:08 -0400 Subject: [PATCH 08/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 032d2d4cf..cc03be943 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -276,7 +276,7 @@ jobs: run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 run-nodebuilder-bsd-vm: - name: Test source on ${{ matrix.friendly-name }} [${{ matrix.arch }}] + name: Test source on ${{ matrix.friendly-name }} [${{ matrix.vm-arch }}] needs: [changes, shell-lint, yaml-lint] if: >- ${{ From 9bdcdb42e1e401bb1b540fd20d41e6cc887240cb Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:27:16 -0400 Subject: [PATCH 09/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index cc03be943..221f56141 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -292,8 +292,8 @@ jobs: fail-fast: false max-parallel: 3 matrix: - os: [freebsd, netbsd, openbsd] vm-arch: [x86_64, arm64] + os: [freebsd, netbsd, openbsd] include: - os: freebsd vm-action: vmactions/freebsd-vm@v1 From efceab438954be3c5532b8fd7dbadddc74640ff9 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 12:57:26 -0400 Subject: [PATCH 10/37] Update validation.yaml --- .github/workflows/validation.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 221f56141..048ad8de1 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -276,7 +276,7 @@ jobs: run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 run-nodebuilder-bsd-vm: - name: Test source on ${{ matrix.friendly-name }} [${{ matrix.vm-arch }}] + name: Test source on ${{ matrix.friendly-name }} needs: [changes, shell-lint, yaml-lint] if: >- ${{ @@ -292,7 +292,7 @@ jobs: fail-fast: false max-parallel: 3 matrix: - vm-arch: [x86_64, arm64] + #vm-arch: [x86_64, arm64] os: [freebsd, netbsd, openbsd] include: - os: freebsd @@ -311,7 +311,7 @@ jobs: uses: vmactions/freebsd-vm@v1 timeout-minutes: 180 with: - arch: ${{ matrix.vm-arch }} + #arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" @@ -329,7 +329,7 @@ jobs: uses: vmactions/netbsd-vm@v1 timeout-minutes: 180 with: - arch: ${{ matrix.vm-arch }} + #arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" @@ -347,7 +347,7 @@ jobs: uses: vmactions/openbsd-vm@v1 timeout-minutes: 180 with: - arch: ${{ matrix.vm-arch }} + #arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" From 272a60ee78b15b6a4d45567dda7b9ded69f3c214 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:35:03 -0400 Subject: [PATCH 11/37] Update nodebuilder --- nodebuilder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodebuilder b/nodebuilder index 4a0685105..ea219b5db 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1798,9 +1798,8 @@ else current_bitcoin_version="${target_bitcoin_version}" fi -if - command -v bitcoin-qt > /dev/null 2>&1 && - ! is_running_in_ci +if command -v bitcoin-qt > /dev/null 2>&1 && + ! is_running_in_ci && ! is_running_in_container && { [ -n "${DISPLAY:-}" ] || [ "${TARGET_KERNEL}" = 'Darwin' ] @@ -1808,6 +1807,7 @@ if then LAUNCH_BITCOIN_CORE_COMMAND="bitcoin-qt --datadir=${BITCOIN_DATA_DIRECTORY}" elif command -v bitcoind > /dev/null 2>&1; then + echo "DEBUG ulimit -n is $(ulimit -n)" LAUNCH_BITCOIN_CORE_COMMAND="bitcoind --daemonwait --datadir=${BITCOIN_DATA_DIRECTORY}" else throw_error "Failed to install Bitcoin Core ${target_bitcoin_version}." From 0ba3822b4b9c4756498d66e9b5aa47943314625f Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:38:19 -0400 Subject: [PATCH 12/37] Update nodebuilder --- nodebuilder | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nodebuilder b/nodebuilder index ea219b5db..e3ae98ee0 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1801,13 +1801,11 @@ fi if command -v bitcoin-qt > /dev/null 2>&1 && ! is_running_in_ci && ! is_running_in_container && - { - [ -n "${DISPLAY:-}" ] || [ "${TARGET_KERNEL}" = 'Darwin' ] - } -then + { + [ -n "${DISPLAY:-}" ] || [ "${TARGET_KERNEL}" = 'Darwin' ] + }; then LAUNCH_BITCOIN_CORE_COMMAND="bitcoin-qt --datadir=${BITCOIN_DATA_DIRECTORY}" elif command -v bitcoind > /dev/null 2>&1; then - echo "DEBUG ulimit -n is $(ulimit -n)" LAUNCH_BITCOIN_CORE_COMMAND="bitcoind --daemonwait --datadir=${BITCOIN_DATA_DIRECTORY}" else throw_error "Failed to install Bitcoin Core ${target_bitcoin_version}." @@ -1932,6 +1930,7 @@ case "${TARGET_KERNEL}" in esac log_info 'Starting Bitcoin Core.' +echo "DEBUG ulimit -n is $(ulimit -n)" if is_running_in_ci || is_running_in_container || [ -z "${DISPLAY:-}" ] || From 4d26648cea75e1e9d96a220ee6beb3e1c7890550 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Mon, 6 Oct 2025 15:56:26 -0400 Subject: [PATCH 13/37] Update nodebuilder --- nodebuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/nodebuilder b/nodebuilder index e3ae98ee0..0bbad7d8f 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1930,6 +1930,7 @@ case "${TARGET_KERNEL}" in esac log_info 'Starting Bitcoin Core.' +# shellcheck disable=SC3045 echo "DEBUG ulimit -n is $(ulimit -n)" if is_running_in_ci || is_running_in_container || From 787bda30b8e40b43423823581a36310af176c9d9 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:48:05 -0400 Subject: [PATCH 14/37] if running in CI and NetBSD, reduce maxconnections --- nodebuilder | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodebuilder b/nodebuilder index 0bbad7d8f..fb7180181 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1932,6 +1932,8 @@ esac log_info 'Starting Bitcoin Core.' # shellcheck disable=SC3045 echo "DEBUG ulimit -n is $(ulimit -n)" +echo "DEBUG TARGET_KERNEL is "${TARGET_KERNEL}" +echo "DEBUG is_running_in_ci is $(is_running_in_ci)" if is_running_in_ci || is_running_in_container || [ -z "${DISPLAY:-}" ] || @@ -1939,6 +1941,8 @@ if is_running_in_ci || bitcoind --daemonwait --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null elif [ "${TARGET_KERNEL}" = 'Darwin' ]; then nohup bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & +elif is_running_in_ci && [ "TARGET_KERNEL}" = 'NetBSD' ]; then + setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" -maxconnections=96 > /dev/null 2>&1 < /dev/null & else setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & fi From 604b2c8aaffa39acd47a536f80eb39c40700971a Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:52:44 -0400 Subject: [PATCH 15/37] Update nodebuilder --- nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder b/nodebuilder index fb7180181..5c27dd3ff 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1932,7 +1932,7 @@ esac log_info 'Starting Bitcoin Core.' # shellcheck disable=SC3045 echo "DEBUG ulimit -n is $(ulimit -n)" -echo "DEBUG TARGET_KERNEL is "${TARGET_KERNEL}" +echo "DEBUG TARGET_KERNEL is ${TARGET_KERNEL}" echo "DEBUG is_running_in_ci is $(is_running_in_ci)" if is_running_in_ci || is_running_in_container || From c63977982aa82f000f34254cf7276abab3c17b24 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:54:06 -0400 Subject: [PATCH 16/37] Update nodebuilder --- nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder b/nodebuilder index 5c27dd3ff..29c1781a7 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1941,7 +1941,7 @@ if is_running_in_ci || bitcoind --daemonwait --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null elif [ "${TARGET_KERNEL}" = 'Darwin' ]; then nohup bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & -elif is_running_in_ci && [ "TARGET_KERNEL}" = 'NetBSD' ]; then +elif is_running_in_ci && [ "${TARGET_KERNEL}" = 'NetBSD' ]; then setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" -maxconnections=96 > /dev/null 2>&1 < /dev/null & else setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & From 3de0c89e1fd145afe8d4772a42d1b953975a387f Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:40:56 -0400 Subject: [PATCH 17/37] set arch --- .github/workflows/validation.yaml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 048ad8de1..5c5e7f86d 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -292,18 +292,12 @@ jobs: fail-fast: false max-parallel: 3 matrix: - #vm-arch: [x86_64, arm64] + vm-arch: [x86_64] os: [freebsd, netbsd, openbsd] include: - - os: freebsd - vm-action: vmactions/freebsd-vm@v1 - friendly-name: FreeBSD - - os: netbsd - vm-action: vmactions/netbsd-vm@v1 - friendly-name: NetBSD - - os: openbsd - vm-action: vmactions/openbsd-vm@v1 - friendly-name: OpenBSD + - { os: freebsd, os-friendly-name: FreeBSD } + - { os: netbsd, os-friendly-name: NetBSD } + - { os: openbsd, os-friendly-name: OpenBSD } steps: - uses: actions/checkout@v5 - name: Test the FreeBSD console output @@ -311,10 +305,9 @@ jobs: uses: vmactions/freebsd-vm@v1 timeout-minutes: 180 with: - #arch: ${{ matrix.vm-arch }} + arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else @@ -332,7 +325,6 @@ jobs: #arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else @@ -350,7 +342,6 @@ jobs: #arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" - if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else From 78ba37017aee315de612189dd0c8d8b2f55037e1 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:46:23 -0400 Subject: [PATCH 18/37] add back vm-arch --- .github/workflows/validation.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 5c5e7f86d..1c10eebc6 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -196,7 +196,7 @@ jobs: exit 1 fi - test-nodebuilder-baremetal: + run-nodebuilder-baremetal: name: Test ${{ matrix.job-purpose }} on ${{ matrix.os-friendly-name }} needs: [changes, shell-lint, yaml-lint] if: >- @@ -276,7 +276,7 @@ jobs: run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 run-nodebuilder-bsd-vm: - name: Test source on ${{ matrix.friendly-name }} + name: Test source on ${{ matrix.vm-os-friendly-name }} needs: [changes, shell-lint, yaml-lint] if: >- ${{ @@ -295,13 +295,13 @@ jobs: vm-arch: [x86_64] os: [freebsd, netbsd, openbsd] include: - - { os: freebsd, os-friendly-name: FreeBSD } - - { os: netbsd, os-friendly-name: NetBSD } - - { os: openbsd, os-friendly-name: OpenBSD } + - { vm-os: freebsd, vm-os-friendly-name: FreeBSD } + - { vm-os: netbsd, vm-os-friendly-name: NetBSD } + - { vm-os: openbsd, vm-os-friendly-name: OpenBSD } steps: - uses: actions/checkout@v5 - name: Test the FreeBSD console output - if: ${{ matrix.os == 'freebsd' }} + if: ${{ matrix.vm-os == 'freebsd' }} uses: vmactions/freebsd-vm@v1 timeout-minutes: 180 with: @@ -311,41 +311,41 @@ jobs: if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . exit 1 fi - name: Test the NetBSD console output - if: ${{ matrix.os == 'netbsd' }} + if: ${{ matrix.vm-os == 'netbsd' }} uses: vmactions/netbsd-vm@v1 timeout-minutes: 180 with: - #arch: ${{ matrix.vm-arch }} + arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . exit 1 fi - name: Test the OpenBSD console output - if: ${{ matrix.os == 'openbsd' }} + if: ${{ matrix.vm-os == 'openbsd' }} uses: vmactions/openbsd-vm@v1 timeout-minutes: 180 with: - #arch: ${{ matrix.vm-arch }} + arch: ${{ matrix.vm-arch }} run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else - echo "${{ matrix.os }} test failed with non-zero exit status." >&2 + echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . From 67c9f7e71fca920c83ab707f01dd2e1294794063 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:50:01 -0400 Subject: [PATCH 19/37] Update nodebuilder --- nodebuilder | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nodebuilder b/nodebuilder index 29c1781a7..ed87929d8 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1932,8 +1932,13 @@ esac log_info 'Starting Bitcoin Core.' # shellcheck disable=SC3045 echo "DEBUG ulimit -n is $(ulimit -n)" +echo "DEBUG CI is ${CI:-ciisemptyorunset}" echo "DEBUG TARGET_KERNEL is ${TARGET_KERNEL}" -echo "DEBUG is_running_in_ci is $(is_running_in_ci)" +if is_running_in_ci; then + echo "IS RUNNING IN A CI" +else + echo "IS NOT RUNNING IN A CI" +fi if is_running_in_ci || is_running_in_container || [ -z "${DISPLAY:-}" ] || From 6fe79f08a7bb65904f16a9063328c4b0b5b57a2d Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:51:55 -0400 Subject: [PATCH 20/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 1c10eebc6..dee35da9b 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -293,7 +293,7 @@ jobs: max-parallel: 3 matrix: vm-arch: [x86_64] - os: [freebsd, netbsd, openbsd] + vm-os: [freebsd, netbsd, openbsd] include: - { vm-os: freebsd, vm-os-friendly-name: FreeBSD } - { vm-os: netbsd, vm-os-friendly-name: NetBSD } From f1a354ee6514da47d4623797570c977012c76302 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:53:58 -0400 Subject: [PATCH 21/37] Update validation.yaml --- .github/workflows/validation.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index dee35da9b..5a5c6ef9d 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -306,6 +306,7 @@ jobs: timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} + envs: 'CI' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then @@ -323,6 +324,7 @@ jobs: timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} + envs: 'CI' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then @@ -340,6 +342,7 @@ jobs: timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} + envs: 'CI' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then From 4302ca41bc03aef37e2c814e50635708e06f6bde Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:55:07 -0400 Subject: [PATCH 22/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 5a5c6ef9d..824014eab 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -357,7 +357,7 @@ jobs: - name: Save Bitcoin Core log as artifact uses: actions/upload-artifact@v4 with: - name: ${{ matrix.os }}-source-bitcoin-debug.log + name: ${{ matrix.vm-os }}-source-bitcoin-debug.log path: /home/runner/work/nodebuilder/nodebuilder/debug.log run-nodebuilder-docker: From 87de93de0cdd07f3d61963c3b27a8192f4a39ff2 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:04:14 -0400 Subject: [PATCH 23/37] move the maxconnections setting to conf file --- nodebuilder | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/nodebuilder b/nodebuilder index ed87929d8..4b654ce69 100755 --- a/nodebuilder +++ b/nodebuilder @@ -1815,11 +1815,15 @@ readonly LAUNCH_BITCOIN_CORE_COMMAND [ "${TARGET_KERNEL}" != 'Darwin' ] && create_application_shortcuts # If bitcoin.conf doesn't already exist, use default settings -[ -d "${BITCOIN_DATA_DIRECTORY}"/ ] || mkdir "${BITCOIN_DATA_DIRECTORY}"/ if [ ! -f "${BITCOIN_CORE_CONFIG_FILE}" ]; then + [ -d "${BITCOIN_DATA_DIRECTORY}"/ ] || mkdir "${BITCOIN_DATA_DIRECTORY}"/ log_info 'Setting the default node behavior.' set_bitcoin_core_option 'datadir' "${BITCOIN_DATA_DIRECTORY}" - is_running_in_ci && set_bitcoin_core_option 'debug' 'net' + is_running_in_ci && + set_bitcoin_core_option 'debug' 'net' + is_running_in_ci && + [ "${TARGET_KERNEL}" = 'NetBSD' ] && + set_bitcoin_core_option 'maxconnections' '96' set_bitcoin_core_option 'mempoolfullrbf' '1' set_bitcoin_core_option 'server' '1' fi @@ -1930,15 +1934,6 @@ case "${TARGET_KERNEL}" in esac log_info 'Starting Bitcoin Core.' -# shellcheck disable=SC3045 -echo "DEBUG ulimit -n is $(ulimit -n)" -echo "DEBUG CI is ${CI:-ciisemptyorunset}" -echo "DEBUG TARGET_KERNEL is ${TARGET_KERNEL}" -if is_running_in_ci; then - echo "IS RUNNING IN A CI" -else - echo "IS NOT RUNNING IN A CI" -fi if is_running_in_ci || is_running_in_container || [ -z "${DISPLAY:-}" ] || @@ -1946,8 +1941,6 @@ if is_running_in_ci || bitcoind --daemonwait --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null elif [ "${TARGET_KERNEL}" = 'Darwin' ]; then nohup bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & -elif is_running_in_ci && [ "${TARGET_KERNEL}" = 'NetBSD' ]; then - setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" -maxconnections=96 > /dev/null 2>&1 < /dev/null & else setsid bitcoin-qt --datadir="${BITCOIN_DATA_DIRECTORY}" > /dev/null 2>&1 < /dev/null & fi From 544603a5bb420dc76a4892afb48e5ade81907319 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:55:30 -0400 Subject: [PATCH 24/37] fix issue with openbsd directory check --- nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder b/nodebuilder index b0b076c35..7dd5ac5b9 100755 --- a/nodebuilder +++ b/nodebuilder @@ -784,7 +784,7 @@ get_operating_system() # shellcheck disable=SC2317 handle_exit() { - if [ -n "${TEMP_DIRECTORY:-}" ] && [ -d "${TEMP_DIRECTORY}" ]; then + if [ -n "${TEMP_DIRECTORY:-}" ] && [ -d "${TEMP_DIRECTORY}"/ ]; then rm -rf -- "${TEMP_DIRECTORY:?}"/ fi } From 146c3aadff57f3027fa458df0c556e98fd3eb903 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:21:27 -0400 Subject: [PATCH 25/37] Update nodebuilder --- nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebuilder b/nodebuilder index 7dd5ac5b9..b0b076c35 100755 --- a/nodebuilder +++ b/nodebuilder @@ -784,7 +784,7 @@ get_operating_system() # shellcheck disable=SC2317 handle_exit() { - if [ -n "${TEMP_DIRECTORY:-}" ] && [ -d "${TEMP_DIRECTORY}"/ ]; then + if [ -n "${TEMP_DIRECTORY:-}" ] && [ -d "${TEMP_DIRECTORY}" ]; then rm -rf -- "${TEMP_DIRECTORY:?}"/ fi } From 42cea6f7732bdd315a45ce773a3404efa6c1d422 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:22:50 -0400 Subject: [PATCH 26/37] Update test_nodebuilder --- test/test_nodebuilder | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 8df6b7420..5c174bd37 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -363,3 +363,6 @@ if [ "${TARGET_KERNEL}" = 'Linux' ]; then fi printf '%s\n' 'PASS: All console output tests passed.' +echo 'DEBUG KILLING TAIL PROCESS AGAIN' +kill_tail_process +echo 'END OF SCRIPT' From 82b0466118c11d906c0cff07b22a680c6684b884 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:25:30 -0400 Subject: [PATCH 27/37] Update validation.yaml --- .github/workflows/validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index c43ab99ce..2497db56f 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -346,12 +346,12 @@ jobs: run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . exit 1 fi - name: Save Bitcoin Core log as artifact From 2125ba68fe88bb1bf2e375cd91d792d044a3f024 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:29:21 -0400 Subject: [PATCH 28/37] Update validation.yaml --- .github/workflows/validation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 2497db56f..6070fc223 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -328,12 +328,12 @@ jobs: run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . exit 1 fi - name: Test the OpenBSD console output @@ -357,7 +357,7 @@ jobs: - name: Save Bitcoin Core log as artifact uses: actions/upload-artifact@v4 with: - name: ${{ matrix.vm-os }}-source-bitcoin-debug.log + name: ${{ matrix.vm-os }}-${{ matrix.vm-arch }}-source-bitcoin-debug.log path: /home/runner/work/nodebuilder/nodebuilder/debug.log run-nodebuilder-docker: From dbbc8a67afba133f5286cae49b88ea844c406d09 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:37:45 -0400 Subject: [PATCH 29/37] Update validation.yaml --- .github/workflows/validation.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 6070fc223..15fa3693b 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -276,7 +276,7 @@ jobs: run: printf '%s\n' "Review the step 'Test the console output' above." && exit 1 run-nodebuilder-bsd-vm: - name: Test source on ${{ matrix.vm-os-friendly-name }} + name: Test source on ${{ matrix.vm-os-friendly-name }} [${{ matrix.vm-arch }}] needs: [changes, shell-lint, yaml-lint] if: >- ${{ @@ -310,6 +310,7 @@ jobs: run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then + echo "DEBUG HOME IS ${HOME}" [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 From 40865c33898e30a885a9a490319251c99805e759 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:38:57 -0400 Subject: [PATCH 30/37] Update validation.yaml --- .github/workflows/validation.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 15fa3693b..9b277b539 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -311,6 +311,7 @@ jobs: sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then echo "DEBUG HOME IS ${HOME}" + echo "DEBUG working directory IS $(pwd)" [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 From 2d2c555fdf1a3c3eec1e34a3cfd3ce990a64e1a9 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:45:05 -0400 Subject: [PATCH 31/37] use env for debug.log path --- .github/workflows/validation.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 9b277b539..798e488ac 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -303,57 +303,63 @@ jobs: - name: Test the FreeBSD console output if: ${{ matrix.vm-os == 'freebsd' }} uses: vmactions/freebsd-vm@v1 + env: + FREEBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} - envs: 'CI' + envs: 'CI FREEBSD_BITCOIN_LOG_PATH' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then echo "DEBUG HOME IS ${HOME}" echo "DEBUG working directory IS $(pwd)" - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "${FREEBSD_BITCOIN_LOG_PATH}" ] && cp "${FREEBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "${HOME}/.bitcoin/debug.log" ] && cp "${HOME}/.bitcoin/debug.log" . + [ -f "${FREEBSD_BITCOIN_LOG_PATH}" ] && cp "${FREEBSD_BITCOIN_LOG_PATH}" . exit 1 fi - name: Test the NetBSD console output if: ${{ matrix.vm-os == 'netbsd' }} uses: vmactions/netbsd-vm@v1 + env: + NETBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} - envs: 'CI' + envs: 'CI NETBSD_BITCOIN_LOG_PATH' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then - [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . + [ -f "${NETBSD_BITCOIN_LOG_PATH}" ] && cp "${NETBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "/root/.bitcoin/debug.log" ] && cp "/root/.bitcoin/debug.log" . + [ -f "${NETBSD_BITCOIN_LOG_PATH}" ] && cp "${NETBSD_BITCOIN_LOG_PATH}" . exit 1 fi - name: Test the OpenBSD console output if: ${{ matrix.vm-os == 'openbsd' }} uses: vmactions/openbsd-vm@v1 + env: + OPENBSD_BITCOIN_LOG_PATH: /home/bitcoin/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} - envs: 'CI' + envs: 'CI OPENBSD_BITCOIN_LOG_PATH' run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then - [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . + [ -f "${OPENBSD_BITCOIN_LOG_PATH}" ] && cp "${OPENBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 echo "Running nodebuilder with xtrace enabled" sh -x ./nodebuilder - [ -f "/home/bitcoin/.bitcoin/debug.log" ] && cp "/home/bitcoin/.bitcoin/debug.log" . + [ -f "${OPENBSD_BITCOIN_LOG_PATH}" ] && cp "${OPENBSD_BITCOIN_LOG_PATH}" . exit 1 fi - name: Save Bitcoin Core log as artifact From 865fdc44ab29b983bb9bd9a778e9e58d5dd6f183 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:23:26 -0400 Subject: [PATCH 32/37] move ends to job level not step level --- .github/workflows/validation.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 798e488ac..6d3c56eb9 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -288,6 +288,10 @@ jobs: needs.changes.outputs.test == 'true' }} runs-on: ubuntu-latest + env: + FREEBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log + NETBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log + OPENBSD_BITCOIN_LOG_PATH: /home/bitcoin/.bitcoin/debug.log strategy: fail-fast: false max-parallel: 3 @@ -303,17 +307,16 @@ jobs: - name: Test the FreeBSD console output if: ${{ matrix.vm-os == 'freebsd' }} uses: vmactions/freebsd-vm@v1 - env: - FREEBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} envs: 'CI FREEBSD_BITCOIN_LOG_PATH' + usesh: true run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then - echo "DEBUG HOME IS ${HOME}" - echo "DEBUG working directory IS $(pwd)" + echo "DEBUG HOME is ${HOME}" + echo "DEBUG working directory is $(pwd)" [ -f "${FREEBSD_BITCOIN_LOG_PATH}" ] && cp "${FREEBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 @@ -325,8 +328,6 @@ jobs: - name: Test the NetBSD console output if: ${{ matrix.vm-os == 'netbsd' }} uses: vmactions/netbsd-vm@v1 - env: - NETBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} @@ -334,6 +335,8 @@ jobs: run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then + echo "DEBUG HOME is ${HOME}" + echo "DEBUG working directory is $(pwd)" [ -f "${NETBSD_BITCOIN_LOG_PATH}" ] && cp "${NETBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 @@ -345,8 +348,6 @@ jobs: - name: Test the OpenBSD console output if: ${{ matrix.vm-os == 'openbsd' }} uses: vmactions/openbsd-vm@v1 - env: - OPENBSD_BITCOIN_LOG_PATH: /home/bitcoin/.bitcoin/debug.log timeout-minutes: 180 with: arch: ${{ matrix.vm-arch }} From 887ec09d78e72be9b94180ab7eeab8c57798f9e1 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:56:18 -0400 Subject: [PATCH 33/37] Update validation.yaml --- .github/workflows/validation.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 6d3c56eb9..f27499620 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -317,6 +317,12 @@ jobs: if [ "$?" -eq 0 ]; then echo "DEBUG HOME is ${HOME}" echo "DEBUG working directory is $(pwd)" + echo "DEBUG listing /root/.bitcoin/debug.log" + ls -l /root/.bitcoin/debug.log || true + echo "DEBUG listing /home/runner/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true + echo "DEBUG listing /home/bitcoin/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true [ -f "${FREEBSD_BITCOIN_LOG_PATH}" ] && cp "${FREEBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 @@ -332,11 +338,18 @@ jobs: with: arch: ${{ matrix.vm-arch }} envs: 'CI NETBSD_BITCOIN_LOG_PATH' + usesh: true run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then echo "DEBUG HOME is ${HOME}" echo "DEBUG working directory is $(pwd)" + echo "DEBUG listing /root/.bitcoin/debug.log" + ls -l /root/.bitcoin/debug.log || true + echo "DEBUG listing /home/runner/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true + echo "DEBUG listing /home/bitcoin/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true [ -f "${NETBSD_BITCOIN_LOG_PATH}" ] && cp "${NETBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 @@ -352,9 +365,18 @@ jobs: with: arch: ${{ matrix.vm-arch }} envs: 'CI OPENBSD_BITCOIN_LOG_PATH' + usesh: true run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then + echo "DEBUG HOME is ${HOME}" + echo "DEBUG working directory is $(pwd)" + echo "DEBUG listing /root/.bitcoin/debug.log" + ls -l /root/.bitcoin/debug.log || true + echo "DEBUG listing /home/runner/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true + echo "DEBUG listing /home/bitcoin/.bitcoin/debug.log" + ls -l /home/runner/.bitcoin/debug.log || true [ -f "${OPENBSD_BITCOIN_LOG_PATH}" ] && cp "${OPENBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2 From 893c778e7120fbbb72e72c04b4fd41f3b7629454 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 10 Oct 2025 18:18:50 -0400 Subject: [PATCH 34/37] Update validation.yaml --- .github/workflows/validation.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index f27499620..3f6e26c15 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -338,7 +338,6 @@ jobs: with: arch: ${{ matrix.vm-arch }} envs: 'CI NETBSD_BITCOIN_LOG_PATH' - usesh: true run: | sh -x ./test/test_nodebuilder --ref "${GITHUB_SHA}" if [ "$?" -eq 0 ]; then From 356a628679248d3d893ef5a17b0bc99015729132 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 10 Oct 2025 18:31:59 -0400 Subject: [PATCH 35/37] update freebsd log path --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index 3f6e26c15..e22765152 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -289,7 +289,7 @@ jobs: }} runs-on: ubuntu-latest env: - FREEBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log + FREEBSD_BITCOIN_LOG_PATH: /root/.bitcoin/debug.log NETBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log OPENBSD_BITCOIN_LOG_PATH: /home/bitcoin/.bitcoin/debug.log strategy: From 9476114cbaf4ff73c77c81bf075ca46b401126f8 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:08:37 -0400 Subject: [PATCH 36/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index e22765152..f4fdbd91e 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -290,7 +290,7 @@ jobs: runs-on: ubuntu-latest env: FREEBSD_BITCOIN_LOG_PATH: /root/.bitcoin/debug.log - NETBSD_BITCOIN_LOG_PATH: /home/runner/.bitcoin/debug.log + NETBSD_BITCOIN_LOG_PATH: /root/.bitcoin/debug.log OPENBSD_BITCOIN_LOG_PATH: /home/bitcoin/.bitcoin/debug.log strategy: fail-fast: false From 8a446dec000fb084e8fdcc906739147b32c5ff88 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:10:10 -0400 Subject: [PATCH 37/37] Update validation.yaml --- .github/workflows/validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml index f4fdbd91e..1cfbe6f70 100644 --- a/.github/workflows/validation.yaml +++ b/.github/workflows/validation.yaml @@ -375,7 +375,7 @@ jobs: echo "DEBUG listing /home/runner/.bitcoin/debug.log" ls -l /home/runner/.bitcoin/debug.log || true echo "DEBUG listing /home/bitcoin/.bitcoin/debug.log" - ls -l /home/runner/.bitcoin/debug.log || true + ls -l /home/bitcoin/.bitcoin/debug.log || true [ -f "${OPENBSD_BITCOIN_LOG_PATH}" ] && cp "${OPENBSD_BITCOIN_LOG_PATH}" . else echo "${{ matrix.vm-os }} test failed with non-zero exit status." >&2