From 5ba2a19cd28afa0239fb447281e32a045b611a77 Mon Sep 17 00:00:00 2001 From: Pxl Date: Fri, 15 Sep 2023 14:55:36 +0800 Subject: [PATCH] [Chore](check) change sonarcloud github action to c/cpp action (#24433) change sonarcloud github action to c/cpp action --- .github/actions/sonarcloud-github-action | 1 - .github/workflows/sonarcloud.yml | 22 ++++++++++++---------- .gitmodules | 3 --- 3 files changed, 12 insertions(+), 14 deletions(-) delete mode 160000 .github/actions/sonarcloud-github-action diff --git a/.github/actions/sonarcloud-github-action b/.github/actions/sonarcloud-github-action deleted file mode 160000 index c25d2e7e3d..0000000000 --- a/.github/actions/sonarcloud-github-action +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c25d2e7e3def96d0d1781000d3c429da22cd6252 diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index e5b732492d..152cf461d0 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -21,7 +21,7 @@ on: [push] jobs: sonar-cloud-java: - name: Build + name: "SonarCloud on java" runs-on: ubuntu-latest env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed @@ -145,16 +145,18 @@ jobs: 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 + - name: Install sonar-scanner and build-wrapper + if: ${{ steps.filter.outputs.be_changes == 'true' }} + uses: sonarsource/sonarcloud-github-c-cpp@v2 + + - name: Run sonar-scanner 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: sonar-scanner \ + --define sonar.cfamily.compile-commands=be/build_Release/compile_commands.json \ + --define sonar.organization=apache \ + --define sonar.projectKey=apache_incubator-doris \ + --define sonar.sources=be + diff --git a/.gitmodules b/.gitmodules index 9fc337f3bf..9fe51bfd1d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -33,6 +33,3 @@ path = be/src/clucene url = https://github.com/apache/doris-thirdparty.git branch = clucene -[submodule ".github/actions/sonarcloud-github-action"] - path = .github/actions/sonarcloud-github-action - url = https://github.com/SonarSource/sonarcloud-github-action