Skip to content

Commit 3187193

Browse files
authored
Merge pull request TheCharlatan#67 from TheCharlatan/kernelApi_78
Kernel api 78
2 parents c2d18f6 + 307b8f0 commit 3187193

File tree

294 files changed

+6099
-2007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+6099
-2007
lines changed

libbitcoinkernel-sys/bitcoin/.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ body:
7878
id: os
7979
attributes:
8080
label: Operating system and version
81-
placeholder: e.g. "MacOS Ventura 13.2" or "Ubuntu 22.04 LTS"
81+
placeholder: e.g. "MacOS 26.0" or "Ubuntu 26.04 LTS"
8282
validations:
8383
required: true
8484
- type: textarea
@@ -90,4 +90,3 @@ body:
9090
e.g. OS/CPU and disk type, network connectivity
9191
validations:
9292
required: false
93-

libbitcoinkernel-sys/bitcoin/.github/actions/configure-docker/action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ runs:
2222
uses: actions/github-script@v6
2323
with:
2424
script: |
25-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
26-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
25+
Object.keys(process.env).forEach(function (key) {
26+
if (key.startsWith('ACTIONS_')) {
27+
core.info(`Exporting ${key}`);
28+
core.exportVariable(key, process.env[key]);
29+
}
30+
});
2731
2832
- name: Construct docker build cache args
2933
shell: bash
@@ -44,8 +48,8 @@ runs:
4448
# Always optimistically --cache‑from in case a cache blob exists
4549
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
4650
47-
# If this is a push to the default branch, also add --cache‑to to save the cache
48-
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
51+
# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
52+
if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
4953
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
5054
fi
5155

libbitcoinkernel-sys/bitcoin/.github/actions/configure-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
- name: Set cache hashes
1818
shell: bash
1919
run: |
20-
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
20+
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
2121
echo "PREVIOUS_RELEASES_HASH=$(git ls-tree HEAD test/get_previous_releases.py | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
2222
2323
- name: Get container name

libbitcoinkernel-sys/bitcoin/.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ jobs:
381381
- *CHECKOUT
382382

383383
- name: Download built executables
384-
uses: actions/download-artifact@v4
384+
uses: actions/download-artifact@v5
385385
with:
386386
name: x86_64-w64-mingw32-executables-${{ github.run_id }}
387387

@@ -433,8 +433,7 @@ jobs:
433433
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
434434
435435
- name: Get previous releases
436-
working-directory: test
437-
run: ./get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
436+
run: ./test/get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
438437

439438
- name: Run functional tests
440439
env:
@@ -472,12 +471,18 @@ jobs:
472471
timeout-minutes: 120
473472
file-env: './ci/test/00_setup_env_native_asan.sh'
474473

475-
- name: 'macOS-cross, gui, no tests'
474+
- name: 'macOS-cross to arm64'
476475
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
477476
fallback-runner: 'ubuntu-24.04'
478477
timeout-minutes: 120
479478
file-env: './ci/test/00_setup_env_mac_cross.sh'
480479

480+
- name: 'macOS-cross to x86_64'
481+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
482+
fallback-runner: 'ubuntu-24.04'
483+
timeout-minutes: 120
484+
file-env: './ci/test/00_setup_env_mac_cross_intel.sh'
485+
481486
- name: 'No wallet, libbitcoinkernel'
482487
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm'
483488
fallback-runner: 'ubuntu-24.04'
@@ -496,17 +501,23 @@ jobs:
496501
timeout-minutes: 240
497502
file-env: './ci/test/00_setup_env_native_fuzz.sh'
498503

504+
- name: 'Valgrind, fuzz'
505+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
506+
fallback-runner: 'ubuntu-24.04'
507+
timeout-minutes: 240
508+
file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh'
509+
499510
- name: 'previous releases, depends DEBUG'
500511
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
501512
fallback-runner: 'ubuntu-24.04'
502513
timeout-minutes: 120
503514
file-env: './ci/test/00_setup_env_native_previous_releases.sh'
504515

505-
- name: 'CentOS, depends, gui'
506-
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-lg'
516+
- name: 'Alpine (musl), depends, gui'
517+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
507518
fallback-runner: 'ubuntu-24.04'
508519
timeout-minutes: 120
509-
file-env: './ci/test/00_setup_env_native_centos.sh'
520+
file-env: './ci/test/00_setup_env_native_alpine_musl.sh'
510521

511522
- name: 'tidy'
512523
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'

libbitcoinkernel-sys/bitcoin/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
632632
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
633633
else()
634634
set(CMAKE_SKIP_BUILD_RPATH TRUE)
635-
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
636635
endif()
637636
add_subdirectory(test)
638637
add_subdirectory(doc)

libbitcoinkernel-sys/bitcoin/ci/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ requires `bash`, `docker`, and `python3` to be installed. To run on different ar
2020
sudo apt install bash docker.io python3 qemu-user-static
2121
```
2222

23+
For some sanitizer builds, the kernel's address-space layout randomization
24+
(ASLR) entropy can cause sanitizer shadow memory mappings to fail. When running
25+
the CI locally you may need to reduce that entropy by running:
26+
27+
```
28+
sudo sysctl -w vm.mmap_rnd_bits=28
29+
```
30+
2331
It is recommended to run the ci system in a clean env. To run the test stage
2432
with a specific configuration,
2533

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_mac_cross.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export LC_ALL=C.UTF-8
99
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
1010

1111
export CONTAINER_NAME=ci_macos_cross
12-
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
13-
export HOST=x86_64-apple-darwin
12+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
13+
export HOST=arm64-apple-darwin
1414
export PACKAGES="clang lld llvm zip"
1515
export XCODE_VERSION=15.0
1616
export XCODE_BUILD_ID=15A240d
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2019-present The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
10+
11+
export CONTAINER_NAME=ci_macos_cross_intel
12+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
13+
export HOST=x86_64-apple-darwin
14+
export PACKAGES="clang lld llvm zip"
15+
export XCODE_VERSION=15.0
16+
export XCODE_BUILD_ID=15A240d
17+
export RUN_UNIT_TESTS=false
18+
export RUN_FUNCTIONAL_TESTS=false
19+
export GOAL="deploy"
20+
export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON"

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_mac_native_fuzz.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME="ci_mac_native_fuzz" # macos does not use a container, but the env var is needed for logging
1010
export CMAKE_GENERATOR="Ninja"
11-
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
11+
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000' -DAPPEND_CPPFLAGS='-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG'"
1212
export CI_OS_NAME="macos"
1313
export NO_DEPENDS=1
1414
export OSX_SDK=""

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_native_centos.sh renamed to libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_native_alpine_musl.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export CONTAINER_NAME=ci_native_centos
10-
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
11-
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make ninja-build git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
12-
export PIP_PACKAGES="pyzmq pycapnp"
9+
export CONTAINER_NAME=ci_native_alpine_musl
10+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/alpine:3.22"
11+
export CI_BASE_PACKAGES="build-base musl-dev pkgconf curl ccache make ninja git python3 py3-pip which patch xz procps rsync util-linux bison e2fsprogs cmake dash linux-headers"
12+
export PIP_PACKAGES="--break-system-packages pyzmq pycapnp"
1313
export DEP_OPTS="DEBUG=1"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="\

0 commit comments

Comments
 (0)