Skip to content

Commit 0136bea

Browse files
authored
Merge pull request #16 from Sjors/2026/03/ccache
ci: use ccache
2 parents 2038482 + c02ac8b commit 0136bea

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,20 @@ jobs:
1717
- name: Install Bitcoin Dependencies
1818
run: |
1919
sudo apt-get update
20-
sudo apt-get install build-essential cmake pkgconf python3 libevent-dev libboost-dev capnproto libcapnp-dev
20+
sudo apt-get install build-essential cmake pkgconf python3 libevent-dev libboost-dev capnproto libcapnp-dev ccache
21+
- name: ccache
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/ccache
25+
key: ccache-${{ runner.os }}-${{ github.sha }}
26+
restore-keys: ccache-${{ runner.os }}-
2127
- name: Checkout Bitcoin Core
2228
run: git clone --depth 1 --branch master https://github.com/bitcoin/bitcoin.git
2329
- name: Build Bitcoin Core
24-
run: cd bitcoin && cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF && cmake --build build -j 16
30+
run: |
31+
cd bitcoin
32+
cmake -B build -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
33+
cmake --build build -j $(nproc)
2534
- name: Run Bitcoin Core Daemon
2635
run: cd bitcoin && ./build/bin/bitcoin node -chain=regtest -ipcbind=unix -server -debug=ipc -daemon
2736
- name: Generate Blocks

0 commit comments

Comments
 (0)