Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1b2b49f
build: add cmake build system alongside autotools
fanquake Aug 28, 2024
eb91067
build: fix CMake build failures against the Dash sources
PastaPastaPasta Jul 25, 2026
0270551
build: restore Dash-specific feature detection under CMake
PastaPastaPasta Jul 25, 2026
e725517
build: report the git description in CMake builds
PastaPastaPasta Jul 25, 2026
3460191
test: fix CMake test wiring
PastaPastaPasta Jul 25, 2026
c6a59ae
ci: keep the Autotools invocations working while CMake is optional
PastaPastaPasta Jul 25, 2026
b2dc9a7
doc: adapt the new MSVC build guide to Dash
PastaPastaPasta Jul 25, 2026
22a1812
build: suppress -Wdeprecated-literal-operator under Clang WERROR builds
PastaPastaPasta Jul 25, 2026
9b4a772
build: make a WERROR CMake build possible
PastaPastaPasta Jul 25, 2026
ebe2424
ci: add a linux64_cmake job that builds the full stack with CMake
PastaPastaPasta Jul 25, 2026
3b5bf6c
build: restore the Dash build outputs the CMake port dropped
PastaPastaPasta Jul 25, 2026
8a98197
build: drop the multiprocess IPC test block Dash cannot build
PastaPastaPasta Jul 25, 2026
c8961f6
doc: correct the CMake build documentation
PastaPastaPasta Jul 25, 2026
7d81202
build: give PACKAGE_TARNAME a single definition
PastaPastaPasta Jul 25, 2026
c52297d
ci: give linux64_cmake the depends artifact fallback and hardened che…
PastaPastaPasta Aug 1, 2026
e267f85
build: target the same Windows API level as Autotools
PastaPastaPasta Aug 1, 2026
3c80124
build: define DEBUG_CORE and Boost multi_index safe mode like Autotools
PastaPastaPasta Aug 1, 2026
b4d405c
build: install bitcoinconsensus.h where Autotools does
PastaPastaPasta Aug 1, 2026
c8bc1a0
build: keep the Doxyfile template usable by Autotools
PastaPastaPasta Aug 1, 2026
371c166
build: drop the broken Qt plugin staging for test_dash-qt
PastaPastaPasta Aug 1, 2026
eac1703
build: adapt CMake sources to current develop
PastaPastaPasta Aug 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/workflows/build-src-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build source (CMake)

on:
workflow_call:
inputs:
build-target:
description: "Target name as defined by inputs.sh"
required: true
type: string
container-path:
description: "Path to built container at registry"
required: true
type: string
depends-key:
description: "Key needed to access cached depends"
required: true
type: string
depends-host:
description: "Host triplet from depends build"
required: true
type: string
depends-dep-opts:
description: "DEP_OPTS used to build depends"
required: false
type: string
default: ""
depends-artifact:
description: "Artifact holding freshly built depends, used if the cache restore misses"
required: false
type: string
default: ""
runs-on:
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
required: true
type: string

# Builds the tree with CMake on top of the depends prefix produced for the
# Autotools jobs, which is what makes this a full-stack check: depends emits
# toolchain.cmake, CMake consumes it, and the unit tests run against the
# result, followed by a short functional smoke list. The full functional suite
# stays with the Autotools jobs, so this job does not bundle artifacts.
jobs:
build-src-cmake:
name: Build source (CMake)
runs-on: ${{ inputs.runs-on }}
container:
image: ${{ inputs.container-path }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
allow-unsafe-pr-checkout: true
persist-credentials: false
fetch-depth: 50
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Initial setup
run: |
git config --global --add safe.directory "$PWD"
shell: bash

- name: Restore depends cache
id: depends-cache
uses: actions/cache/restore@v5
with:
path: depends/built/${{ inputs.depends-host }}
key: ${{ inputs.depends-key }}

- name: Download built depends
# Same-run handoff from build-depends.yml: pull_request_target runs
# have read-only cache tokens (GitHub change, June 2026), so freshly
# built depends arrive as an artifact instead of a cache entry. Also
# covers trusted runs whose cache save was denied (save only warns).
if: steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ inputs.depends-artifact }}
path: depends/built/${{ inputs.depends-host }}

- name: Check built depends are present
if: steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact == ''
run: |
echo "::error::Depends cache restore missed and no built depends artifact was provided"
exit 1
shell: bash

- name: Rebuild depends prefix
run: |
# Use the HOST and DEP_OPTS from the depends build, not this build-target
# This ensures the build_id matches the cached packages, and it is what
# writes depends/${HOST}/toolchain.cmake.
make -j$(nproc) -C depends HOST="${{ inputs.depends-host }}" ${{ inputs.depends-dep-opts }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
shell: bash

- name: Restore ccache cache
uses: actions/cache/restore@v5
with:
path: |
/cache/ccache
key: ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }}
restore-keys: |
ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-

- name: Build source
run: |
CCACHE_MAXSIZE="600M"
CACHE_DIR="/cache"
mkdir /output
BASE_OUTDIR="/output"
BUILD_TARGET="${{ inputs.build-target }}"
source ./ci/dash/matrix.sh
./ci/dash/build_src_cmake.sh
ccache -X 9
ccache -c
du -hd0 "${BASE_OUTDIR}"
shell: bash

- name: Save ccache cache
if: |
github.event_name == 'push' &&
github.ref_name == github.event.repository.default_branch
uses: actions/cache/save@v5
with:
path: |
/cache/ccache
key: ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }}

- name: Run unit tests
run: |
BUILD_TARGET="${{ inputs.build-target }}"
source ./ci/dash/matrix.sh
./ci/dash/test_unittests_cmake.sh
shell: bash

- name: Run functional smoke tests
run: |
BUILD_TARGET="${{ inputs.build-target }}"
source ./ci/dash/matrix.sh
./ci/dash/test_integrationtests_cmake.sh
shell: bash
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
if: |
vars.SKIP_LINUX64 == '' ||
vars.SKIP_LINUX64_ASAN == '' ||
vars.SKIP_LINUX64_CMAKE == '' ||
vars.SKIP_LINUX64_FUZZ == '' ||
vars.SKIP_LINUX64_SQLITE == ''
with:
Expand Down Expand Up @@ -236,6 +237,20 @@ jobs:
depends-artifact: ${{ needs.depends-linux64.outputs.built-artifact }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

src-linux64_cmake:
name: linux64_cmake-build
uses: ./.github/workflows/build-src-cmake.yml
needs: [check-skip, container, depends-linux64]
if: ${{ vars.SKIP_LINUX64_CMAKE == '' }}
with:
build-target: linux64_cmake
container-path: ${{ needs.container.outputs.path }}
depends-key: ${{ needs.depends-linux64.outputs.key }}
depends-host: ${{ needs.depends-linux64.outputs.host }}
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
depends-artifact: ${{ needs.depends-linux64.outputs.built-artifact }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Export the dependency artifact before consuming it

When the dependency cache misses and the freshly built cache cannot be saved, this input is always empty: the called build-depends.yml declares only key, host, and dep-opts outputs and never uploads a built-depends artifact. The CMake workflow then reaches its “Check built depends are present” step with both a cache miss and an empty artifact name and exits, so cold-cache PR runs cannot use the fallback this change describes. Add the artifact upload/output to build-depends.yml or remove this unsupported handoff.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: Provide the depends artifact output before consuming it

This line passes needs.depends-linux64.outputs.built-artifact, but the exact-head .github/workflows/build-depends.yml declares only key, host, and dep-opts and contains no artifact upload. The expression therefore resolves to an empty value. When the cache restore misses, build-src-cmake.yml skips the download and deliberately exits with an error, so the new fallback never transfers the depends prefix produced earlier in the same run. Add the producer output and upload step in the same PR, or remove the consumer until that prerequisite is present.

source: ['codex']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in this update — Provide the depends artifact output before consuming it no longer present.

Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread.

runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

src-linux64_fuzz:
name: linux64_fuzz-build
uses: ./.github/workflows/build-src.yml
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
todo.txt
reset-files.bash

# Build subdirectories.
/*build*
!/build-aux
!/build_msvc

*.tar.gz

*.exe
Expand Down
Loading
Loading