Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion depend/bitcoin/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trim_trailing_whitespace = true
[*.{h,cpp,rs,py,sh}]
indent_size = 4

# .cirrus.yml, etc.
# ci.yml, etc.
[*.yml]
indent_size = 2

Expand Down
1 change: 1 addition & 0 deletions depend/bitcoin/.gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/clientversion.cpp export-subst
src/CMakeLists.txt export-subst
1 change: 1 addition & 0 deletions depend/bitcoin/.github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ body:
* General bitcoin questions and/or support requests should use Bitcoin StackExchange at https://bitcoin.stackexchange.com.
* For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.
* If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running `memtest` and observe CPU temperature with a load-test tool such as `linpack` before creating an issue.
* If you use AI tools when opening this issue, please read the [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md).
----
- type: checkboxes
Expand Down
5 changes: 5 additions & 0 deletions depend/bitcoin/.github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Feature Request
description: Suggest an idea for this project.
labels: [Feature]
body:
- type: markdown
attributes:
value: |
If you use AI tools when opening this issue, please read the [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md).
- type: textarea
id: feature
attributes:
Expand Down
44 changes: 0 additions & 44 deletions depend/bitcoin/.github/ISSUE_TEMPLATE/good_first_issue.yml

This file was deleted.

5 changes: 5 additions & 0 deletions depend/bitcoin/.github/ISSUE_TEMPLATE/gui_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Issue or feature request related to the GUI
description: Any report, issue or feature request related to the GUI
labels: [GUI]
body:
- type: markdown
attributes:
value: |
If you use AI tools when opening this issue, please read the [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md).
- type: checkboxes
id: acknowledgement
attributes:
Expand Down
9 changes: 5 additions & 4 deletions depend/bitcoin/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!--
*** Please remove the following help text before submitting: ***
Pull requests without a rationale and clear improvement may be closed
immediately.
Pull requests may be closed immediately if they:
- do not have a rationale and clear improvement
- do not adhere to doc/AI_POLICY.md
GUI-related pull requests should be opened against
https://github.com/bitcoin-core/gui
first. See CONTRIBUTING.md
https://github.com/bitcoin-core/gui first.
See CONTRIBUTING.md
-->

<!--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
name: 'Restore Caches'
description: 'Restore ccache, depends sources, and built depends caches'
inputs:
provider:
description: 'The cache provider to use'
required: true
runs:
using: 'composite'
steps:
- name: Restore Ccache cache
id: ccache-cache
uses: cirruslabs/cache/restore@v5
uses: ./.github/actions/cache/restore/internal
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CONTAINER_NAME }}-
provider: ${{ inputs.provider }}

- name: Restore depends sources cache
id: depends-sources
uses: cirruslabs/cache/restore@v5
uses: ./.github/actions/cache/restore/internal
with:
path: ${{ env.SOURCES_PATH }}
key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
restore-keys: |
depends-sources-${{ env.CONTAINER_NAME }}-
provider: ${{ inputs.provider }}

- name: Restore built depends cache
id: depends-built
uses: cirruslabs/cache/restore@v5
uses: ./.github/actions/cache/restore/internal
with:
path: ${{ env.BASE_CACHE }}
key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
restore-keys: |
depends-built-${{ env.CONTAINER_NAME }}-
provider: ${{ inputs.provider }}

- name: Restore previous releases cache
id: previous-releases
uses: cirruslabs/cache/restore@v5
uses: ./.github/actions/cache/restore/internal
with:
path: ${{ env.PREVIOUS_RELEASES_DIR }}
key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
restore-keys: |
previous-releases-${{ env.CONTAINER_NAME }}-
provider: ${{ inputs.provider }}

- name: export cache hits
shell: bash
Expand Down
43 changes: 43 additions & 0 deletions depend/bitcoin/.github/actions/cache/restore/internal/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Cache Restore'
description: 'Restore a cache with WarpBuild on Warp runners and GitHub Actions cache otherwise'
inputs:
path:
description: 'A list of files, directories, and wildcard patterns to restore'
required: true
key:
description: 'An explicit key for restoring the cache'
required: true
restore-keys:
description: 'An ordered multiline string listing prefix-matched restore keys'
required: false
default: ''
provider:
description: 'The cache provider to use'
required: true
outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
value: ${{ steps.warp.outputs.cache-hit || steps.gha.outputs.cache-hit }}
cache-primary-key:
description: 'The primary key used to restore the cache'
value: ${{ steps.warp.outputs.cache-primary-key || steps.gha.outputs.cache-primary-key }}
runs:
using: 'composite'
steps:
- name: Restore cache with WarpBuild
id: warp
if: ${{ inputs.provider == 'warp' }}
uses: WarpBuilds/cache/restore@v1
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}

- name: Restore cache with GitHub Actions
id: gha
if: ${{ inputs.provider == 'gha' }}
uses: actions/cache/restore@v5
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: 'Save Caches'
description: 'Save ccache, depends sources, and built depends caches'
inputs:
provider:
description: 'The cache provider to use'
required: true
runs:
using: 'composite'
steps:
Expand All @@ -11,29 +15,33 @@ runs:
echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}"

- name: Save Ccache cache
uses: cirruslabs/cache/save@v5
uses: ./.github/actions/cache/save/internal
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }}
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
provider: ${{ inputs.provider }}

- name: Save depends sources cache
uses: cirruslabs/cache/save@v5
uses: ./.github/actions/cache/save/internal
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }}
with:
path: ${{ env.SOURCES_PATH }}
key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
provider: ${{ inputs.provider }}

- name: Save built depends cache
uses: cirruslabs/cache/save@v5
uses: ./.github/actions/cache/save/internal
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}}
with:
path: ${{ env.BASE_CACHE }}
key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
provider: ${{ inputs.provider }}

- name: Save previous releases cache
uses: cirruslabs/cache/save@v5
uses: ./.github/actions/cache/save/internal
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}}
with:
path: ${{ env.PREVIOUS_RELEASES_DIR }}
key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
provider: ${{ inputs.provider }}
28 changes: 28 additions & 0 deletions depend/bitcoin/.github/actions/cache/save/internal/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Cache Save'
description: 'Save a cache with WarpBuild on Warp runners and GitHub Actions cache otherwise'
inputs:
path:
description: 'A list of files, directories, and wildcard patterns to cache'
required: true
key:
description: 'An explicit key for saving the cache'
required: true
provider:
description: 'The cache provider to use'
required: true
runs:
using: 'composite'
steps:
- name: Save cache with WarpBuild
if: ${{ inputs.provider == 'warp' }}
uses: WarpBuilds/cache/save@v1
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}

- name: Save cache with GitHub Actions
if: ${{ inputs.provider == 'gha' }}
uses: actions/cache/save@v5
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
49 changes: 21 additions & 28 deletions depend/bitcoin/.github/actions/configure-docker/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: 'Configure Docker'
description: 'Set up Docker build driver and configure build cache args'
inputs:
cache-provider:
description: 'gha or cirrus cache provider'
required: true
provider:
description: 'The cache provider to use'
required: false
default: 'gha'
runs:
using: 'composite'
steps:
- name: Check inputs
shell: python
run: |
# We expect only gha or cirrus as inputs to cache-provider
if "${{ inputs.cache-provider }}" not in ("gha", "cirrus"):
print("::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}")

- name: Set up Docker Buildx
- name: Set up Docker Buildx for Warp cache
if: ${{ inputs.provider == 'warp' }}
uses: docker/setup-buildx-action@v4
with:
# Use host network to allow access to cirrus gha cache running on the host
driver-opts: |
network=host

# This is required to allow buildkit to access the actions cache
- name: Set up Docker Buildx
if: ${{ inputs.provider != 'warp' }}
uses: docker/setup-buildx-action@v4

# This is required when using the gha cache backend with a manual docker buildx invocation.
# Docker will check for variables $ACTIONS_CACHE_URL, $ACTIONS_RESULTS_URL and $ACTIONS_RUNTIME_TOKEN
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
- name: Expose actions cache variables
uses: actions/github-script@v8
with:
Expand All @@ -36,25 +36,18 @@ runs:
- name: Construct docker build cache args
shell: bash
run: |
# Configure docker build cache backend
#
# On forks the gha cache will work but will use Github's cache backend.
# Docker will check for variables $ACTIONS_CACHE_URL, $ACTIONS_RESULTS_URL and $ACTIONS_RUNTIME_TOKEN
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis

# Use cirrus cache host
if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
else
url_args=""
cache_options="scope=${CONTAINER_NAME}"
if [[ "${{ inputs.provider }}" == "warp" ]]; then
cache_options="url=http://127.0.0.1:49160/,version=1,${cache_options}"
fi

# Configure docker build cache backend
# Always optimistically --cache‑from in case a cache blob exists
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
args=(--cache-from "type=gha,${cache_options}")

# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
# Only add --cache-to when pushing to the default branch.
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
args+=(--cache-to "type=gha,mode=max,ignore-error=true,${cache_options}")
fi

# Always `--load` into docker images (needed when using the `docker-container` build driver).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ runs:
shell: bash
run: |
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV"
echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV"
# Space and non-ASCII symbols mimic BASE_SCRATCH_DIR in ci/test/00_setup_env.sh,
# to test word-splitting and UTF-8 path handling on CI.
echo "BASE_BUILD_DIR=${{ runner.temp }}/build_ ₿🧪_" >> "$GITHUB_ENV"
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> $GITHUB_ENV
echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV"
echo "BASE_CACHE=${{ runner.temp }}/depends/built" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions depend/bitcoin/.github/ci-test-each-commit-exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def main():
"-DCMAKE_BUILD_TYPE=Debug",
"-DCMAKE_COMPILE_WARNING_AS_ERROR=ON",
"--preset=dev-mode",
# Tolerate unused member functions in intermediate commits in a pull request
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
# Tolerate unused (member) functions in intermediate commits in a pull request
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function -Wno-error=unused-function",
])

if run(["cmake", "--build", build_dir, "-j", str(num_procs)], check=False).returncode != 0:
Expand Down
Loading
Loading