Skip to content

SonarCloud Analysis #256

SonarCloud Analysis

SonarCloud Analysis #256

name: SonarCloud Analysis
on:
push:
branches:
- master
schedule:
- cron: '0 15 * * 6'
permissions: {}
jobs:
sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install additional packages
run: |
sudo apt-get -y update
sudo apt-get -y install autoconf automake
- name: Initialize SonarCloud
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build via SonarCloud wrapper
run: |
autoreconf -f -i -Wall,error
./configure
build-wrapper-linux-x86-64 --out-dir .bw-output make
- name: Perform SonarCloud analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner -Dsonar.projectKey=oleg-derevenetz_bwping \
-Dsonar.projectName=BWPing \
-Dsonar.organization=oleg-derevenetz-github \
-Dsonar.sources=. \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.cfamily.build-wrapper-output=.bw-output \
-Dsonar.cfamily.analysisCache.mode=server \
-Dsonar.cfamily.threads=1 \
-Dsonar.host.url=https://sonarcloud.io