Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
Felix Weilbach 2021-10-01 17:41:49 +02:00 коммит произвёл Matthieu Gallien (Rebase PR Action)
Родитель 81c5c81cb5
Коммит 51b6d5e28f
2 изменённых файлов: 36 добавлений и 0 удалений

30
.github/workflows/sonarcloud.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,30 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-3
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Run build-wrapper
run: |
mkdir build
cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Release -DBUILD_UPDATER=ON -DBUILD_TESTING=1
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"

6
sonar-project.properties Normal file
Просмотреть файл

@ -0,0 +1,6 @@
sonar.projectKey=nextcloud_desktop
sonar.organization=nextcloud
sonar.sources=src
sonar.language=c++
sonar.cfamily.cache.enabled=false
sonar.cfamily.threads=2