From 088bfbb597dc1995ab45117a1d8935b8c1890892 Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 10:52:11 +0900 Subject: [PATCH 1/7] Add 'build' and 'project/build.properties' into cache key of SBT and Zinc --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a3f2fb2ed1491..dfbbf74e4bedd 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -102,7 +102,7 @@ jobs: uses: actions/cache@v1 with: path: build - key: build-${{ hashFiles('**/pom.xml') }} + key: build-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build') }} restore-keys: | build- - name: Cache Maven local repository From cfe5e926c5736d8e4ecc8577cac2bb4a421dc16a Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 13:02:40 +0900 Subject: [PATCH 2/7] Changes in build --- build/mvn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/mvn b/build/mvn index 53a77f6e81f2b..364c33647eb73 100755 --- a/build/mvn +++ b/build/mvn @@ -17,6 +17,8 @@ # limitations under the License. # +# Change in build + # Determine the current working directory _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Preserve the calling directory From 6f78677069bee9847c3064a7b1460f248f44d2ef Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 13:03:10 +0900 Subject: [PATCH 3/7] Revert "Changes in build" This reverts commit cfe5e926c5736d8e4ecc8577cac2bb4a421dc16a. --- build/mvn | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/mvn b/build/mvn index 364c33647eb73..53a77f6e81f2b 100755 --- a/build/mvn +++ b/build/mvn @@ -17,8 +17,6 @@ # limitations under the License. # -# Change in build - # Determine the current working directory _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Preserve the calling directory From 63032daff78ceb8de651fd514339e45bce7b799e Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 13:18:08 +0900 Subject: [PATCH 4/7] Whitelist everything --- .github/workflows/build_and_test.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index dfbbf74e4bedd..bcfa42016804d 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -99,10 +99,20 @@ jobs: run: git merge --progress --ff-only origin/${{ github.event.inputs.target }} # 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 with: - path: build - key: build-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build') }} + path: | + build/apache-maven-* + build/zinc-* + build/scala-* + build/*.jar + key: >- + build-${{ hashFiles('**/pom.xml') }} + -${{ hashFiles('project/build.properties') }} + -${{ hashFiles('build/mvn') }} + -${{ hashFiles('build/sbt') }} + -${{ hashFiles('build/sbt-launch-lib.bash') }} + -${{ hashFiles('build/spark-build-info') }} restore-keys: | build- - name: Cache Maven local repository From 1f4706e0e4c1be0008a797a5c52d01ce1eaea95c Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 13:02:40 +0900 Subject: [PATCH 5/7] Changes in build --- build/mvn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/mvn b/build/mvn index 53a77f6e81f2b..364c33647eb73 100755 --- a/build/mvn +++ b/build/mvn @@ -17,6 +17,8 @@ # limitations under the License. # +# Change in build + # Determine the current working directory _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Preserve the calling directory From 3900892b5b5572bd17953b4a45f823c30a69527d Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 14:14:08 +0900 Subject: [PATCH 6/7] Revert "Changes in build" This reverts commit 1f4706e0e4c1be0008a797a5c52d01ce1eaea95c. --- build/mvn | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/mvn b/build/mvn index 364c33647eb73..53a77f6e81f2b 100755 --- a/build/mvn +++ b/build/mvn @@ -17,8 +17,6 @@ # limitations under the License. # -# Change in build - # Determine the current working directory _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Preserve the calling directory From 42d4e5cf5c2eeed28a7077e57c85f5e38c84c6d1 Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Tue, 25 Aug 2020 14:31:11 +0900 Subject: [PATCH 7/7] Cleaner --- .github/workflows/build_and_test.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index bcfa42016804d..bd8eafa08abe0 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -106,13 +106,7 @@ jobs: build/zinc-* build/scala-* build/*.jar - key: >- - build-${{ hashFiles('**/pom.xml') }} - -${{ hashFiles('project/build.properties') }} - -${{ hashFiles('build/mvn') }} - -${{ hashFiles('build/sbt') }} - -${{ hashFiles('build/sbt-launch-lib.bash') }} - -${{ hashFiles('build/spark-build-info') }} + key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} restore-keys: | build- - name: Cache Maven local repository @@ -126,7 +120,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.ivy2/cache - key: ${{ matrix.java }}-${{ matrix.hadoop }}-ivy-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/plugins.sbt') }} + key: ${{ matrix.java }}-${{ matrix.hadoop }}-ivy-${{ hashFiles('**/pom.xml', '**/plugins.sbt') }} restore-keys: | ${{ matrix.java }}-${{ matrix.hadoop }}-ivy- - name: Install JDK ${{ matrix.java }}