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

Force colocated Gradle home with project dir due to external resource relative path constraint #770

Merged
merged 1 commit into from
May 5, 2023

Conversation

jrodbx
Copy link
Collaborator

@jrodbx jrodbx commented May 5, 2023

Part of #524

cc @kevinzheng-ap

Q: Why does Gradle cache go to C: while git does to D:?

A: According to https://github.com/actions/checkout

    # Relative path under $GITHUB_WORKSPACE to place the repository
    path: ''

in Github Actions yml:

    steps:
      - name: Echo envvars
        run: env
GITHUB_WORKSPACE=D:\a\paparazzi\paparazzi
Restore Gradle state from cache
  Received 117231600 of 117231600 (100.0%), 130.6 MBs/sec
  Cache Size: ~112 MB (117231600 B)
  "C:\Program Files\Git\usr\bin\tar.exe" -xf D:/a/_temp/c96358d7-feb9-49ca-b77f-16bc580e282f/cache.tzst -P -C D:/a/paparazzi/paparazzi --force-local --use-compress-program "zstd -d"
  Cache restored successfully
  Restored Gradle User Home from cache key: v7-gradle|Windows|build[43ab0e1a05934a87a85af6ae78be82bc]-864ae2f624330f224d5620539e20ac8ca1bddcb1
  Received 24560 of 24560 (100.0%), 0.3 MBs/sec
  Cache Size: ~0 MB (24560 B)
  "C:\Program Files\Git\usr\bin\tar.exe" -xf D:/a/_temp/d893dffd-b090-49f7-b98f-82c26d607026/cache.tzst -P -C D:/a/paparazzi/paparazzi --force-local --use-compress-program "zstd -d"
  Cache restored successfully
  Restored generated-gradle-jars with key generated-gradle-jars-631b98c57f67cf849e2976089ce526c6 to C:\Users\runneradmin\.gradle\caches\7.6\generated-gradle-jars\gradle-test-kit-7.6.jar

According to https://github.com/gradle/gradle-build-action

https://github.com/gradle/gradle-build-action/blob/d23c38fad3e837961b39af2b98b046694927aca4/src/setup-gradle.ts#L71-L77

HOME=C:\Users\runneradmin

GRADLE_USER_HOME
Specifies the Gradle user home directory (which defaults to /.gradle if not set).

Copy link
Collaborator

@kevinzheng-ap kevinzheng-ap left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix

@jrodbx jrodbx merged commit 6ee3ae5 into master May 5, 2023
@jrodbx jrodbx deleted the jrod/2023-05-05/gradle-cache-colocation branch May 5, 2023 09:38
@jrodbx jrodbx mentioned this pull request Jul 8, 2023
@TWiStErRob
Copy link
Contributor

Reverted in #792

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.

None yet

4 participants