-
Notifications
You must be signed in to change notification settings - Fork 4
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
Please document how to cache so that bb is not re-downloaded on each run #15
Comments
Is there an indication that this is not working as expected? |
Hi @nha , Below log is from one of our actions, and it's been running for weeks. And this is from its latest run Looks, it couldn't find any cached version, and downloads bb. This is the part of action - name: Install babashka v1.3.188
uses: turtlequeue/[email protected]
with:
babashka-version: '1.3.188'
|
@nha , I use the below snippet to workaround, it looks to work, is it possible that the issue is Windows only? - name: Cache Babashka binary (Workaround)
uses: actions/cache@v4
id: cache-bb
with:
# save-always: true
path: C:\hostedtoolcache\windows\Babashka\1.3.188\x64
key: ${{ runner.os }}-bb-1.3.188
- name: Install babashka v1.3.188
if: steps.cache-bb.outputs.cache-hit != 'true'
uses: turtlequeue/[email protected]
with:
babashka-version: '1.3.188'
- name: add bb to path
if: steps.cache-bb.outputs.cache-hit == 'true'
run: echo "C:\hostedtoolcache\windows\Babashka\1.3.188\x64" >> $env:GITHUB_PATH
|
@liny01-nbsa Thank you for the report, I will look into it. While I do not use Windows myself, it should work all the same. |
@nha , no, we are using the hosted runner. |
Please give a try to v1.7.0. I should also mention that I am not convinced if caching makes a practical difference here because it usually takes about 3 seconds to run the action without caching. |
@nha , thank you! That is a very interesting point. I don't have access to my workstation now. But from my screenshot, I noticed in about Jan 2024, a non-cached run would take > 1 min. I will test the new version when I got back. |
Oh interesting. Here is a sample run from the https://github.com/turtlequeue/setup-babashka/actions/runs/8510483088/job/23308162033 |
I see that every run of the setup action, bb is downloaded anew. It should be possible to cache it.
Actually looking at DeLaGuardo/[email protected] it seems it does cache it itself:
so perhaps setup-babashka could do the same? 🙏
The text was updated successfully, but these errors were encountered: