8000 Add SBT in cache managers. by fmeriaux · Pull Request #302 · actions/setup-java · GitHub
  • [go: up one dir, main page]

    Skip to content

    Conversation

    @fmeriaux
    Copy link
    Contributor

    Description:
    Describe your changes.

    Add SBT cache manager.

    Related issue:
    Add link to the related issue.

    #266 (comment)

    Check list:

    • Mark if documentation changes are required.
    • Mark if tests were added or updated to cover the changes.

    @dmitry-shibanov
    Copy link
    Contributor

    Hello @fmeriaux. Could you please sync with the main branch?

    @fmeriaux fmeriaux requested a review from a team April 4, 2022 13:00
    @fmeriaux
    Copy link
    Contributor Author
    fmeriaux commented Apr 4, 2022

    Hello @fmeriaux. Could you please sync with the main branch?

    Done

    @dmitry-shibanov
    Copy link
    Contributor

    Hello @fmeriaux. Could you please add e2e tests for sbt ?

    @fmeriaux
    Copy link
    Contributor Author
    fmeriaux commented Apr 11, 2022

    Hello @fmeriaux. Could you please add e2e tests for sbt ?

    Yes, no problem, but can you detail a little more what I have to do?

    @dmitry-shibanov
    Copy link
    Contributor

    Hello @fmeriaux. Could you please add e2e tests for sbt ?

    Yes, no problem, but can you detail a little more what I have to do?

    I think it should be something similar to Gradle test.

    @fmeriaux
    Copy link
    Contributor Author

    Hello @fmeriaux. Could you please add e2e tests for sbt ?

    Yes, no problem, but can you detail a little more what I have to do?

    I think it should be something similar to Gradle test.

    Thanks, done !

    @Donnadam
    Copy link
    Donnadam commented Apr 12, 2022 via email

    @fmeriaux
    Copy link
    Contributor Author

    According to https://github.com/coursier/cache-action#path

    Cache should use the default OS-dependent location.

    PR is updated

    @dmitry-shibanov dmitry-shibanov merged commit 0ed94a5 into actions:main Apr 20, 2022
    @fmeriaux fmeriaux deleted the sbt-cache branch April 21, 2022 07:06
    @fmeriaux fmeriaux mentioned this pull request May 25, 2022
    2 tasks
    julienrf added a commit to scalacenter/website that referenced this pull request Jun 28, 2022
    The support of sbt caching has been implement recently in actions/setup-java#302 and actions/setup-java#332 by Florian Meriaux
    dhpiggott added a commit to dhpiggott/helios that referenced this pull request Jul 16, 2022
    dhpiggott added a commit to dhpiggott/helios that referenced this pull request Jul 16, 2022
    dhpiggott added a commit to dhpiggott/helios that referenced this pull request Jul 16, 2022
    rtyley added a commit to guardian/prout that referenced this pull request Dec 11, 2022
    rtyley added a commit to guardian/prout that referenced this pull request Dec 11, 2022
    rtyley added a commit to rtyley/setup-java that referenced this pull request Dec 6, 2023
    …ting it's own version
    
    While working on https://github.com/guardian/gha-scala-library-release-workflow I noticed that no matter how many times I ran the workflow, `actions/setup-java` would always report `sbt cache is not found`, even if there had been no substantial change in the project - simply that `version.sbt` (the file used by https://github.com/sbt/sbt-release) had the version number in it incremented (as in guardian/play-secret-rotation@b215232).
    
    This meant that turning on `cache: sbt` would actually slow the workflow considerably, as it would never benefit from the cache being present, and would always have to save it, which could take 2-3 minutes - even though it can't take advantage of the data it's saving.
    
    As such, it would be great to exclude `version.sbt` files from the cache hash key.
    
    Background: `cache: sbt` was orginally introduced with actions#302
    rtyley added a commit to rtyley/setup-java that referenced this pull request Dec 7, 2023
    …ting it's own version
    
    While working on https://github.com/guardian/gha-scala-library-release-workflow I noticed that no matter how many times I ran the workflow, `actions/setup-java` would always report `sbt cache is not found`, even if there had been no substantial change in the project - simply that `version.sbt` (the file used by https://github.com/sbt/sbt-release) had the version number in it incremented (as in guardian/play-secret-rotation@b215232).
    
    This meant that turning on `cache: sbt` would actually slow the workflow considerably, as it would never benefit from the cache being present, and would always have to save it, which could take 2-3 minutes - even though it can't take advantage of the data it's saving.
    
    As such, it would be great to exclude `version.sbt` files from the cache hash key.
    
    Background: `cache: sbt` was orginally introduced with actions#302
    rtyley added a commit to rtyley/setup-java that referenced this pull request Dec 7, 2023
    …ting it's own version
    
    While working on https://github.com/guardian/gha-scala-library-release-workflow I noticed that no matter how many times I ran the workflow, `actions/setup-java` would always report `sbt cache is not found`, even if there had been no substantial change in the project - simply that `version.sbt` (the file used by https://github.com/sbt/sbt-release) had the version number in it incremented (as in guardian/play-secret-rotation@b215232).
    
    This meant that turning on `cache: sbt` would actually slow the workflow considerably, as it would never benefit from the cache being present, and would always have to save it, which could take 2-3 minutes - even though it can't take advantage of the data it's saving.
    
    As such, it would be great to exclude `version.sbt` files from the cache hash key.
    
    Background: `cache: sbt` was orginally introduced with actions#302
    tdfacer pushed a commit to ifit/setup-java that referenced this pull request Oct 7, 2025
    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

    Successfully merging this pull request may close these issues.

    6 participants

    0