Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
woodfell committed Nov 14, 2023
1 parent dd52e94 commit 2f7f157
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,38 +197,3 @@ jobs:
cmake -G "${{ matrix.generator }}" -S c/test_package -B c/test_package/build -DCMAKE_PREFIX_PATH="${{ github.workspace }}/install"
cmake --build c/test_package/build
codecov:
name: C Code Coverage
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Setup
run: |
sudo apt-get install llvm -y
- name: Build and Run Tests
env:
CC: clang
CXX: clang++
run: |
cmake -S c -B build -DCODE_COVERAGE=ON -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage &&
build-wrapper-linux-x86-64 --out-dir ./bw-output cmake --build build -j8 --target ccov-all-export
- name: Run sonar-scanner
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_C }}
with:
args:
-Dsonar.organization=swift-nav
-Dsonar.projectName=libsbp-c
-Dsonar.projectKey=swift-nav_libsbp_c
-Dsonar.verbose=true
-Dsonar.login=${{ secrets.SONAR_TOKEN_C }}
-Dsonar.cfamily.threads=4
-Dsonar.cfamily.llvm-cov.reportPath=./build/ccov/coverage.txt
-Dsonar.cfamily.compile-commands=./build/compile_commands.json
39 changes: 39 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,42 @@ jobs:
-Dsonar.exclusions=java/**
-Dsonar.verbose=true
-Dsonar.c.file.suffixes=- -Dsonar.cpp.file.suffixes=-
C:
name: C Code Coverage
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Setup
run: |
sudo apt-get install llvm -y
- name: Build and Run Tests
env:
CC: clang
CXX: clang++
run: |
cmake -S c -B build -DCODE_COVERAGE=ON -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage &&
build-wrapper-linux-x86-64 --out-dir ./bw-output cmake --build build -j8 --target ccov-all-export
- name: Run sonar-scanner
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_C }}
with:
args:
-Dsonar.organization=swift-nav
-Dsonar.projectName=libsbp-c
-Dsonar.projectKey=swift-nav_libsbp_c
-Dsonar.verbose=true
-Dsonar.login=${{ secrets.SONAR_TOKEN_C }}
-Dsonar.cfamily.threads=4
-Dsonar.cfamily.llvm-cov.reportPath=./build/ccov/coverage.txt
-Dsonar.cfamily.compile-commands=./build/compile_commands.json
-Dsonar.sources=c
-Dsonar.inclusions=c/src/**/*,c/include/**/*
-Dsonar.exclusions=c/text/**/*

0 comments on commit 2f7f157

Please sign in to comment.