Skip to content

Various CMake tweaks #146

Various CMake tweaks

Various CMake tweaks #146

# GitHub Actions for genCMPClient
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) Siemens AG, 2021-2023
name: Static Analysis using SonarCloud
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install sonar-scanner
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: cmake
run: |
USE_LIBCMP=1 cmake .
make
- name: test-coverage
run: |
USE_LIBCMP=1 make -f Makefile_v1 clean_all build
USE_LIBCMP=1 make -f Makefile_v1 test_Mock
find . -name *.gcno -exec gcov {} \;
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner -Dproject.settings=.github/workflows/sonar-project.properties