Skip to content

Feature: add trigonometry & exponential funcs (#401) #174

Feature: add trigonometry & exponential funcs (#401)

Feature: add trigonometry & exponential funcs (#401) #174

Workflow file for this run

name: SonarSource Static Analyzer Build
on:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
strategy:
matrix:
config:
- os: ubuntu-24.04
compiler: clang-20
cmake-version: 3.24.0
conan-version: 2.17.0
name: SonarSource Static Analyzer Build
runs-on: ${{ matrix.config.os }}
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
- name: Add compiler repos
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/setup_apt@main
- name: Get minimum cmake version
uses: lukka/get-cmake@v3.29.3
with:
cmakeVersion: ${{ matrix.config.cmake-version }}
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@v1.2
with:
compiler: ${{ matrix.config.compiler }}
- name: use mold as default linker
uses: rui314/setup-mold@v1
- name: Configure conan
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/configure_conan@main
with:
conan-version: ${{ matrix.config.conan-version }}
- name: add conan user
run: |
conan remote add -f dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
- name: Cache conan data
id: cache-conan
uses: actions/cache@v4
with:
path: ~/.conan2/p
key: ${{ matrix.config.os }}-${{ matrix.config.compiler }}-conan2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Get dependency provider
uses: dice-group/cpp-conan-release-reusable-workflow/.github/actions/add_conan_provider@main
- name: Configure CMake
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CXXFLAGS: -Wno-unused-command-line-argument -fuse-ld=mold
run: >
cmake -G Ninja -B build_dir -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider.cmake -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
- name: Run Build Wrapper
run: |
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build_dir/ --config Release
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"