Skip to content

Commit 4b0c2f2

Browse files
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from 1857296c067b..0d06944a6666
0d06944a6666 implement blockreader and expose key methods on the c api bbbc6afa401a Add directory locking and read-only mode for BlockTreeStore 1bcbdfd8ae66 flush disk writes when not in initial block download f2926f8e2bfa fix: remove in memory test for kernel b93a169b1dc4 blockstorage: Remove BlockTreeDB dead code 7cab96bc99e6 kernel: Add assumed header store to chainparams 065b02d2e1b4 kernel: Remove block tree db params 7a6d0c725ca8 blockstorage: Replace BlockTreeDB with BlockTreeStore b63afb30249c fuzz: Use BlockTreeStore in block index fuzz test 131f742bcb96 kernel: Add blocktreestorage module e450549ae947 kernel: Fix bitcoin-chainstate for windows c7cd7331be5c kernel: Add Purpose section to header documentation de793c8255c7 kernel: Allowing reducing exports a71138dfa549 kernel: Add pure kernel bitcoin-chainstate a81e68c5be3a kernel: Add functions to get the block hash from a block 84ab95e70f41 kernel: Add block index utility functions to C header 461e4e75700d kernel: Add function to read block undo data from disk to C header 16aa4f40a8fe kernel: Add functions to read block from disk to C header c78602e0042d kernel: Add function for copying block data to C header b51c9ac63196 kernel: Add functions for the block validation state to C header 8b9ca40af60c kernel: Add validation interface to C header a7e2388a2326 kernel: Add interrupt function to C header 99ef8fd48469 kernel: Add import blocks function to C header e0f41a82d1ef kernel: Add chainstate load options for in-memory dbs in C header 999954955651 kernel: Add options for reindexing in C header f2f8ec99b7c4 kernel: Add block validation to C header 2779ed23f6e5 kernel: Add chainstate loading when instantiating a ChainstateManager 69311cfdef9f kernel: Add chainstate manager option for setting worker threads b02f62573d57 kernel: Add chainstate manager object to C header dc4c23c0adaa kernel: Add notifications context option to C header 190395959d07 kernel: Add chain params context option to C header 137a10c29397 kernel: Add kernel library context object d61fc3312412 kernel: Add logging to kernel library C header 7d4163c0afa1 kernel: Introduce initial kernel C header API d20f10affba8 Merge bitcoin/bitcoin#33268: wallet: Identify transactions spending 0-value outputs, and add tests for anchor outputs in a wallet 9a5ba154bea1 Merge bitcoin/bitcoin#33310: trace: Workaround GCC bug compiling with old systemtap 853f0d881142 Merge bitcoin/bitcoin#33364: ci: always use tag for LLVM checkout b81445333a10 Merge bitcoin/bitcoin#33243: test: Fix CLI_MAX_ARG_SIZE issues f757da87f59d Merge bitcoin/bitcoin#33332: common: Make arith_uint256 trivially copyable e416dc2fbbb7 Merge bitcoin/bitcoin#33321: kernel: make blockTip index const 176fac0f16d5 Merge bitcoin/bitcoin#33141: test: Remove polling loop from test_runner (take 2) 593d5fe37d7a Merge bitcoin/bitcoin#33354: txgraph: use enum Level instead of bool main_only 653a9849d5f9 common: Make arith_uint256 trivially copyable b736052e39f1 ci: always use tag for LLVM checkout d45f3717d2c6 txgraph: use enum Level instead of bool main_only ee42d59d4de9 Merge bitcoin-core/gui#886: Avoid pathological QT text/markdown behavior... 2c8a478db4b8 Merge bitcoin/bitcoin#33231: net: Prevent node from binding to the same `CService` 591eea7b5ac5 Merge bitcoin/bitcoin#33082: wallet, refactor: Remove Legacy check and error 6a371b70c87a gui: Avoid pathological QT text/markdown behavior... c0894a0a2be0 Merge bitcoin/bitcoin#33348: contrib: add bitcoin binary to gen-manpages 53e6db91ef59 contrib: add placeholder manpage for bitcoin binary f5887a8de4c8 contrib: add bitcoin binary to gen-manpages 314c42b55bda Merge bitcoin/bitcoin#33347: build: bump `CLIENT_VERSION_MAJOR` to 30 9f744fffc39d build: bump CLIENT_VERSION_MAJOR to 30 042817ddb84c Merge bitcoin/bitcoin#33346: doc: remove release note fragment 0f0e6fe7f5f4 doc: remove release note fragment 84cf5420398c Merge bitcoin/bitcoin#33275: Release: 30.0 translations update 13809b867ad9 Merge bitcoin/bitcoin#33303: ci: Checkout latest merged pulls e749205f83dd Merge bitcoin/bitcoin#33319: ci: reduce runner sizes on various jobs 9cbd346daa50 Merge bitcoin/bitcoin#33340: Fix benchmark CSV output 4776179be9fb Merge bitcoin/bitcoin#33342: guix: strip binaries in libexec 0ba44d9c38af Merge bitcoin/bitcoin#33296: net: check for empty header before calling FillBlock 1861030bea7f Merge bitcoin/bitcoin#30469: index: Fix coinstats overflow 8b6264768030 test: send duplicate blocktxn message in p2p_compactblocks.py 5e585a0fc4fd net: check for empty header before calling FillBlock cb825a07ac6d Merge bitcoin/bitcoin#33338: net: Add interrupt to pcp retry loop 0b0bd74c3e9a Merge bitcoin/bitcoin#33312: clang-tidy: Disable `UndefinedBinaryOperatorResult` check in `src/ipc` 790b440197bd Fix benchmark CSV output 3cceda9f4855 guix: strip binaries in libexec 3eea9fd39532 Merge bitcoin/bitcoin#33308: doc: fix `LIBRARY_PATH` comment 0b38cc9bf7a3 Merge bitcoin/bitcoin#33339: doc: move release notes to wiki pre branch off b320f5efa175 qt: 30.0 translations update 905c1a77f51c doc: move release notes to wiki pre branch off 2d799590feea Merge bitcoin/bitcoin#33283: contrib: update fixed seeds 188de70c8641 net: Add interrupt to pcp retry loop 9c6fa07b1248 Merge bitcoin/bitcoin#33322: Update libmultiprocess subtree to improve build and logs c76797481155 clang-tidy: Fix critical warnings 54dc34ec2279 index: Remove unused coinstatsindex recovery code 37c4fba1f4c1 index: Check BIP30 blocks when rewinding Coinstatsindex 51df9de8e5b9 doc: Add release note for 30469 bb8d67318329 test: Add coinstatsindex compatibility test b2e8b64ddc35 index, refactor: Append blocks to coinstatsindex without db read 431a076ae6e3 index: Fix coinstatsindex overflow issue fa8f081af31c ci: Checkout latest merged pulls 36e40417de3f Merge bitcoin-core/gui#884: Fix compatibility with `-debuglogfile` command-line option a4ee70e5b69c Merge commit 'a334bbe9b79ddf1999003c792bc8945639b7e9c1' into pr/subtree-4 a334bbe9b79d Squashed 'src/ipc/libmultiprocess/' changes from 1b8d4a6f1e54..13424cf2ecc1 e04cb9c1bdf2 Merge bitcoin/bitcoin#33201: Add functional test for IPC interface 75d9b7247570 kernel: make blockTip index const a341e11ac92b ci: test IPC on additional hosts 6aee573bfcf6 ci: enable IPC tests in CI 8d2ee88fa2a5 tests: add functional tests for IPC interface 3cc9a06c8dd5 test: Add TestNode ipcbind option 3cceb60a7153 test: Provide path to `bitcoin` binary 8c7f0056291d test: add is_ipc_compiled() and skip_if_no_ipc() functions 37c21ebe4078 Merge bitcoin/bitcoin#33309: doc: archive v29.1 release notes 32e2484b67e6 Merge bitcoin/bitcoin#33304: depends: strip when installing qt binaries 4d4789dffad5 net: Prevent node from binding to the same CService 647cdb4f7e80 Merge bitcoin/bitcoin#33311: net: Quiet down logging when router doesn't support natpmp/pcp 589b65f06c33 clang-tidy: Disable `UndefinedBinaryOperatorResult` check in `src/ipc` 4f1a4cbccd78 net: Quiet down logging when router doesn't support natpmp/pcp 93a29ff28301 trace: Workaround GCC bug compiling with old systemtap 5eeb2facbbbb ci: reduce runner sizes on various jobs 61ec8866c639 [doc] archive v29.1 release notes a2a35b58cb95 doc: fix LIBRARY_PATH comment e1ce0c525c7f Merge bitcoin/bitcoin#33291: ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles 84e813a02bb7 index, refactor: DRY coinbase check fab842b32487 index, refactor: Rename ReverseBlock to RevertBlock 2d8f5b91881e Merge bitcoin/bitcoin#33136: ci: Remove redundant RUN_UNIT_TESTS_SEQUENTIAL c9d5f211c119 depends: strip when installing qt fae610d8581a ci: Remove redundant RUN_UNIT_TESTS_SEQUENTIAL 2562fe1b2b63 Merge bitcoin/bitcoin#32159: net, pcp: handle multi-part responses and filter for default route while querying default gateway ed2ff3c63d83 Merge bitcoin/bitcoin#33235: build: set ENABLE_IPC to OFF when fuzzing 88db09bafe9e net: handle multi-part netlink responses 113a4228229b wallet: Add m_cached_from_me to cache "from me" status 609d265ebc51 test: Add a test for anchor outputs in the wallet c40dc822d74a wallet: Throw an error in sendall if the tx size cannot be calculated 39a7dbdd277d wallet: Determine IsFromMe by checking for TXOs of inputs e76c2f7a4111 test: Test wallet 'from me' status change 689a32197638 Merge bitcoin/bitcoin#33220: doc: truc packages allow sub min feerate transactions 9b76eef2d2b4 ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles 939678940f6c contrib: update fixed seeds 6cdd8ee67618 contrib: update makeseeds minblocks b8da9f4034e1 contrib: update makeseeds UA regex ba0b4304ecee Merge bitcoin/bitcoin#32989: ci: Migrate CI to hosted Cirrus Runners 0eb3eae54865 Merge bitcoin/bitcoin#33274: kernel: chainparams & headersync updates for 30.0 fa4885ef2fde test: Remove polling loop from test_runner 7270839af425 doc: truc packages allow sub min feerate transactions 46369583f3a9 Merge bitcoin/bitcoin#33224: doc: unify `datacarriersize` warning with release notes 755152ac819a kernel: add testnet4 assumeutxo param at height 90'000 a6512686e335 kernel: add mainnet assumeutxo param at height 910'000 943de66b5043 kernel: update headersync params 66fb96242648 kernel: update chainTxData c3cb26e02834 kernel: update assumevalid and minimumChainWork b4adae76d466 kernel: update assumed blockchain & chainstate sizes 7e58c94112d0 Merge bitcoin/bitcoin#33269: test: Fixup fill_mempool docstring 3c5da69a232b ci: remove un-needed lint_run*.sh files 2aa288efdda2 ci: fix annoying docker warning dd1c5903e8d8 ci: add ccache hit-rate warning when < 75% f4272844833d doc: Detail configuration of hosted CI runners 3f339e99e00b ci: dynamically match makejobs with cores 4393ffdd837b ci: remove .cirrus.yml bc41848d00f7 ci: port lint d290a8e6eab7 ci: port msan-depends 9bbae61e3b40 ci: port tsan-depends bf7d5364527c ci: port tidy 549074bc643f ci: port centos-depends-gui 58e38c3a0425 ci: port previous-releases-depends-debug 341196d75c30 ci: port fuzzer-address-undefined-integer-nodepends f2068f26c123 ci: port no-IPC-i686-DEBUG 2a00b12d73bb ci: port nowallet-libbitcoinkernel 9c2514de5343 ci: port mac-cross-gui-notests 2c990d84a3db ci: force reinstall of kernel headers in asan 884251441bb7 ci: update asan-lsan-ubsan f253031cb8e4 ci: port arm 32-bit job 04e7bfbceb03 ci: update windows-cross job cc1735d77714 ci: add job to determine runner type 020069e6b718 ci: add Cirrus cache host 9c2b96e0d030 ci: have base install run in right dir 18f6be09d02b ci: use docker build cache arg directly 94a09325475d ci: use buildx in ci fdf64e553245 ci: add configure-docker action 33ba073df7a8 ci: add REPO_USE_CIRRUS_RUNNERS b232b0fa5e96 ci: add caching actions b8fcc9fcbcdd ci: add configure environment action fa3f682032a3 test: Fixup fill_mempool docstring 7cc9a087069b Merge bitcoin/bitcoin#33253: Revert compact block cache inefficiencies 084fd68fda2c Merge bitcoin/bitcoin#33258: ci: use LLVM 21 6ff2d423625d Merge bitcoin/bitcoin#33189: rpc: followups for 33106 4d54bb2b92cc Merge bitcoin/bitcoin#33264: threading: reduce the scope of lock in getblocktemplate 9ae23950ef80 Merge bitcoin/bitcoin#33261: ci: return to using dash in CentOS job 493ba0f68831 threading: reduce the scope of lock in getblocktemplate 509ffea40abb ci: return to using dash in CentOS job b7b249d3adfb Revert "[refactor] rewrite vTxHashes as a vector of CTransactionRef" b9300d8d0a74 Revert "refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef>" df5a50e5de20 bench/blockencodings: add compact block reconstruction benchmark 4cf0ae474ba0 ci: use LLVM 21 fa96a4afea2a ci: Enable CI_LIMIT_STACK_SIZE=1 in i686_no_ipc task facfde2cdce6 test: Fix CLI_MAX_ARG_SIZE issues 6ca6f3b37b99 Merge bitcoin/bitcoin#33241: Update libmultiprocess subtree to fix build issues 9703b7e6d563 Merge bitcoin/bitcoin#32592: threading: remove ancient CRITICAL_SECTION macros dd68d0f40b61 Squashed 'src/ipc/libmultiprocess/' changes from b4120d34bad2..1b8d4a6f1e54 323b3fd27283 Merge commit 'dd68d0f40b614474f24469fbe1ba02f8f9146b31' into pr/subtree-3 d3c5e47391e2 wallet, refactor: Remove Legacy check and error 73220fc0f958 Merge bitcoin/bitcoin#33212: index: Don't commit state in BaseIndex::Rewind 46ca7712cb5f threading: remove unused template instantiations b537a6a6dbd3 threading: remove obsolete critsect macros 0d0e0a39b4a5 threading: use a reverse lock rather than manual critsect macros 3ddd554d3181 tests: Add Assertions in reverse_lock tests to exercise thread-safety annotations c88b1cbf57a3 tests: get rid of remaining manual critsect usage 2c223de2af72 Merge bitcoin/bitcoin#33237: doc: use new block_to_connect parameter name 02f6758e0ce8 Merge bitcoin/bitcoin#33233: doc: follow-ups to "Add bitcoin-{node,gui} to release binaries for IPC" 682bd04462d2 Merge bitcoin/bitcoin#33236: doc: Remove wrong and redundant doxygen tag a9701de0c9fd Merge bitcoin/bitcoin#33217: depends: remove xinerama extension from libxcb 78351ed083b1 Merge bitcoin/bitcoin#33222: miner: clamp options instead of asserting de65c86572c5 doc: capnproto instruction for Alpine and Arch 49d1a1a36306 doc: add capnproto-devel to Fedora build instruction a602f6fb7bf5 test: index with an unclean restart after a reorg 01b95ac6f496 index: don't commit state in BaseIndex::Rewind 1c3db0ed8e6f doc: use new block_to_connect parameter name 8333aa530290 Merge bitcoin/bitcoin#32523: wallet: Remove isminetypes eab5518913a6 doc: mark bitcoin-{node,gui} installed in files.md 966666de9a62 doc: Remove wrong and redundant doxygen tag af4156ab7556 build: set ENABLE_IPC to OFF when fuzzing 2a815d126bc9 doc: link to capnp version bump PR decc3671c88b guix: remove libxcb-xinerama.so.0 from allowed libs 3d9314f3838c depends: remove xinerama extension from libxcb 7d9789401be4 Merge bitcoin/bitcoin#31802: Add bitcoin-{node,gui} to release binaries for IPC 2885bd0e1c4f doc: unify `datacarriersize` warning with release notes be776a1443fd wallet: Remove isminetype 009a69a616cf wallet: Remove ISMINE_USED 6a7aa015747e wallet: Remove COutput::spendable and AvailableCoinsListUnspent 7392b8b084be miner: clamp options instead of asserting 620abe985e51 interfaces, gui: Remove is_mine output parameter from getAddress c0d28c8f5b15 qt: Fix compatibility with `-debuglogfile` command-line option daa40a3ff973 doc fixups for 33106 c568511e8ced test fixup for incremental feerate 636fa219d37f test fixups 9169a50d529e [rpc] expose blockmintxfee via getmininginfo ce7d94a492e6 doc: add release note 71f29d4fa90a doc: update build and dependencies docs for IPC 3cbf747c328f cmake: set ENABLE_IPC by default 32a90e1b9017 ci: use bitcoin-node for one depends job b333cc14d50b ci: build one depends job without multiprocess 16bce9ac4cd0 build: depends makes libmultiprocess by default 30c6f64eed30 test: Remove unnecessary LoadWallet() calls 42e99ad77396 net: skip non-route netlink responses 57ce645f05d1 net: filter for default routes in netlink responses REVERT: 1857296c067b kernel: Fix bitcoin-chainstate for windows REVERT: b14455e3fcc5 kernel: Add Purpose section to header documentation REVERT: b6bc17b703dd kernel: Allowing reducing exports REVERT: b1ef48b20730 kernel: Add pure kernel bitcoin-chainstate REVERT: b8e4169e453a kernel: Add functions to get the block hash from a block REVERT: ea03b539a2fa kernel: Add block index utility functions to C header REVERT: 10e8bc695713 kernel: Add function to read block undo data from disk to C header REVERT: 49743bf8c133 kernel: Add functions to read block from disk to C header REVERT: 11588ec6537c kernel: Add function for copying block data to C header REVERT: de24590872f8 kernel: Add functions for the block validation state to C header REVERT: dcba34ad8f86 kernel: Add validation interface to C header REVERT: 527435ebcc73 kernel: Add interrupt function to C header REVERT: c6a3da91764a kernel: Add import blocks function to C header REVERT: f7d879349a61 kernel: Add chainstate load options for in-memory dbs in C header REVERT: 9b0116f0adad kernel: Add options for reindexing in C header REVERT: 4bbd99b03001 kernel: Add block validation to C header REVERT: 8dbc8230f110 kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: f1a9d6f4dfff kernel: Add chainstate manager option for setting worker threads REVERT: 864008a1a71a kernel: Add chainstate manager object to C header REVERT: b160f13ed141 kernel: Add notifications context option to C header REVERT: d465a997f2e9 kernel: Add chain params context option to C header REVERT: e61538b88b32 kernel: Add kernel library context object REVERT: 3963f4c9de73 kernel: Add logging to kernel library C header REVERT: f3acc94b4b7e kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 0d06944a66664815b8b279be69a72723e01a5903
1 parent 0d866f7 commit 4b0c2f2

File tree

353 files changed

+16370
-32735
lines changed

Some content is hidden

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

353 files changed

+16370
-32735
lines changed

.cirrus.yml

Lines changed: 0 additions & 199 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: 'Configure Docker'
2+
description: 'Set up Docker build driver and configure build cache args'
3+
inputs:
4+
use-cirrus:
5+
description: 'Use cirrus cache'
6+
required: true
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Set up Docker Buildx
11+
uses: docker/setup-buildx-action@v3
12+
with:
13+
# Use host network to allow access to cirrus gha cache running on the host
14+
driver-opts: |
15+
network=host
16+
17+
# This is required to allow buildkit to access the actions cache
18+
- name: Expose actions cache variables
19+
uses: actions/github-script@v6
20+
with:
21+
script: |
22+
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
23+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
24+
25+
- name: Construct docker build cache args
26+
shell: bash
27+
run: |
28+
# Configure docker build cache backend
29+
#
30+
# On forks the gha cache will work but will use Github's cache backend.
31+
# Docker will check for variables $ACTIONS_CACHE_URL, $ACTIONS_RESULTS_URL and $ACTIONS_RUNTIME_TOKEN
32+
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
33+
34+
# Use cirrus cache host
35+
if [[ ${{ inputs.use-cirrus }} == 'true' ]]; then
36+
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
37+
else
38+
url_args=""
39+
fi
40+
41+
# Always optimistically --cache‑from in case a cache blob exists
42+
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
43+
44+
# If this is a push to the default branch, also add --cache‑to to save the cache
45+
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
46+
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
47+
fi
48+
49+
# Always `--load` into docker images (needed when using the `docker-container` build driver).
50+
args+=(--load)
51+
52+
echo "DOCKER_BUILD_CACHE_ARG=${args[*]}" >> $GITHUB_ENV
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Configure environment'
2+
description: 'Configure CI, cache and container name environment variables'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Set CI and cache directories
7+
shell: bash
8+
run: |
9+
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV"
10+
echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV"
11+
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> $GITHUB_ENV
12+
echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV"
13+
echo "BASE_CACHE=${{ runner.temp }}/depends/built" >> $GITHUB_ENV
14+
echo "SOURCES_PATH=${{ runner.temp }}/depends/sources" >> $GITHUB_ENV
15+
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> $GITHUB_ENV
16+
17+
- name: Set cache hashes
18+
shell: bash
19+
run: |
20+
echo "DEPENDS_HASH=$(git ls-tree HEAD depends "ci/test/$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
21+
echo "PREVIOUS_RELEASES_HASH=$(git ls-tree HEAD test/get_previous_releases.py | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22+
23+
- name: Get container name
24+
shell: bash
25+
run: |
26+
source $FILE_ENV
27+
echo "CONTAINER_NAME=$CONTAINER_NAME" >> "$GITHUB_ENV"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 'Restore Caches'
2+
description: 'Restore ccache, depends sources, and built depends caches'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Restore Ccache cache
7+
id: ccache-cache
8+
uses: cirruslabs/cache/restore@v4
9+
with:
10+
path: ${{ env.CCACHE_DIR }}
11+
key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
12+
restore-keys: |
13+
ccache-${{ env.CONTAINER_NAME }}-
14+
15+
- name: Restore depends sources cache
16+
id: depends-sources
17+
uses: cirruslabs/cache/restore@v4
18+
with:
19+
path: ${{ env.SOURCES_PATH }}
20+
key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
21+
restore-keys: |
22+
depends-sources-${{ env.CONTAINER_NAME }}-
23+
24+
- name: Restore built depends cache
25+
id: depends-built
26+
uses: cirruslabs/cache/restore@v4
27+
with:
28+
path: ${{ env.BASE_CACHE }}
29+
key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
30+
restore-keys: |
31+
depends-built-${{ env.CONTAINER_NAME }}-
32+
33+
- name: Restore previous releases cache
34+
id: previous-releases
35+
uses: cirruslabs/cache/restore@v4
36+
with:
37+
path: ${{ env.PREVIOUS_RELEASES_DIR }}
38+
key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
39+
restore-keys: |
40+
previous-releases-${{ env.CONTAINER_NAME }}-
41+
42+
- name: export cache hits
43+
shell: bash
44+
run: |
45+
echo "depends-sources-cache-hit=${{ steps.depends-sources.outputs.cache-hit }}" >> $GITHUB_ENV
46+
echo "depends-built-cache-hit=${{ steps.depends-built.outputs.cache-hit }}" >> $GITHUB_ENV
47+
echo "previous-releases-cache-hit=${{ steps.previous-releases.outputs.cache-hit }}" >> $GITHUB_ENV
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Save Caches'
2+
description: 'Save ccache, depends sources, and built depends caches'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: debug cache hit inputs
7+
shell: bash
8+
run: |
9+
echo "depends sources direct cache hit to primary key: ${{ env.depends-sources-cache-hit }}"
10+
echo "depends built direct cache hit to primary key: ${{ env.depends-built-cache-hit }}"
11+
echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}"
12+
13+
- name: Save Ccache cache
14+
uses: cirruslabs/cache/save@v4
15+
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }}
16+
with:
17+
path: ${{ env.CCACHE_DIR }}
18+
key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
19+
20+
- name: Save depends sources cache
21+
uses: cirruslabs/cache/save@v4
22+
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }}
23+
with:
24+
path: ${{ env.SOURCES_PATH }}
25+
key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
26+
27+
- name: Save built depends cache
28+
uses: cirruslabs/cache/save@v4
29+
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}}
30+
with:
31+
path: ${{ env.BASE_CACHE }}
32+
key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
33+
34+
- name: Save previous releases cache
35+
uses: cirruslabs/cache/save@v4
36+
if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}}
37+
with:
38+
path: ${{ env.PREVIOUS_RELEASES_DIR }}
39+
key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}

0 commit comments

Comments
 (0)