Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching is broken in firmware build actions. #157

Open
faldor20 opened this issue Feb 1, 2024 · 4 comments
Open

Caching is broken in firmware build actions. #157

faldor20 opened this issue Feb 1, 2024 · 4 comments

Comments

@faldor20
Copy link

faldor20 commented Feb 1, 2024

Currently caching is broken for building firmware in a config repo, i checked my builds, and also that of other public config repos, all never use the cache.

I ran some tests with debug on and is seems to be caused by zstd being missing, unfortunately the version of zstd available in your version of ubuntu isn't new enough for the caching to work properly with it.

##[debug]Checking zstd --quiet --version
##[debug]*** zstd command line interface 64-bits v1.4.4, by Yann Collet ***
##[debug]zstd version: null

If I run it with zstd installed, that version doesn't support the quiet flag and so it doesn't get the version properly and fails.
All this seems to be causing the cache version to change every single run, and because the version isn't the same it cannot be reused.

This took quite a bit of sleuthing to dig up, so I hope it is useful to you 😃

@caksoylar
Copy link

Thank you for the investigation! Can you link to some of your builds with the debug logs before your zstd install attempts, and after? I have been trying to reproduce but had trouble seeing anything related in the debug logs I've been able to enable.

If it is just a problem of having the right zstd version installed, then we can have a look at the Docker image to solve it there.

@faldor20
Copy link
Author

faldor20 commented Feb 3, 2024

Sure, this is the last build i ran with debug on https://github.com/faldor20/zmk-split-module/actions/runs/7679079429/job/20929605015.

You can see here on line 63 I added a new job to install zstd: https://github.com/faldor20/zmk-split-module/blob/dfa29f6aa289648ff42c7614617e5a9c02297e38/.github/workflows/build-user-config.yml
and my many attempts to get it to print the version properly. I think this is an issue with the version of zstd, on my pc I had V1.4.8 and that was printing the version fine.

Initially when i was looking i just checked out random people's zmk-config repos on github and found many like this https://github.com/Giorgiofox/zmk-config/actions where the caching isn't working too.

When I looked just now I found this guy who's caching is working: https://github.com/J4ckTh3R1qp3r/zmk-config-corne/actions/runs/7762295095/job/21172463174 so maybe it's not an issue with zstd after all... not sure...

Hopefully that's all helpful, and thanks for getting back to me so fast :)

@petejohanson
Copy link
Collaborator

I believe the zstd log message is a red herring, see zmkfirmware/zmk#2164

@caksoylar
Copy link

Should be fixed by zmkfirmware/zmk#2164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants