Repository navigation
36 lines (35 loc) · 2.51 KB
/
Copy pathreal-time-cpp-sonar.yml
File metadata and controls
36 lines (35 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# ------------------------------------------------------------------------------
# Copyright Christopher Kormanyos 2022 - 2026.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
# ------------------------------------------------------------------------------
name: real-time-cpp-sonar
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonar-gcc-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v8.2.1
- name: Run Build Wrapper
run: |
build-wrapper-linux-x86-64 --out-dir ${{ runner.workspace }}/build_wrapper_output_directory g++ -O3 -std=c++20 -Wall -Wextra -Wpedantic -Wmain -Wundef -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wmissing-declarations -Wshadow -Wunreachable-code -Wswitch-default -Wswitch-enum -Wcast-align -Wmissing-include-dirs -Winit-self -Wfloat-equal -Wdouble-promotion -Wno-comment -gdwarf-2 -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-use-cxa-atexit -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=128 -Wzero-as-null-pointer-constant -Iref_app/src -Iref_app/src/mcal/host -pthread -lpthread ref_app/src/app/benchmark/app_benchmark.cpp ref_app/src/app/benchmark/app_benchmark_none.cpp ref_app/src/app/led/app_led.cpp ref_app/src/mcal/host/mcal_cpu.cpp ref_app/src/mcal/host/mcal_eep.cpp ref_app/src/mcal/host/mcal_gpt.cpp ref_app/src/mcal/host/mcal_irq.cpp ref_app/src/mcal/host/mcal_led.cpp ref_app/src/mcal/host/mcal_osc.cpp ref_app/src/mcal/host/mcal_pwm.cpp ref_app/src/mcal/host/mcal_port.cpp ref_app/src/mcal/host/mcal_spi.cpp ref_app/src/mcal/host/mcal_wdg.cpp ref_app/src/mcal/host/mcal_wdg_watchdog.cpp ref_app/src/mcal/mcal.cpp ref_app/src/os/os.cpp ref_app/src/sys/idle/sys_idle.cpp ref_app/src/sys/mon/sys_mon.cpp ref_app/src/sys/start/sys_start.cpp -o ref_app.exe
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v8.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
--define sonar.cfamily.compile-commands=${{ runner.workspace }}/build_wrapper_output_directory/compile_commands.json
-Dsonar.organization=ckormanyos
-Dsonar.projectName=real-time-cpp
-Dsonar.projectKey=ckormanyos_real-time-cpp