This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e6054270254 Refactor : update all maven cache step in
workflows(#21184) (#21196)
e6054270254 is described below
commit e60542702544b3464e468b454228a2ccf8d97eb2
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Mon Sep 26 16:34:36 2022 +0800
Refactor : update all maven cache step in workflows(#21184) (#21196)
---
.github/workflows/checkstyle-and-rat-check.yml | 8 +++++---
.github/workflows/ci-daily.yml | 14 ++++++++++++++
.github/workflows/ci.yml | 2 +-
.github/workflows/docker-per-commit.yaml | 4 ++--
.github/workflows/docker.yml | 5 ++---
.github/workflows/nightlies-rsync.yml | 13 +++++++------
6 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/checkstyle-and-rat-check.yml
b/.github/workflows/checkstyle-and-rat-check.yml
index 13971c1c825..4f7a031a0c6 100644
--- a/.github/workflows/checkstyle-and-rat-check.yml
+++ b/.github/workflows/checkstyle-and-rat-check.yml
@@ -50,11 +50,13 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- - name: Cache dependencies of Checkstyle and Apache Rat
- uses: actions/cache@v3
+ - name: Cache Maven Repos
+ uses: actions/cache@v2
with:
path: ~/.m2/repository
- key: maven-cache-checkstyle-and-apache-rat-${{
hashFiles('**/pom.xml') }}
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
- name: Run Checkstyle
run: ./mvnw checkstyle:check -T1C
- name: Run Apache Rat
diff --git a/.github/workflows/ci-daily.yml b/.github/workflows/ci-daily.yml
index f479b7b9094..24645ff303d 100644
--- a/.github/workflows/ci-daily.yml
+++ b/.github/workflows/ci-daily.yml
@@ -48,6 +48,13 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
+ - name: Cache Maven Repos
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
- name: Build with Maven
run: ./mvnw -B -ntp clean install
- name: Build examples with Maven
@@ -64,6 +71,13 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
+ - name: Cache Maven Repos
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
- name: Build Project
run: ./mvnw -B -ntp clean install -Dmaven.javadoc.skip=true -DskipITs
-DskipTests -Dspotless.apply.skip=true
- name: Run Example generator
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 11cba89639a..2d8cd443521 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -77,7 +77,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.m2/repository
- key: shardingsphere-it-cache-${{ github.sha }}
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
diff --git a/.github/workflows/docker-per-commit.yaml
b/.github/workflows/docker-per-commit.yaml
index c836f956366..655e6c651f6 100644
--- a/.github/workflows/docker-per-commit.yaml
+++ b/.github/workflows/docker-per-commit.yaml
@@ -48,11 +48,11 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
- - name: Cache local Maven repository
+ - name: Cache Maven Repos
uses: actions/cache@v2
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log in to the Container registry
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 3cefc6f11ba..619ca49e5d5 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -45,13 +45,12 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- # build target with maven
+
- name: Cache Maven Repos
uses: actions/cache@v2
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
diff --git a/.github/workflows/nightlies-rsync.yml
b/.github/workflows/nightlies-rsync.yml
index 232eb7e03da..a2d189eadbc 100644
--- a/.github/workflows/nightlies-rsync.yml
+++ b/.github/workflows/nightlies-rsync.yml
@@ -21,6 +21,9 @@ on:
schedule:
- cron: '0 19 */1 * *' # once a day. UTC time
+env:
+ MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.class=standard
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true
-Dmaven.javadoc.skip=true -Djacoco.skip=true -DskipITs -DskipTests
-Dspotless.apply.skip=true
+
jobs:
upload_to_nightlies:
if: (github.repository == 'apache/shardingsphere')
@@ -31,20 +34,18 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ key: shardingsphere-${{ runner.os }}-maven-${{
hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v2
-
- name: Set up JDK 8
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v2
with:
+ distribution: 'temurin'
java-version: 8
-
- name: Build Project
run: |
- ./mvnw -B -Prelease -DskipTests clean install
-
+ ./mvnw -B clean install -Prelease
- name: rsync
uses: burnett01/[email protected]
with: