forked from swift-nav/libsettings
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.58 KB
/
cmake.yml
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
37
38
39
40
41
42
43
44
---
name: CI
on:
push:
pull_request:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Set env.REPOSITORY_NAME
shell: bash
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- uses: docker://jayvdb/ghaction-cmake:0.16-sonarcloud-buildwrapper
with:
dependencies_debian: python3-pip python3-setuptools python3-wheel libpython3-dev
cmakeflags: -DPYTHON=python3 -DCMAKE_POSITION_INDEPENDENT_CODE=1
build_command: build-wrapper-linux-x86-64 --out-dir sonar-out make VERBOSE=1
preset: coverage
- name: Run gcovr
shell: bash
run: |
sudo apt-get install -y gcovr
gcovr --sonarqube -o sonarqube.cov
- uses: docker://jayvdb/ghaction-cmake:0.16-sonarcloud-scanner-reduced2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
build_command: gcovr --sonarqube -o sonarqube.cov
test_command: 'true'
post_command: >
sonar-scanner -Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=${{ github.repository_owner }} \
-Dsonar.projectKey=jayvdb_test \
-Dsonar.cfamily.build-wrapper-output=sonar-out \
-Dsonar.typescript.file.suffixes=- \
-Dsonar.cfamily.gcov.reportsPath=. \
-Dsonar.coverageReportPaths=sonarqube.cov