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

Using integrated cache in actions/setup-java #7002

Merged

Conversation

litetex
Copy link
Member

@litetex litetex commented Aug 28, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Using integrated cache in actions/setup-java instead of specifying it.
See https://github.com/actions/setup-java#caching-gradle-dependencies for details.

Advantages:

  • Results in more compact and easier readable code
  • We don't need to specify/manage the cache ourselves as the action does it automatically

A test of the above can be seen in:

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@litetex litetex marked this pull request as ready for review August 28, 2021 13:58
@TobiGr TobiGr added the CI Everything related to CI (Continuous integration) label Aug 28, 2021
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks :-)

A test of the above can be seen in:

If I understand correctly the first link is the first run, so there is no cache and it takes 5:30min; the second link is the second run, that has the cache from the first one, so it takes 2min less. Am I right?

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

The API 29 test does not seem to benefit from using the cache, but hey, that thing is buggy all the time xD

@Stypox Stypox merged commit 15691ba into TeamNewPipe:dev Aug 31, 2021
@litetex
Copy link
Member Author

litetex commented Aug 31, 2021

@Stypox
Yes this was the cache:
grafik
As seen on the left downloading / setting up until :runCheckstyle is executed takes ~1m 30s while on the right (with cache) it's just ~20s

Should have been the case also before I changed it 😄

@TobiGr
https://github.com/litetex/NewPipe/runs/3450662901?check_suite_focus=true says Cache restored successfully (in step "set up JDK 8") so I guess it worked 😄

@litetex litetex deleted the gh-actions-use-integrated-cache-setup-java branch August 31, 2021 16:31
This was referenced Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Everything related to CI (Continuous integration)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants