From 039cbb9646952e0602626ac82c8273c178167e83 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Tue, 10 Mar 2026 15:34:33 +0100 Subject: [PATCH 1/2] Use nproc for Bitcoin Core CI build --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a44406..2fa9831 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout Bitcoin Core run: git clone --depth 1 --branch master https://github.com/bitcoin/bitcoin.git - name: Build Bitcoin Core - run: cd bitcoin && cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF && cmake --build build -j 16 + run: cd bitcoin && cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF && cmake --build build -j $(nproc) - name: Run Bitcoin Core Daemon run: cd bitcoin && ./build/bin/bitcoin node -chain=regtest -ipcbind=unix -server -debug=ipc -daemon - name: Generate Blocks From c02ac8bc4612988c0b7e4bdf3453fd773b4cb443 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Tue, 10 Mar 2026 15:34:54 +0100 Subject: [PATCH 2/2] Add ccache to Bitcoin Core CI build --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fa9831..6a38418 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,20 @@ jobs: - name: Install Bitcoin Dependencies run: | sudo apt-get update - sudo apt-get install build-essential cmake pkgconf python3 libevent-dev libboost-dev capnproto libcapnp-dev + sudo apt-get install build-essential cmake pkgconf python3 libevent-dev libboost-dev capnproto libcapnp-dev ccache + - name: ccache + uses: actions/cache@v4 + with: + path: ~/.cache/ccache + key: ccache-${{ runner.os }}-${{ github.sha }} + restore-keys: ccache-${{ runner.os }}- - name: Checkout Bitcoin Core run: git clone --depth 1 --branch master https://github.com/bitcoin/bitcoin.git - name: Build Bitcoin Core - run: cd bitcoin && cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF && cmake --build build -j $(nproc) + run: | + cd bitcoin + cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build build -j $(nproc) - name: Run Bitcoin Core Daemon run: cd bitcoin && ./build/bin/bitcoin node -chain=regtest -ipcbind=unix -server -debug=ipc -daemon - name: Generate Blocks