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

Add SBT in cache managers. #302

Merged
merged 13 commits into from
Apr 20, 2022
Merged

Add SBT in cache managers. #302

merged 13 commits into from
Apr 20, 2022

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.

src/cache.ts Outdated Show resolved Hide resolved
@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
src/cache.ts Show resolved Hide resolved
@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
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