CI: Improve caching to avoid unnecessary builds#84
Merged
pniedzielski merged 8 commits intoJun 26, 2026
Conversation
1c3ffd1 to
63699dd
Compare
06a3509 to
e190755
Compare
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
`git clone --depth 1` can fail to fetch an annotated tag (which has a different SHA than the object it points to). This patch performs the the real solution, to not do a shallow clone. A full clone is a little more expensive than a shallow clone, but not by much, and we only need to do this when we update our dependencies. Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
When we added an explicit tag to pin libbmq to in CI, we didn’t update the caching logic in CI. As such, every time the BlazingMQ’s repo’s `main` branch changes, the Python SDK’s CI rebuilds its dependencies, even if we’ve already built all dependencies at their pinned tags. This patch uses a hash of the `bin/clone-dependencies.sh` script as the cache key to avoid these unnecessary builds. Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
32ad7ec to
93d46f7
Compare
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
Signed-off-by: Patrick M. Niedzielski <pniedzielski@bloomberg.net>
93d46f7 to
4b0f488
Compare
678098
reviewed
Jun 22, 2026
| --branch ${BDE_TOOLS_TAG} \ | ||
| https://github.com/bloomberg/bde-tools \ | ||
| "${DIR_THIRDPARTY}/bde-tools" | ||
| git -C "${DIR_THIRDPARTY}/bde-tools" checkout ${BDE_TOOLS_TAG} |
Collaborator
There was a problem hiding this comment.
The original git clone was a targeted shallow clone. It is not shallow anymore, more work is done, and it might take some time when cloning huge repos.
Collaborator
Author
There was a problem hiding this comment.
This is intentional. We need to do this to clone annotated tags.
| git clone --depth 1 https://github.com/google/benchmark.git "${DIR_THIRDPARTY}/google-benchmark" | ||
| fi | ||
| if [ ! -d "${DIR_THIRDPARTY}/googletest" ]; then | ||
| git clone --depth 1 https://github.com/google/googletest.git "${DIR_THIRDPARTY}/googletest" |
Collaborator
There was a problem hiding this comment.
Might be good to pin 3rd party revisions.
I am not that concerned about bde/ntf etc
chrisbeard
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we added an explicit tag to pin libbmq to in CI, we didn’t update the caching logic in CI. As such, every time the BlazingMQ’s repo’s
mainbranch changes, the Python SDK’s CI rebuilds its dependencies, even if we’ve already built all dependencies at their pinned tags. This patch uses a hash of thebin/clone-dependencies.shscript as the cache key to avoid these unnecessary builds.