This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 321281da90 [Chore](Sonar)Set C++ code detection to scheduled scheduling (#24388) 321281da90 is described below commit 321281da9025d91571dcbd990af371327db41443 Author: Calvin Kirs <acm_mas...@163.com> AuthorDate: Thu Sep 14 20:55:35 2023 +0800 [Chore](Sonar)Set C++ code detection to scheduled scheduling (#24388) Set C++ code detection to scheduled scheduling --- .github/workflows/code-checks.yml | 58 +-------------------------------------- .github/workflows/sonarcloud.yml | 57 +++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 58 deletions(-) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 6af66a0b60..6c32e592c7 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -103,60 +103,4 @@ jobs: # clang-tidy review not required now # - if: steps.review.outputs.total_comments > 0 - # run: exit 1 - - sonar-cloud-cpp: - name: "SonarCloud on cpp" - if: ${{ github.event_name == 'pull_request_target' }} - runs-on: ubuntu-22.04 - steps: - - name: Checkout ${{ github.ref }} ( ${{ github.event.pull_request.head.sha }} ) - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - submodules: recursive - - - name: Paths Filter - uses: ./.github/actions/paths-filter - id: filter - with: - filters: | - be_changes: - - 'be/**' - - 'gensrc/proto/**' - - 'gensrc/thrift/**' - - - name: Generate compile_commands.json - if: ${{ steps.filter.outputs.be_changes == 'true' }} - run: | - export DEFAULT_DIR='/opt/doris' - - mkdir "${DEFAULT_DIR}" - wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.18/ldb_toolchain_gen.sh \ - -q -O /tmp/ldb_toolchain_gen.sh - bash /tmp/ldb_toolchain_gen.sh "${DEFAULT_DIR}/ldb-toolchain" - - sudo DEBIAN_FRONTEND=noninteractive apt install --yes tzdata byacc - - pushd thirdparty - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz \ - -o doris-thirdparty-prebuilt-linux-x86_64.tar.xz - tar -xvf doris-thirdparty-prebuilt-linux-x86_64.tar.xz - popd - - export PATH="${DEFAULT_DIR}/ldb-toolchain/bin/:$(pwd)/thirdparty/installed/bin/:${PATH}" - DISABLE_JAVA_UDF=ON DORIS_TOOLCHAIN=clang OUTPUT_BE_BINARY=0 ./build.sh --be - - - name: SonarCloud Scan - if: ${{ steps.filter.outputs.be_changes == 'true' }} - uses: sonarsource/sonarcloud-github-action@master - with: - projectBaseDir: be - args: > - -Dsonar.host.url=https://sonarcloud.io - -Dsonar.organization=apache - -Dsonar.projectKey=apache_incubator-doris - -Dsonar.cfamily.compile-commands=be/build_Release/compile_commands.json - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # run: exit 1 \ No newline at end of file diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 7b89e198e9..de185338d4 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -22,7 +22,7 @@ on: - cron: '30 3,14 * * *' jobs: - build: + sonar-cloud-java: name: Build runs-on: ubuntu-latest env: @@ -85,3 +85,58 @@ jobs: run: | cd fe mvn --batch-mode verify sonar:sonar -DskipTests -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-doris -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + sonar-cloud-cpp: + name: "SonarCloud on cpp" + if: ${{ github.event_name == 'pull_request_target' }} + runs-on: ubuntu-22.04 + steps: + - name: Checkout ${{ github.ref }} ( ${{ github.event.pull_request.head.sha }} ) + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + submodules: recursive + + - name: Paths Filter + uses: ./.github/actions/paths-filter + id: filter + with: + filters: | + be_changes: + - 'be/**' + - 'gensrc/proto/**' + - 'gensrc/thrift/**' + + - name: Generate compile_commands.json + if: ${{ steps.filter.outputs.be_changes == 'true' }} + run: | + export DEFAULT_DIR='/opt/doris' + + mkdir "${DEFAULT_DIR}" + wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.18/ldb_toolchain_gen.sh \ + -q -O /tmp/ldb_toolchain_gen.sh + bash /tmp/ldb_toolchain_gen.sh "${DEFAULT_DIR}/ldb-toolchain" + + sudo DEBIAN_FRONTEND=noninteractive apt install --yes tzdata byacc + + pushd thirdparty + curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz \ + -o doris-thirdparty-prebuilt-linux-x86_64.tar.xz + tar -xvf doris-thirdparty-prebuilt-linux-x86_64.tar.xz + popd + + export PATH="${DEFAULT_DIR}/ldb-toolchain/bin/:$(pwd)/thirdparty/installed/bin/:${PATH}" + DISABLE_JAVA_UDF=ON ENABLE_PCH=OFF DORIS_TOOLCHAIN=clang OUTPUT_BE_BINARY=0 ./build.sh --be + + - name: SonarCloud Scan + if: ${{ steps.filter.outputs.be_changes == 'true' }} + uses: sonarsource/sonarcloud-github-action@master + with: + projectBaseDir: be + args: > + -Dsonar.host.url=https://sonarcloud.io + -Dsonar.organization=apache + -Dsonar.projectKey=apache_incubator-doris + -Dsonar.cfamily.compile-commands=be/build_Release/compile_commands.json + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org