You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/12/15 05:28:19 UTC

[incubator-doris] branch master updated: [chore][community](github) Remove travis and add github action (#7380)

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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c8bc0cf  [chore][community](github) Remove travis and add github action (#7380)
c8bc0cf is described below

commit c8bc0cf5230063c74dbaa98bf3f1acbe06e7126a
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Wed Dec 15 13:27:37 2021 +0800

    [chore][community](github) Remove travis and add github action (#7380)
    
    1. Remove travis
    2. Add github action to build extension:
        1. docs
        2. fs_broker
        3. flink/spark/connector
---
 .github/workflows/build-extension.yml    | 74 ++++++++++++++++++++++++++++++++
 .github/workflows/clang-format.yml       |  2 +-
 .travis.yml                              | 56 ------------------------
 extension/flink-doris-connector/build.sh |  2 +
 extension/flink-doris-connector/pom.xml  |  3 +-
 extension/spark-doris-connector/build.sh |  3 +-
 6 files changed, 80 insertions(+), 60 deletions(-)

diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml
new file mode 100644
index 0000000..cd00f0d
--- /dev/null
+++ b/.github/workflows/build-extension.yml
@@ -0,0 +1,74 @@
+# 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: Build Extensions
+on:
+  pull_request:
+  push:
+
+jobs:
+  build-extension:
+    name: "Build Extensions"
+    runs-on: ubuntu-latest
+    defaults:
+      run:
+        shell: bash
+    steps:
+    - name: Checkout
+      uses: actions/checkout@master
+
+    - name: Setup Node.js
+      uses: actions/setup-node@v1
+      with:
+        node-version: 14.16.1
+
+    - name: Setup java
+      uses: actions/setup-java@v2
+      with:
+        distribution: adopt
+        java-version: '8'
+
+    - name: Setup thrift
+      run: |
+        sudo apt-get update
+        sudo DEBIAN_FRONTEND=noninteractive apt-get install -y thrift-compiler=0.13.0-2build2
+        thrift --version
+        mkdir -p thirdparty/installed/bin/
+        cd thirdparty/installed/bin/ && ln -s /usr/bin/thrift thrift
+
+    - name: Build broker
+      run: |
+        cd fs_brokers/apache_hdfs_broker/ && /bin/bash build.sh
+
+    - name: Build spark connector v2
+      run: |
+        thrift --version
+        cd extension/spark-doris-connector/ && /bin/bash build.sh 2
+
+    - name: Build spark connector v3
+      run: |
+        cd extension/spark-doris-connector/ && /bin/bash build.sh 3
+
+    - name: Build flink connector
+      run: |
+        cd extension/flink-doris-connector/ && /bin/bash build.sh
+
+    - name: Build docs
+      run: |
+        cd docs && npm install && npm run build
+
diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml
index eafd2ab..4c1afd5 100644
--- a/.github/workflows/clang-format.yml
+++ b/.github/workflows/clang-format.yml
@@ -18,7 +18,7 @@
 
 ---
 name: BE Code Formatter
-on: pull_request
+on: workflow_dispatch
 jobs:
   clang-format:
     name: "Clang Formatter"
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 334615b..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,56 +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.
-
-language: node_js
-# nodejs版本
-node_js: 
-    - '14'
-
-# Travis-CI Caching
-cache:
-  directories:
-    - docs/node_modules
-
-
-# S: Build Lifecycle
-install:
-  - cd docs && npm install
-
-before_script:
-  - export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
-  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
-  - find ./ -name "*.md" -exec sed -i -e 's/!\[\(.*\)\][(]\(.*\)[)]/<img \:src=\"$withBase\('\''\2'\''\)\" alt=\"\1\">/g' {} \;
-  - rm -rf site-repo
-  
-script:
-  - travis_wait 30 npm run build
-
-after_success:
-  - if [ "$TRAVIS_EVENT_TYPE" != "push" ]; then exit 0; fi
-  - git config user.name "${GIT_NAME}"
-  - git config user.email "${GIT_EMAIL}"
-  - git clone https://${SITE_REPO} site-repo
-  - cd site-repo
-  - git checkout ${SITE_BRANCH}
-  - mkdir -p ${BRANCH} && rm -rf ${BRANCH}/*
-  - cp -r ../.vuepress/dist/* ./${BRANCH}/
-  - git add .
-  - git commit -am "Auto Build"
-  - git push --verbose "https://${SITE_PUSH_TOKEN}@${SITE_REPO}" ${SITE_BRANCH}:${SITE_BRANCH}
-
-branches:
-  only:
-    - master
-    - /^branch-.*$/
diff --git a/extension/flink-doris-connector/build.sh b/extension/flink-doris-connector/build.sh
index 3be10a0..e66a654 100644
--- a/extension/flink-doris-connector/build.sh
+++ b/extension/flink-doris-connector/build.sh
@@ -30,6 +30,8 @@ ROOT=`cd "$ROOT"; pwd`
 
 export DORIS_HOME=${ROOT}/../../
 
+. ${DORIS_HOME}/env.sh
+
 # include custom environment variables
 if [[ -f ${DORIS_HOME}/custom_env.sh ]]; then
     . ${DORIS_HOME}/custom_env.sh
diff --git a/extension/flink-doris-connector/pom.xml b/extension/flink-doris-connector/pom.xml
index 3cdd0db..967d51d 100644
--- a/extension/flink-doris-connector/pom.xml
+++ b/extension/flink-doris-connector/pom.xml
@@ -37,8 +37,7 @@ under the License.
         <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
         <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <doris.home>${basedir}/../../</doris.home>
-        <doris.thirdparty>${basedir}/../../thirdparty</doris.thirdparty>
+        <doris.thirdparty>${env.DORIS_THIRDPARTY}</doris.thirdparty>
     </properties>
 
     <profiles>
diff --git a/extension/spark-doris-connector/build.sh b/extension/spark-doris-connector/build.sh
index 64970e6..9fe907c 100755
--- a/extension/spark-doris-connector/build.sh
+++ b/extension/spark-doris-connector/build.sh
@@ -28,10 +28,11 @@ set -eo pipefail
 ROOT=`dirname "$0"`
 ROOT=`cd "$ROOT"; pwd`
 
-
 export DORIS_HOME=${ROOT}/../../
 export PATH=${DORIS_THIRDPARTY}/installed/bin:$PATH
 
+. ${DORIS_HOME}/env.sh
+
 # include custom environment variables
 if [[ -f ${DORIS_HOME}/custom_env.sh ]]; then
     . ${DORIS_HOME}/custom_env.sh

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org