Skip to content
New issue

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

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

Already on GitHub? # to your account

Add built-in use of caching #84

Closed
giltene opened this issue Jul 25, 2020 · 2 comments · May be fixed by Exhorder6/setup-java#5, NOUIY/setup-java#6, NOUIY/setup-java#17, NOUIY/setup-java#25 or NOUIY/setup-java#43
Labels
feature request New feature or request to improve the current logic

Comments

@giltene
Copy link
Contributor

giltene commented Jul 25, 2020

It would be useful for actions/setup-java and to use the same repository cache mechanism used by actions/cache to cache JDKs. This appears to be possible since the addition of https://github.com/actions/toolkit/tree/main/packages/cache in May.

setup-java should still look up the JDK to use (as the JDK determined by a semver spec and other options can change over time, e.g. as new updates get published). Once a specific JDK is determined (e.g. a specific tar.gz or .zip file URI is identified as a key), we can check (and populate) the cache to reuse the actual file hierarchy created for that JDK within that repository's cache across workflow runs. This can likely significantly improve workflow execution times, and bandwidth consumption.

@fl250144
Copy link

Nice sugestion... as said, improve performance. But i have another point, sometimes the download of the JDK fails and the entire build fail cause of it... so for me it will also reduce workflow failure.

@IvanZosimov
Copy link
Contributor

IvanZosimov commented Mar 22, 2023

Hi, 👋 Thank you for this feature request. Currently, only the most popular versions of Temurin JDK are precached on the GA runners, check ubuntu-latest https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#java. If you'd like to use caching with others JDK distributions you can try to set it up in additional step using https://github.com/actions/cache.
I'm going to close this issue right now, if you have any additional question feel free to ask them.

# for free to join this conversation on GitHub. Already have an account? # to comment