Skip to content

Commit

Permalink
extract cache-engine-archives action and cache engine archives
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 committed Feb 17, 2023
1 parent 6688b3d commit c654279
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/actions/cache-engine-archives/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#

name: cache-engine-archives
description: 'Cache download engine archives from Apache Archives website used by Maven download plugin'
runs:
using: composite
steps:
- name: Cache Engine Archives
uses: actions/cache@v3
with:
path: /tmp/engine-archives
key: engine-archives
14 changes: 13 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ concurrency:
cancel-in-progress: true

env:
MVN_OPT: -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Pjdbc-shaded
MVN_OPT: -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Pjdbc-shaded -Dmaven.plugin.download.cache.path=/tmp/engine-archives
KUBERNETES_VERSION: v1.26.1
MINIKUBE_VERSION: v1.29.0

Expand All @@ -56,11 +56,13 @@ jobs:
include:
- java: 8
spark: '3.3'
spark-archive-version: '3.1.3'
spark-archive: '-Dspark.archive.mirror=https://archive.apache.org/dist/spark/spark-3.1.3 -Dspark.archive.name=spark-3.1.3-bin-hadoop3.2.tgz'
exclude-tags: '-Dmaven.plugin.scalatest.exclude.tags=org.scalatest.tags.Slow,org.apache.kyuubi.tags.DeltaTest,org.apache.kyuubi.tags.HudiTest,org.apache.kyuubi.tags.IcebergTest'
comment: 'verify-on-spark-3.1-binary'
- java: 8
spark: '3.3'
spark-archive-version: '3.2.3'
spark-archive: '-Dspark.archive.mirror=https://archive.apache.org/dist/spark/spark-3.2.3 -Dspark.archive.name=spark-3.2.3-bin-hadoop3.2.tgz'
exclude-tags: '-Dmaven.plugin.scalatest.exclude.tags=org.scalatest.tags.Slow,org.apache.kyuubi.tags.DeltaTest,org.apache.kyuubi.tags.HudiTest,org.apache.kyuubi.tags.IcebergTest'
comment: 'verify-on-spark-3.2-binary'
Expand All @@ -77,6 +79,9 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
if: matrix.spark-archive != ''
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -161,10 +166,12 @@ jobs:
include:
- java: 8
flink: '1.16'
flink-archive-version: '1.14.6'
flink-archive: '-Dflink.archive.mirror=https://archive.apache.org/dist/flink/flink-1.14.6 -Dflink.archive.name=flink-1.14.6-bin-scala_2.12.tgz'
comment: 'verify-on-flink-1.14-binary'
- java: 8
flink: '1.16'
flink-archive-version: '1.15.3'
flink-archive: '-Dflink.archive.mirror=https://archive.apache.org/dist/flink/flink-1.15.3 -Dflink.archive.name=flink-1.15.3-bin-scala_2.12.tgz'
comment: 'verify-on-flink-1.15-binary'
steps:
Expand All @@ -178,6 +185,9 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
if: matrix.flink-archive != ''
- name: Build Flink with maven w/o linters
run: |
TEST_MODULES="externals/kyuubi-flink-sql-engine,integration-tests/kyuubi-flink-it"
Expand Down Expand Up @@ -222,6 +232,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build and test Hive with maven w/o linters
run: |
TEST_MODULES="externals/kyuubi-hive-sql-engine,integration-tests/kyuubi-hive-it"
Expand Down
1 change: 1 addition & 0 deletions externals/kyuubi-download/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<configuration>
<cacheDirectory>${maven.plugin.download.cache.path}</cacheDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
<readTimeOut>60000</readTimeOut>
<retries>3</retries>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@

<maven.plugin.build.helper.version>3.3.0</maven.plugin.build.helper.version>
<maven.plugin.download.version>1.6.6</maven.plugin.download.version>
<maven.plugin.download.cache.path></maven.plugin.download.cache.path>
<maven.plugin.enforcer.mojo.rules.version>1.6.1</maven.plugin.enforcer.mojo.rules.version>
<maven.plugin.scala.version>4.8.0</maven.plugin.scala.version>
<maven.plugin.surefire.version>3.0.0-M8</maven.plugin.surefire.version>
Expand Down

0 comments on commit c654279

Please sign in to comment.