Skip to content

Commit 14571c5

Browse files
committed
ci: use new build system to compile from depends
Simplifies the configuration.
1 parent 85dd633 commit 14571c5

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,28 @@ jobs:
2626
id: cache-lib
2727
uses: actions/cache/restore@v4
2828
with:
29-
path: depend/bitcoin/build/lib/
29+
path: build/_libs/
3030
key: bitcoinkernel-${{ matrix.platform }}_${{ matrix.version }}_${{ matrix.arch }}-${{ hashFiles('depend/bitcoin/**', 'CMakeLists.txt') }}
3131

3232
- name: Build bitcoinkernel lib
3333
if: steps.cache-lib.outputs.cache-hit != 'true'
3434
run: |
35-
cd depend/bitcoin && \
36-
make -C depends NO_QT=1 NO_QR=1 NO_ZMQ=1 NO_WALLET=1 NO_USDT=1 NO_LIBEVENT=1 NO_SQLITE=1 NO_BDB=1 HOST=${{ matrix.arch }}-linux-gnu -j$(nproc) && \
37-
cmake -B build -DCMAKE_TOOLCHAIN_FILE=$PWD/depends/${{ matrix.arch }}-linux-gnu/toolchain.cmake -DBUILD_KERNEL_LIB=ON -DBUILD_BENCH=OFF -DBUILD_DAEMON=OFF -DBUILD_CLI=OFF -DBUILD_GUI=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_UTIL_CHAINSTATE=OFF -DBUILD_WALLET_TOOL=OFF -DENABLE_WALLET=OFF && \
38-
cmake --build build --target bitcoinkernel --parallel && \
39-
cmake --install build --component Kernel --prefix=build/ --strip
35+
cmake -B build -DBITCOIN_TARGET=${{ matrix.arch }}-linux-gnu
36+
cmake --build build -j
37+
cmake --install build
4038
4139
- name: Save lib cache
4240
if: steps.cache-lib.outputs.cache-hit != 'true'
4341
uses: actions/cache/save@v4
4442
with:
45-
path: depend/bitcoin/build/lib/
43+
path: build/_libs/
4644
key: ${{ steps.cache-lib.outputs.cache-primary-key}}
4745

4846
- name: Upload Binary
4947
uses: actions/upload-artifact@v4
5048
with:
5149
name: bitcoinkernel-${{ matrix.platform }}_${{ matrix.arch }}
52-
path: depend/bitcoin/build/lib/libbitcoinkernel.so
50+
path: build/_libs/libbitcoinkernel.so
5351
if-no-files-found: error
5452

5553
build-windows:
@@ -62,7 +60,7 @@ jobs:
6260
id: cache-lib
6361
uses: actions/cache/restore@v4
6462
with:
65-
path: depend/bitcoin/build/bin/
63+
path: build/_libs/
6664
key: bitcoinkernel-win_AMD64-${{ hashFiles('depend/bitcoin/**', 'CMakeLists.txt') }}
6765

6866
- name: Install dependencies
@@ -74,24 +72,22 @@ jobs:
7472
- name: Build bitcoinkernel lib
7573
if: steps.cache-lib.outputs.cache-hit != 'true'
7674
run: |
77-
cd depend/bitcoin && \
78-
make -C depends NO_QT=1 NO_QR=1 NO_ZMQ=1 NO_WALLET=1 NO_USDT=1 NO_LIBEVENT=1 NO_SQLITE=1 NO_BDB=1 HOST=x86_64-w64-mingw32 -j$(nproc) && \
79-
cmake -B build -DCMAKE_TOOLCHAIN_FILE=$PWD/depends/x86_64-w64-mingw32/toolchain.cmake -DBUILD_KERNEL_LIB=ON -DBUILD_BENCH=OFF -DBUILD_DAEMON=OFF -DBUILD_CLI=OFF -DBUILD_GUI=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_UTIL_CHAINSTATE=OFF -DBUILD_WALLET_TOOL=OFF -DENABLE_WALLET=OFF && \
80-
cmake --build build --target bitcoinkernel --parallel && \
81-
cmake --install build --component Kernel --prefix=build/ --strip
75+
cmake -B build -DBITCOIN_TARGET=x86_64-w64-mingw32
76+
cmake --build build -j
77+
cmake --install build
8278
8379
- name: Save lib cache
8480
if: steps.cache-lib.outputs.cache-hit != 'true'
8581
uses: actions/cache/save@v4
8682
with:
87-
path: depend/bitcoin/build/bin/
83+
path: build/_libs/
8884
key: ${{ steps.cache-lib.outputs.cache-primary-key}}
8985

9086
- name: Upload Binary
9187
uses: actions/upload-artifact@v4
9288
with:
9389
name: bitcoinkernel-win_AMD64
94-
path: depend/bitcoin/build/bin/libbitcoinkernel.dll
90+
path: build/_libs/libbitcoinkernel.dll
9591
if-no-files-found: error
9692

9793
build-osx:

contrib/bump-bitcoin.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ git subtree pull --prefix=depend/bitcoin https://github.com/bitcoin/bitcoin "$CO
4646

4747
echo "Subtree pulled successfully."
4848

49-
pushd depend/bitcoin
50-
51-
mkdir -p build
52-
cmake -B build -G Ninja -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON
53-
cmake --build build
49+
cmake --B build
50+
cmake --build build -j
5451

5552
# Install and capture library path
5653
INSTALL_OUTPUT=$(sudo cmake --install build 2>&1)
@@ -72,8 +69,6 @@ if [ -f "$OUTPUT_FILE" ]; then
7269
echo "Warning: $OUTPUT_FILE already exists and will be overwritten."
7370
fi
7471

75-
popd
76-
7772
clang2py "$SCRIPT_DIR/../depend/bitcoin/src/kernel/bitcoinkernel.h" -l "$LIB_PATH" $NM_OPTION > "$OUTPUT_FILE"
7873

7974
echo "Bindings generated successfully at $OUTPUT_FILE."

0 commit comments

Comments
 (0)