You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by zh...@apache.org on 2023/02/14 10:53:46 UTC

[rocketmq] 08/10: improve performance

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

zhouxzhan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit eaf3b9f557c1d19cbfa1417b9a01e01445d4b0ff
Author: wangtong.wt <wa...@alibaba-inc.com>
AuthorDate: Fri Feb 10 14:06:58 2023 +0800

    improve performance
---
 .github/workflows/pr-ci.yml       | 43 +++----------------------------
 .github/workflows/pr-e2e-test.yml | 11 ++++++--
 .github/workflows/push-ci.yml     | 54 ++++++++-------------------------------
 3 files changed, 22 insertions(+), 86 deletions(-)

diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml
index 396399fb7..ef2db755d 100644
--- a/.github/workflows/pr-ci.yml
+++ b/.github/workflows/pr-ci.yml
@@ -2,48 +2,11 @@ name: PR-CI
 
 on:
   pull_request:
+    types: [opened, reopened, synchronize]
 
 jobs:
-  unit-test:
-    if: always()
-    name: Unit test
-    runs-on: ${{ matrix.os }}-latest
-    timeout-minutes: 30
-    strategy:
-      matrix:
-        os: [ubuntu, macos, windows]
-        java-version: [8]
-        include:
-          - os: ubuntu
-            java-version: 11
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          submodules: true
-      - name: Cache maven repository
-        uses: actions/cache@v3
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: ${{ runner.os }}-maven-
-      - uses: actions/setup-java@v3
-        with:
-          java-version: ${{ matrix.java-version }}
-          distribution: adopt
-      - name: Generate coverage report
-        run: |
-          cd broker
-          mvn -B test --file pom.xml
-      - name: Publish Test Report
-        uses: mikepenz/action-junit-report@v3
-        if: always() # always run even if the previous step fails
-        with:
-          report_paths: '**/surefire-reports/TEST-*.xml'
-          annotate_only: true
   dist-tar:
-    if: ${{ success() }}
-    name: Build dist tar
-    needs: [unit-test]
+    name: Build distribution tar
     runs-on: ubuntu-latest
     timeout-minutes: 120
     steps:
@@ -57,7 +20,7 @@ jobs:
           cache: "maven"
       - name: Build distribution tar
         run: |
-          mvn -Prelease-all -DskipTests clean install -U
+          mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
       - uses: actions/upload-artifact@v3
         name: Upload distribution tar
         with:
diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml
index e2c7e06b7..7530a2372 100644
--- a/.github/workflows/pr-e2e-test.yml
+++ b/.github/workflows/pr-e2e-test.yml
@@ -47,7 +47,7 @@ jobs:
           ls
       - uses: actions/checkout@v3
         with:
-          repository: cryptoya/rocketmq-docker.git
+          repository: apache/rocketmq-docker.git
           ref: master
           path: rocketmq-docker
       - name: Build and save docker images
@@ -102,7 +102,7 @@ jobs:
           test-version: "${{ matrix.version }}"
           docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
           docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
-          chart-git: "https://ghproxy.com/https://github.com/cryptoya/rocketmq-docker.git"
+          chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
           chart-branch: "master"
           chart-path: "./rocketmq-k8s-helm"
           job-id: ${{ strategy.job-index }}
@@ -136,6 +136,13 @@ jobs:
           annotate_only: true
           include_passed: true
           detailed_summary: true
+      - uses: actions/upload-artifact@v3
+        if: always()
+        name: Upload test log
+        with:
+          name: testlog.txt
+          path: testlog.txt
+
 
   clean:
     if: always()
diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml
index c23db0c93..fd3483ed0 100644
--- a/.github/workflows/push-ci.yml
+++ b/.github/workflows/push-ci.yml
@@ -2,59 +2,19 @@ name: PUSH-CI
 
 on:
   push:
+    branches: [master, develop]
   #schedule:
   #  - cron: "0 18 * * *" # TimeZone: UTC 0
 
 concurrency:
   group: rocketmq-${{ github.ref }}
-  cancel-in-progress: true
 
 env:
   MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
   
 jobs:
-  unit-test:
-    if: always()
-    name: Unit test
-    # needs: []
-    runs-on: ${{ matrix.os }}-latest
-    timeout-minutes: 30
-    strategy:
-      matrix:
-        os: [ubuntu, macos, windows]
-        java-version: [8]
-        include:
-          - os: ubuntu
-            java-version: 11
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          submodules: true
-      - name: Cache maven repository
-        uses: actions/cache@v3
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: ${{ runner.os }}-maven-
-      - uses: actions/setup-java@v3
-        with:
-          java-version: ${{ matrix.java-version }}
-          distribution: adopt
-      - name: Build and test
-        run: |
-          cd broker
-          mvn -B test --file pom.xml
-      - name: Publish Test Report
-        uses: mikepenz/action-junit-report@v3
-        if: always() # always run even if the previous step fails
-        with:
-          report_paths: '**/surefire-reports/TEST-*.xml'
-          annotate_only: true
-            
   dist-tar:
-    if: ${{ success() }}
     name: Build dist tar
-    needs: [unit-test]
     runs-on: ubuntu-latest
     timeout-minutes: 30
     steps:
@@ -68,7 +28,7 @@ jobs:
           cache: "maven"
       - name: Build distribution tar
         run: |
-          mvn -Prelease-all -DskipTests clean install -U
+          mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
       - uses: actions/upload-artifact@v3
         name: Upload distribution tar
         with:
@@ -149,7 +109,7 @@ jobs:
           test-version: "${{ matrix.version }}"
           docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
           docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
-          chart-git: "https://ghproxy.com/https://github.com/cryptoya/rocketmq-docker.git"
+          chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
           chart-branch: "master"
           chart-path: "./rocketmq-k8s-helm"
           job-id: ${{ strategy.job-index }}
@@ -173,7 +133,7 @@ jobs:
           test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git"
           test-code-branch: "master"
           test-code-path: java/e2e
-          test-cmd: "mvn -B test"
+          test-cmd: "mvn -B test -Djunit.jupiter.execution.parallel.config.dynamic.factor=2"
           job-id: ${{ strategy.job-index }}
       - name: Publish Test Report
         uses: mikepenz/action-junit-report@v3
@@ -183,6 +143,12 @@ jobs:
           annotate_only: true
           include_passed: true
           detailed_summary: true
+      - uses: actions/upload-artifact@v3
+        if: always()
+        name: Upload test log
+        with:
+          name: testlog.txt
+          path: testlog.txt
 
   clean:
     if: always()