Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 0 additions & 31 deletions .github/workflows/build-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,37 +196,6 @@ jobs:
/cache/ccache
key: ccache-${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'depends/packages/*') }}-${{ inputs.build-target }}-${{ github.sha }}

- name: Restore ctcache cache

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This change can't be tested on PR because this configs are taken from PR, not from branch.

tested on https://github.com/knst/dash/actions/runs/42003537663/job/127184142783

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

- name: Run linters
if: inputs.build-target == 'linux64_multiprocess'
env:
BUILD_TARGET: ${{ inputs.build-target }}
run: |
CACHE_DIR="/cache"
source ./ci/dash/matrix.sh
./ci/dash/lint-tidy.sh
shell: bash

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

- name: Run unit tests
env:
BUILD_TARGET: ${{ inputs.build-target }}
Expand Down
88 changes: 87 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,92 @@ jobs:
runs-on: ${{ needs.check-skip.outputs['runner-build'] }}
secrets: *remote-ccache-auth

lint-multiprocess:
name: linux64_multiprocess-lint
needs: [check-skip, container, depends-linux64_multiprocess, src-linux64_multiprocess]
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
container:
image: ${{ needs.container.outputs.path }} # zizmor: ignore[unpinned-images] built earlier in this run
options: --user root
env:
BUILD_TARGET: linux64_multiprocess
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: 1

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

- name: Download built depends
if: steps.depends-cache.outputs.cache-hit != 'true' && needs.depends-linux64_multiprocess.outputs.built-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ needs.depends-linux64_multiprocess.outputs.built-artifact }}
path: depends/built/${{ needs.depends-linux64_multiprocess.outputs.host }}

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

- name: Rebuild depends prefix
env:
DEPENDS_HOST: ${{ needs.depends-linux64_multiprocess.outputs.host }}
DEP_OPTS: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
run: |
eval "DEP_OPTS_ARGS=(${DEP_OPTS})"
make -j"$(nproc)" -C depends HOST="${DEPENDS_HOST}" "${DEP_OPTS_ARGS[@]}"
shell: bash

- name: Download build artifacts
uses: actions/download-artifact@v8
with:
name: ${{ needs.src-linux64_multiprocess.outputs.key }}

- name: Extract lint inputs
env:
BUNDLE_KEY: ${{ needs.src-linux64_multiprocess.outputs.key }}
run: |
git config --global --add safe.directory "$PWD"
./ci/dash/bundle-artifacts.sh extract
test -s "build-ci/dashcore-${BUILD_TARGET}/compile_commands.json"
shell: bash

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

- name: Run linters
run: |
CACHE_DIR="/cache"
source ./ci/dash/matrix.sh
./ci/dash/lint-tidy.sh
shell: bash

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

test-linux64:
name: linux64-test
uses: ./.github/workflows/test-src.yml
Expand Down Expand Up @@ -538,7 +624,7 @@ jobs:
name: Prune old ccache generations
# Each develop push saves a new ccache/ctcache entry per target; keep only
# the newest so the 10 GB repository cache stops evicting fresh ones.
needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_sqlite, src-linux64_tsan, src-mac, src-win64]
needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_sqlite, src-linux64_tsan, src-mac, src-win64, lint-multiprocess]
if: |
!cancelled() &&
github.event_name == 'push' &&
Expand Down
11 changes: 7 additions & 4 deletions ci/dash/bundle-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ if [ "${VERB}" = "create" ]; then
"*.o"
".deps"
".libs"
# Test binaries and generated sources that only the unit tests, run
# before bundling, need
# Test binaries that only the unit tests, run before bundling, need
"src/bench/bench_dash"
"src/qt/qrc_bitcoin.cpp"
"src/qt/qrc_dash_locale.cpp"
"src/qt/test/test_dash-qt"
"src/test/fuzz/fuzz"
"src/test/test_dash"
)
if [ "${BUILD_TARGET}" != "linux64_multiprocess" ]; then
EXCLUSIONS+=("src/qt/qrc_bitcoin.cpp" "src/qt/qrc_dash_locale.cpp")
else
# The lint job consumes the compilation database and generated sources.
test -s "build-ci/dashcore-${BUILD_TARGET}/compile_commands.json"
fi
EXCLUSIONS_ARG=""
for excl in "${EXCLUSIONS[@]}"
do
Expand Down
2 changes: 2 additions & 0 deletions src/llmq/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ CQuorum::CQuorum(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker,
assert(m_quorum_base_block_index != nullptr);
}

CQuorum::~CQuorum() = default;

bool CQuorum::SetVerificationVector(const std::vector<CBLSPublicKey>& quorumVecIn)
{
const auto quorumVecInSerialized = ::SerializeHash(quorumVecIn);
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class CQuorum
CQuorum(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker,
CFinalCommitmentPtr _qc, const CBlockIndex* _pQuorumBaseBlockIndex, const uint256& _minedBlockHash, Span<CDeterministicMNCPtr> _members);

~CQuorum() = default;
~CQuorum();

bool SetVerificationVector(const std::vector<CBLSPublicKey>& quorumVecIn) EXCLUSIVE_LOCKS_REQUIRED(!cs_vvec_shShare);
void SetVerificationVector(BLSVerificationVectorPtr vvec_in) EXCLUSIVE_LOCKS_REQUIRED(!cs_vvec_shShare)
Expand Down
Loading