Skip to content

Add built-in use of caching #84

Description

@giltene

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.

Activity

  1. fl250144 commented on Feb 16, 2023

    @fl250144

    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.

  2. IvanZosimov commented on Mar 22, 2023

    @IvanZosimov
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions