Skip to content

Commit f599a84

Browse files
authored
Add PrecomputedTransactionData (#17)
2 parents 40a6c2e + a335cee commit f599a84

1,103 files changed

Lines changed: 5991 additions & 4360 deletions

File tree

Some content is hidden

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

depend/bitcoin/.github/workflows/ci.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ defaults:
3030

3131
jobs:
3232
runners:
33-
name: 'determine runners'
33+
name: '[meta] determine runners'
3434
runs-on: ubuntu-latest
3535
outputs:
3636
provider: ${{ steps.runners.outputs.provider }}
@@ -66,7 +66,7 @@ jobs:
6666
- name: Determine fetch depth
6767
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
6868
- *ANNOTATION_PR_NUMBER
69-
- uses: actions/checkout@v5
69+
- uses: actions/checkout@v6
7070
with:
7171
ref: ${{ github.event.pull_request.head.sha }}
7272
fetch-depth: ${{ env.FETCH_DEPTH }}
@@ -148,7 +148,7 @@ jobs:
148148

149149
- &CHECKOUT
150150
name: Checkout
151-
uses: actions/checkout@v5
151+
uses: actions/checkout@v6
152152
with:
153153
# Ensure the latest merged pull request state is used, even on re-runs.
154154
ref: &CHECKOUT_REF_TMPL ${{ github.event_name == 'pull_request' && github.ref || '' }}
@@ -343,9 +343,23 @@ jobs:
343343
run: |
344344
py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
345345
346+
record-frozen-commit:
347+
# Record frozen commit, so that the native tests on cross-builds can run on
348+
# the exact same commit id of the build.
349+
name: '[meta] record frozen commit'
350+
runs-on: ubuntu-latest
351+
outputs:
352+
commit: ${{ steps.record-commit.outputs.commit }}
353+
steps:
354+
- *ANNOTATION_PR_NUMBER
355+
- *CHECKOUT
356+
- name: Record commit
357+
id: record-commit
358+
run: echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
359+
346360
windows-cross:
347361
name: 'Windows-cross to x86_64, ${{ matrix.crt }}'
348-
needs: runners
362+
needs: [runners, record-frozen-commit]
349363
runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
350364
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
351365

@@ -368,7 +382,10 @@ jobs:
368382
steps:
369383
- *ANNOTATION_PR_NUMBER
370384

371-
- *CHECKOUT
385+
- name: Checkout
386+
uses: actions/checkout@v6
387+
with:
388+
ref: ${{ needs.record-frozen-commit.outputs.commit }}
372389

373390
- name: Configure environment
374391
uses: ./.github/actions/configure-environment
@@ -402,7 +419,7 @@ jobs:
402419
windows-native-test:
403420
name: 'Windows, ${{ matrix.crt }}, test cross-built'
404421
runs-on: windows-2022
405-
needs: windows-cross
422+
needs: [windows-cross, record-frozen-commit]
406423

407424
strategy:
408425
fail-fast: false
@@ -421,7 +438,10 @@ jobs:
421438
steps:
422439
- *ANNOTATION_PR_NUMBER
423440

424-
- *CHECKOUT
441+
- name: Checkout
442+
uses: actions/checkout@v6
443+
with:
444+
ref: ${{ needs.record-frozen-commit.outputs.commit }}
425445

426446
- name: Download built executables
427447
uses: actions/download-artifact@v5
@@ -502,6 +522,12 @@ jobs:
502522
fail-fast: false
503523
matrix:
504524
include:
525+
- name: 'iwyu'
526+
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
527+
fallback-runner: 'ubuntu-24.04'
528+
timeout-minutes: 120
529+
file-env: './ci/test/00_setup_env_native_iwyu.sh'
530+
505531
- name: '32 bit ARM'
506532
cirrus-runner: 'ubuntu-24.04-arm' # Cirrus' Arm runners are Apple (with virtual Linux aarch64), which doesn't support 32-bit mode
507533
fallback-runner: 'ubuntu-24.04-arm'
@@ -637,7 +663,7 @@ jobs:
637663
- *ANNOTATION_PR_NUMBER
638664

639665
- name: Checkout
640-
uses: actions/checkout@v5
666+
uses: actions/checkout@v6
641667
with:
642668
ref: *CHECKOUT_REF_TMPL
643669
fetch-depth: 0

depend/bitcoin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# Only ignore unexpected patches
1414
*.patch
15+
!ci/test/*.patch
1516
!contrib/guix/patches/*.patch
1617
!depends/patches/**/*.patch
1718

depend/bitcoin/ci/lint/01_install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ command -v python3
4040
python3 --version
4141

4242
${CI_RETRY_EXE} pip3 install \
43-
codespell==2.4.1 \
4443
lief==0.16.6 \
4544
mypy==1.18.2 \
4645
pyzmq==27.1.0 \
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2023-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 CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # To build codegen, CMake must be 3.31 or newer.
10+
export CONTAINER_NAME=ci_native_iwyu
11+
export TIDY_LLVM_V="21"
12+
export APT_LLVM_V="${TIDY_LLVM_V}"
13+
export PACKAGES="clang-${TIDY_LLVM_V} clang-format-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
14+
export NO_DEPENDS=1
15+
export RUN_UNIT_TESTS=false
16+
export RUN_FUNCTIONAL_TESTS=false
17+
export RUN_FUZZ_TESTS=false
18+
export RUN_CHECK_DEPS=false
19+
export RUN_IWYU=true
20+
export GOAL="codegen"
21+
export BITCOIN_CONFIG="\
22+
--preset dev-mode -DBUILD_GUI=OFF \
23+
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
24+
-DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \
25+
"

depend/bitcoin/ci/test/01_base_install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ if [[ -n "${USE_INSTRUMENTED_LIBCPP}" ]]; then
7979
rm -rf /llvm-project
8080
fi
8181

82-
if [[ "${RUN_TIDY}" == "true" ]]; then
82+
if [[ "${RUN_IWYU}" == true ]]; then
8383
${CI_RETRY_EXE} git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_"${TIDY_LLVM_V}" /include-what-you-use
84+
(cd /include-what-you-use && patch -p1 < /ci_container_base/ci/test/01_iwyu.patch)
8485
cmake -B /iwyu-build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-"${TIDY_LLVM_V}" -S /include-what-you-use
8586
make -C /iwyu-build/ install "$MAKEJOBS"
8687
fi

0 commit comments

Comments
 (0)