[SPARK-32695][INFRA] Explicitly cache and hash 'build' directly in GitHub Actions#29536
[SPARK-32695][INFRA] Explicitly cache and hash 'build' directly in GitHub Actions#29536HyukjinKwon wants to merge 7 commits intoapache:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This reverts commit cfe5e92.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit 1f4706e.
This comment has been minimized.
This comment has been minimized.
|
cc @dongjoon-hyun and @gengliangwang can you take a look when you're available? |
|
Test build #127872 has finished for PR 29536 at commit
|
| # Cache local repositories. Note that GitHub Actions cache has a 2G limit. | ||
| - name: Cache Scala, SBT, Maven and Zinc | ||
| uses: actions/cache@v1 | ||
| uses: actions/cache@v2 |
There was a problem hiding this comment.
why is the difference between v1 and v2?
There was a problem hiding this comment.
In order to allow multiple file path (https://github.com/actions/cache#whats-new). It is also to make it consistent in this file. cache@v2 is used in all places at this file except here.
There was a problem hiding this comment.
Previously, other files like build/mvn and build/sbt are also cached and overwritten. So, when you have some changes there, they are ignored.
| build/zinc-* | ||
| build/scala-* | ||
| build/*.jar | ||
| key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} |
There was a problem hiding this comment.
(Ah, I see. glob patterns like build/*' cannot be used in hashFilesnow...)
|
Looked around the GH actions docs and this update looks resonable to me. |
|
Thanks @maropu and @gengliangwang! |
|
Merged to master. branch-3.0 and branch-2.4. |
…tHub Actions ### What changes were proposed in this pull request? This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment) Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored. ### Why are the changes needed? To make GitHub Actions build stable. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? The builds in this PR test it out. Closes #29536 from HyukjinKwon/SPARK-32695. Authored-by: HyukjinKwon <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit b07e742) Signed-off-by: HyukjinKwon <[email protected]>
…tHub Actions ### What changes were proposed in this pull request? This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment) Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored. ### Why are the changes needed? To make GitHub Actions build stable. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? The builds in this PR test it out. Closes #29536 from HyukjinKwon/SPARK-32695. Authored-by: HyukjinKwon <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit b07e742) Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting
builddirectory. See also #29286 (comment)Previously, other files like
build/mvnandbuild/sbtare also cached and overwritten. So, when you have some changes there, they are ignored.Why are the changes needed?
To make GitHub Actions build stable.
Does this PR introduce any user-facing change?
No, dev-only.
How was this patch tested?
The builds in this PR test it out.