[Chore](check) change sonarcloud github action to c/cpp action (#24433)

change sonarcloud github action to c/cpp action
This commit is contained in:
Pxl
2023-09-15 14:55:36 +08:00
committed by GitHub
parent eb8ecf49bf
commit 5ba2a19cd2
3 changed files with 12 additions and 14 deletions

View File

@ -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

3
.gitmodules vendored
View File

@ -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