Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
de58575
build: add cmake build system alongside autotools
fanquake Aug 28, 2024
54b4544
build: fix CMake build failures against the Dash sources
PastaPastaPasta Jul 25, 2026
78616a5
build: restore Dash-specific feature detection under CMake
PastaPastaPasta Jul 25, 2026
f1b571b
build: report the git description in CMake builds
PastaPastaPasta Jul 25, 2026
a71ad4d
test: fix CMake test wiring
PastaPastaPasta Jul 25, 2026
24cd0c9
ci: keep the Autotools invocations working while CMake is optional
PastaPastaPasta Jul 25, 2026
6fc6b1b
doc: adapt the new MSVC build guide to Dash
PastaPastaPasta Jul 25, 2026
d979aa1
build: suppress -Wdeprecated-literal-operator under Clang WERROR builds
PastaPastaPasta Jul 25, 2026
d494ec3
build: make a WERROR CMake build possible
PastaPastaPasta Jul 25, 2026
f746e96
ci: add a linux64_cmake job that builds the full stack with CMake
PastaPastaPasta Jul 25, 2026
1eb9354
build: restore the Dash build outputs the CMake port dropped
PastaPastaPasta Jul 25, 2026
24d2e75
build: drop the multiprocess IPC test block Dash cannot build
PastaPastaPasta Jul 25, 2026
72dd87a
doc: correct the CMake build documentation
PastaPastaPasta Jul 25, 2026
bcffd84
build: give PACKAGE_TARNAME a single definition
PastaPastaPasta Jul 25, 2026
50a91ba
ci: give linux64_cmake the depends artifact fallback and hardened che…
PastaPastaPasta Aug 1, 2026
ad269c4
build: target the same Windows API level as Autotools
PastaPastaPasta Aug 1, 2026
97c9536
build: define DEBUG_CORE and Boost multi_index safe mode like Autotools
PastaPastaPasta Aug 1, 2026
47a512a
build: install bitcoinconsensus.h where Autotools does
PastaPastaPasta Aug 1, 2026
d1cf740
build: keep the Doxyfile template usable by Autotools
PastaPastaPasta Aug 1, 2026
ef09a35
build: drop the broken Qt plugin staging for test_dash-qt
PastaPastaPasta Aug 1, 2026
de0b54a
build: adapt CMake sources to current develop
PastaPastaPasta Aug 9, 2026
994bf6b
test: restore omitted CMake test sources
PastaPastaPasta Aug 11, 2026
b6101a4
build: resync CMake source lists with develop
UdjinM6 Sep 1, 2026
5d02a2a
build: restore CMake parity with Autotools for stacktraces and libdas…
UdjinM6 Sep 1, 2026
62b20dd
build: pass the Dash environment names to util_test_runner
PastaPastaPasta Sep 2, 2026
0882c8f
build: bump the CMake CLIENT_VERSION_BUILD to match configure.ac
PastaPastaPasta Sep 2, 2026
cb3a474
build: leave libdashconsensus out of fuzz-only CMake builds
PastaPastaPasta Sep 2, 2026
04dfd03
build: name the Android CMake system variable like the other hosts
PastaPastaPasta Sep 2, 2026
3d6fcb1
doc: derive VCPKG_ROOT from the Visual Studio installation
PastaPastaPasta Sep 2, 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