Skip to content

Commit

Permalink
[Chore](check) change sonarcloud github action to c/cpp action (apach…
Browse files Browse the repository at this point in the history
…e#24433)

change sonarcloud github action to c/cpp action
  • Loading branch information
BiteTheDDDDt authored Sep 15, 2023
1 parent eb8ecf4 commit 5ba2a19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/actions/sonarcloud-github-action
Submodule sonarcloud-github-action deleted from c25d2e
22 changes: 12 additions & 10 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5ba2a19

Please sign in to comment.