Skip to content

ci : store ccache on HF buckets (test with cuda-ubuntu for now) - #27699

Merged
ggerganov merged 6 commits into
masterfrom
cisc/ci-ccache-buckets
Aug 25, 2026
Merged

ci : store ccache on HF buckets (test with cuda-ubuntu for now)#27699
ggerganov merged 6 commits into
masterfrom
cisc/ci-ccache-buckets

Conversation

@CISC

@CISC CISC commented Aug 25, 2026

Copy link
Copy Markdown
Member

Overview

Use Hugging Face buckets to save and restore ccache, testing on cuda-ubuntu for now.

Additional information

Keeps the latest ccache stored in a folder (so we can organize them per repo etc) on HF buckets instead of on GHA cache.

Only supports *nix ccache for now, no sccache or Windows support.

Test runs:
https://github.com/ggml-org/tmp/actions/runs/32833839548/job/97758228073
https://github.com/ggml-org/tmp/actions/runs/32833839548/job/97758227953
https://github.com/ggml-org/tmp/actions/runs/32840956765/job/97780129104

Requirements

@CISC
CISC requested a review from a team as a code owner August 25, 2026 11:40
@CISC CISC changed the title Cisc/ci ccache buckets ci : store ccache on HF buckets (test with cuda-ubuntu for now) Aug 25, 2026
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Aug 25, 2026
Comment thread .github/actions/ccache-buckets/action.yml
@CISC

CISC commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Seems these containers are fairly minimal. :)

@ggerganov

Copy link
Copy Markdown
Member

Seems these containers are fairly minimal. :)

In what sense?

@CISC

CISC commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Seems these containers are fairly minimal. :)

In what sense?

hip was missing venv, cuda was missing python3, and all were missing jq.

@ggerganov

Copy link
Copy Markdown
Member

Should we merge?

@CISC

CISC commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Should we merge?

Should be fine. :)

@ggerganov
ggerganov merged commit 790b571 into master Aug 25, 2026
6 checks passed
@ggerganov
ggerganov deleted the cisc/ci-ccache-buckets branch August 25, 2026 14:28

@netrunnereve netrunnereve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm late but I think there should be some sort of check here (maybe for the HF token?) that lets the run continue if we're running on a fork that doesn't have these buckets set up.

Also I'm guessing that these caches will start showing up in https://huggingface.co/ggml-org/buckets eventually?

@CISC

CISC commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

I'm late but I think there should be some sort of check here (maybe for the HF token?) that lets the run continue if we're running on a fork that doesn't have these buckets set up.

Yeah, I intended to, but forgot. A simple check that hf_bucket is not blank should suffice.

Also I'm guessing that these caches will start showing up in https://huggingface.co/ggml-org/buckets eventually?

They are already, but the bucket is private.

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

I'm late but I think there should be some sort of check here (maybe for the HF token?) that lets the run continue if we're running on a fork that doesn't have these buckets set up.

Yeah, I intended to, but forgot. A simple check that hf_bucket is not blank should suffice.

Actually seems to be working, silently fails with Invalid HF URI, will add a check anyway though.

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Ouch, vars are not available to PRs?
https://github.com/ggml-org/llama.cpp/actions/runs/32939294855/job/98086775226#step:6:125

Edit: Come to think of it secrets aren't either, which means it can't download from a private bucket. :(

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@ggerganov Ok, this one might be a dud, we can remove the variable and make the bucket public, but I'm not sure if it's safe to expose the ccache files?

Edit: It should work as cache for a HF hosted runner though.

@ggerganov

Copy link
Copy Markdown
Member

@ggerganov Ok, this one might be a dud, we can remove the variable and make the bucket public, but I'm not sure if it's safe to expose the ccache files?

I don't think this would be any different from the ccache files hosted on Github. They are also public in the sense that any workflow that we run can read and modify them.

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@ggerganov Ok, this one might be a dud, we can remove the variable and make the bucket public, but I'm not sure if it's safe to expose the ccache files?

I don't think this would be any different from the ccache files hosted on Github. They are also public in the sense that any workflow that we run can read and modify them.

True, but since they won't run before we approve them, there's at least some barrier there. Not actually checked if there's anything that can be exfiltrated from them?

@ggerganov

Copy link
Copy Markdown
Member

True, but since they won't run before we approve them, there's at least some barrier there.

I think it's the same for the HF bucket ccache? Does it not work like this:

  • We make the bucket public
  • Writing to the bucket still requires a token with permissions
  • Only approved workflows have access to the token because it is a secret in the llama.cpp repo

@CISC

CISC commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

True, but since they won't run before we approve them, there's at least some barrier there.

I think it's the same for the HF bucket ccache? Does it not work like this:

  • We make the bucket public
  • Writing to the bucket still requires a token with permissions
  • Only approved workflows have access to the token because it is a secret in the llama.cpp repo

Sure, my worry was just that it may contain a log with a secret or something, but took a look now and it doesn't seem so.

thecodacus pushed a commit to thecodacus/llama.cpp that referenced this pull request Sep 7, 2026
…-org#27699)

* add ccache-buckets action

* use ccache-buckets

* only save on master

* install python3-venv for hip

* add jq and python3 for cuda

* only delete caches older than 5 minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants