-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache dependencies for scala 2.13 [skip ci] (#11231)
* add cache dependencies step for scala 213 Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> * add populate script Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> * move yml Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> * fix error of script shell Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> * hardcode buildvers Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> * Update .github/workflows/mvn-verify-check.yml for extra new line Co-authored-by: Gera Shegalov <gshegalov@nvidia.com> * Update .github/workflows/mvn-verify-check.yml for extra new line Co-authored-by: Gera Shegalov <gshegalov@nvidia.com> * Update .github/workflows/mvn-verify-check.yml to differentiate the cache key cleart Co-authored-by: Gera Shegalov <gshegalov@nvidia.com> * fix nit Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> --------- Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com> Co-authored-by: Peixin <pxli@nyu.edu> Co-authored-by: Gera Shegalov <gshegalov@nvidia.com>
- Loading branch information
1 parent
5be4bd5
commit 6d65548
Showing
2 changed files
with
90 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
.github/workflows/mvn-verify-check/populate-daily-cache.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -x | ||
max_retry=3; delay=30; i=1 | ||
if [[ $SCALA_VER == '2.12' ]]; then | ||
pom='pom.xml' | ||
elif [[ $SCALA_VER == '2.13' ]]; then | ||
pom='scala2.13/pom.xml' | ||
fi | ||
while true; do | ||
{ | ||
mvn $COMMON_MVN_FLAGS --file $pom help:evaluate -pl dist \ | ||
-Dexpression=included_buildvers \ | ||
-DforceStdout -PnoSnapshots -q | tr -d ',' | \ | ||
xargs -n 1 -I {} bash -c \ | ||
"mvn $COMMON_MVN_FLAGS --file $pom -Dbuildver={} de.qaware.maven:go-offline-maven-plugin:resolve-dependencies" | ||
|
||
# compile base versions to cache scala compiler and compiler bridge | ||
mvn $COMMON_MVN_FLAGS --file $pom \ | ||
process-test-resources -pl sql-plugin-api -am | ||
} && break || { | ||
if [[ $i -le $max_retry ]]; then | ||
echo "mvn command failed. Retry $i/$max_retry."; ((i++)); sleep $delay; ((delay=delay*2)) | ||
else | ||
echo "mvn command failed. Exit 1"; exit 1 | ||
fi | ||
} | ||
done |