You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/04/25 12:19:25 UTC

[servicecomb-java-chassis] branch master updated: [SCB-2463] parallel ci task to speed up ci (#2798)

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 5876fdc64 [SCB-2463] parallel ci task to speed up ci (#2798)
5876fdc64 is described below

commit 5876fdc643c818374c43bcd8d064908de16dd780
Author: ZhangJian He <sh...@gmail.com>
AuthorDate: Mon Apr 25 20:19:20 2022 +0800

    [SCB-2463] parallel ci task to speed up ci (#2798)
---
 .github/workflows/maven.yml     | 29 +++++++++++++++++++++++------
 .github/workflows/rat_check.yml | 40 ++++++++++++++++++++++++++++++++++++++++
 scripts/build.sh                | 41 -----------------------------------------
 3 files changed, 63 insertions(+), 47 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b86bfb6d3..15946bb73 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,5 +1,21 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+#
+# 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: Java CI with Maven
 
@@ -16,10 +32,11 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-    - name: Set up JDK 1.8
-      uses: actions/setup-java@v1
+    - name: Set up jdk
+      uses: actions/setup-java@v2
       with:
-        java-version: 1.8
+        java-version: '8'
+        distribution: 'temurin'
     - uses: actions/cache@v2
       with:
         path: ~/.m2/repository
@@ -27,6 +44,6 @@ jobs:
         restore-keys: |
           ${{ runner.os }}-maven-
     - name: Compilation and Installation
-      run: bash scripts/build.sh install
+      run: mvn clean install -Dspotbugs.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -Pdocker -Pdemo-run-release -Pjacoco -Pit -Pcoverage
     - name: publish coverage report
       run: bash <(curl -s https://codecov.io/bash)
diff --git a/.github/workflows/rat_check.yml b/.github/workflows/rat_check.yml
new file mode 100644
index 000000000..30be65a80
--- /dev/null
+++ b/.github/workflows/rat_check.yml
@@ -0,0 +1,40 @@
+#
+# 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: rat check
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  publish:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up jdk
+        uses: actions/setup-java@v2
+        with:
+          java-version: '8'
+          distribution: 'temurin'
+      - name: rat check
+        run: mvn apache-rat:check -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -Pit,distribution
diff --git a/scripts/build.sh b/scripts/build.sh
deleted file mode 100644
index d5949f1cc..000000000
--- a/scripts/build.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-#bin/sh
-
-## whenever commit to the repository, do Compilation and Installation
-
-if [ "$1" == "install" ]; then
-    mvn apache-rat:check -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -Pit,distribution
-    if [ $? != 0 ]; then
-        echo "${red}Rat check failed.${reset}"
-        exit 1
-    fi
-
-    mvn clean install -Dspotbugs.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -Pdocker -Pdemo-run-release -Pjacoco -Pit -Pcoverage
-    if [ $? == 0 ]; then
-        echo "${green}Installation Success..${reset}"
-    else
-        echo "${red}Installation or Test Cases failed, please check the above logs for more details.${reset}"
-        exit 1
-    fi
-
-    echo "Compilation and Installation Completed"
-else
-    echo "Not Implemented parameter"
-    exit 1
-fi