You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by wa...@apache.org on 2022/09/08 12:10:05 UTC
[incubator-pegasus] branch master updated: chore(CI): Lint and build all projects regularlly (#1142)
This is an automated email from the ASF dual-hosted git repository.
wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new ccde4bf5b chore(CI): Lint and build all projects regularlly (#1142)
ccde4bf5b is described below
commit ccde4bf5bacfd5cdae69d79ff294aa21222cf3b0
Author: Yingchun Lai <la...@apache.org>
AuthorDate: Thu Sep 8 20:09:59 2022 +0800
chore(CI): Lint and build all projects regularlly (#1142)
---
.github/workflows/pegasus-regular-build.yml | 75 -------------
.github/workflows/regular-build.yml | 163 ++++++++++++++++++++++++++++
java-client/pom.xml | 7 +-
3 files changed, 167 insertions(+), 78 deletions(-)
diff --git a/.github/workflows/pegasus-regular-build.yml b/.github/workflows/pegasus-regular-build.yml
deleted file mode 100644
index f192a468a..000000000
--- a/.github/workflows/pegasus-regular-build.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# 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: BuildPegasusRegularly - build pegasus and rdsn on different env every day
-
-on:
- push:
- paths:
- - '.github/workflows/pegasus-regular-build.yml'
-
- # for manually triggering workflow
- workflow_dispatch:
-
- # run for every day 2am UTC+8(Beijing)
- schedule:
- - cron: '0 18 */1 * *'
-
-jobs:
- build_docker_images:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- os:
- - ubuntu1604
- - ubuntu1804
- - ubuntu2004
- - centos6
- - centos7
- compiler-family:
- - gcc
- include:
- - compiler-family: clang
- compiler: "clang-10,clang++-10"
- os: ubuntu2004
- - compiler-family: clang
- compiler: "clang-9,clang++-9"
- os: ubuntu1804
- container:
- image: apache/pegasus:thirdparties-bin-${{ matrix.os }}-${{ github.ref_name }}
- defaults:
- run:
- working-directory: /root/incubator-pegasus
- steps:
- - name: Clone Apache Pegasus Source
- working-directory: /root
- run: |
- git clone -b ${{ github.ref_name }} --depth=1 https://github.com/apache/incubator-pegasus.git
- cd incubator-pegasus
- - name: Unpack prebuilt third-parties
- run: unzip /root/thirdparties-bin.zip -d ./thirdparty
- - name: Compilation pegasus on GCC
- if: ${{ matrix.compiler-family == 'gcc' }}
- run: ./run.sh build -c --skip_thirdparty
- - name: Compilation pegasus on Clang
- if: ${{ matrix.compiler-family == 'clang' }}
- env:
- COMPILER: ${{ matrix.compiler }}
- run: ./run.sh build --compiler $COMPILER --skip_thirdparty
- - name: Packaging Server
- run: ./run.sh pack_server
diff --git a/.github/workflows/regular-build.yml b/.github/workflows/regular-build.yml
new file mode 100644
index 000000000..dba2dd4bc
--- /dev/null
+++ b/.github/workflows/regular-build.yml
@@ -0,0 +1,163 @@
+# 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: Lint and build regularly
+
+on:
+ pull_request:
+ types: [ synchronize, opened, reopened ]
+ paths:
+ - '.github/workflows/regular-build.yml'
+
+ push:
+ paths:
+ - '.github/workflows/regular-build.yml'
+
+ # for manually triggering workflow
+ workflow_dispatch:
+
+ # run for every day 2am UTC+8(Beijing)
+ schedule:
+ - cron: '0 18 */1 * *'
+
+jobs:
+ lint_cpp:
+ name: Lint Cpp
+ runs-on: ubuntu-latest
+ container:
+ image: apache/pegasus:clang-format-3.9
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+ submodules: true
+ - name: clang-format
+ run: ./scripts/run-clang-format.py --clang-format-executable clang-format-3.9 -e ./src/shell/linenoise -e ./src/shell/sds -e ./thirdparty -r .
+
+ build_cpp:
+ name: Build Cpp
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu1604
+ - ubuntu1804
+ - ubuntu2004
+ - centos6
+ - centos7
+ compiler-family:
+ - gcc
+ include:
+ - compiler-family: clang
+ compiler: "clang-10,clang++-10"
+ os: ubuntu2004
+ - compiler-family: clang
+ compiler: "clang-9,clang++-9"
+ os: ubuntu1804
+ container:
+ image: apache/pegasus:thirdparties-bin-${{ matrix.os }}-${{ github.base_ref }}
+ defaults:
+ run:
+ working-directory: /root/incubator-pegasus
+ steps:
+ - name: Clone Apache Pegasus Source
+ working-directory: /root
+ run: |
+ git clone -b ${{ github.base_ref }} --depth=1 https://github.com/apache/incubator-pegasus.git
+ cd incubator-pegasus
+ - name: Unpack prebuilt third-parties
+ run: unzip /root/thirdparties-bin.zip -d ./thirdparty
+ - name: Compilation Pegasus on GCC
+ if: ${{ matrix.compiler-family == 'gcc' }}
+ run: ./run.sh build -c --skip_thirdparty
+ - name: Compilation Pegasus on Clang
+ if: ${{ matrix.compiler-family == 'clang' }}
+ env:
+ COMPILER: ${{ matrix.compiler }}
+ run: ./run.sh build --test --compiler $COMPILER --skip_thirdparty -j $(nproc)
+ - name: Packaging Server
+ run: ./run.sh pack_server
+
+ lint_go:
+ name: Lint Golang
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+ - name: go-client
+ uses: golangci/golangci-lint-action@v3
+ with:
+ version: v1.29
+ working-directory: ./go-client
+ - name: admin-cli
+ uses: golangci/golangci-lint-action@v3
+ with:
+ version: v1.29
+ working-directory: ./admin-cli
+ - name: pegic
+ uses: golangci/golangci-lint-action@v3
+ with:
+ version: v1.29
+ working-directory: ./pegic
+
+ build_go:
+ name: Build Golang
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Set up Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.14
+ - name: Build go-client
+ run: make
+ working-directory: ./go-client
+ - name: Build admin-cli
+ run: make
+ working-directory: ./admin-cli
+ - name: Build pegic
+ run: make
+ working-directory: ./pegic
+
+ build_java:
+ name: Build Java
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ '8', '11']
+ steps:
+ - uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Build
+ working-directory: ./java-client
+ run: |
+ cd idl && bash recompile_thrift.sh && cd -
+ mvn spotless:apply
+ mvn clean package -DskipTests
diff --git a/java-client/pom.xml b/java-client/pom.xml
index c928bfb7d..9d5a5d7b4 100644
--- a/java-client/pom.xml
+++ b/java-client/pom.xml
@@ -330,12 +330,13 @@
</execution>
</executions>
</plugin>
+ <!--
+ TODO(yingchun): we have to fix the issues reported by spotbugs
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.0.0</version>
<dependencies>
- <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
@@ -343,7 +344,7 @@
</dependency>
</dependencies>
<configuration>
- <excludeFilterFile>dev-support/findbugs-exclude.xml</excludeFilterFile>-->
+ <excludeFilterFile>dev-support/findbugs-exclude.xml</excludeFilterFile>
</configuration>
<executions>
<execution>
@@ -355,7 +356,7 @@
</execution>
</executions>
</plugin>
-
+ -->
<!--License Maven Plugin
mycila/license-maven-plugin provides a stricter license check compared to apache-rat.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org