Skip to content

Commit 2ad1ae3

Browse files
committed
Merge branch 'task/ci-quality' into develop
2 parents ef2ca97 + a86c4d4 commit 2ad1ae3

3 files changed

Lines changed: 66 additions & 1 deletion

File tree

.github/workflows/ci_linux_ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818

1919
- name: Update all package informations
2020
run: sudo apt-get -y update

.github/workflows/sonar.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: SonarCloud
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
sonar:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0 # Needed to access history
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get -y update
19+
# Qt5
20+
sudo apt-get install -y qtbase5-dev libqt5svg5-dev
21+
# OpenCascade
22+
sudo apt-get -y install libocct-data-exchange-dev libocct-draw-dev occt-misc
23+
sudo apt-get -y install libtbb-dev libxi-dev
24+
# Assimp
25+
sudo apt-get -y install libassimp-dev
26+
27+
- name: Configure
28+
run: |
29+
cmake -S . -B build \
30+
-DCMAKE_BUILD_TYPE=Release \
31+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
32+
-DMayo_BuildTests=ON \
33+
-DMayo_BuildPluginAssimp=ON
34+
35+
- name: Build(instrumented)
36+
run: |
37+
curl -sSLo build-wrapper.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
38+
unzip -o build-wrapper.zip
39+
build-wrapper-linux-x86/build-wrapper-linux-x86-64 \
40+
--out-dir bw-output \
41+
cmake --build build --config Release --parallel $(nproc)
42+
43+
- name: SonarCloud Scan
44+
run: |
45+
sudo apt-get install -y unzip
46+
curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
47+
unzip -q sonar-scanner.zip
48+
SCANNER_DIR=$(find . -maxdepth 1 -type d -name "sonar-scanner-*")
49+
50+
$SCANNER_DIR/bin/sonar-scanner \
51+
-Dsonar.projectKey=fougue_mayo \
52+
-Dsonar.organization=fougue \
53+
-Dsonar.sources=. \
54+
-Dsonar.cfamily.cpp-standard=c++17 \
55+
-Dsonar.inclusions=src/**/*.cpp,src/**/*.h \
56+
-Dsonar.exclusions=**/3rdparty/**,**/*moc_*.cpp,**/ui_*.h \
57+
-Dsonar.cfamily.compile-commands=bw-output/compile_commands.json \
58+
-Dsonar.host.url=https://sonarcloud.io \
59+
-Dsonar.login=${SONAR_TOKEN}
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
63+
64+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![Linux CI](https://github.com/fougue/mayo/actions/workflows/ci_linux_ubuntu.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_linux_ubuntu.yml)
55
[![macOS CI](https://github.com/fougue/mayo/actions/workflows/ci_macos.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci_macos.yml)
66
<br>
7+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fougue_mayo&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fougue_mayo)
78
[![Downloads](https://img.shields.io/github/downloads/fougue/mayo/total.svg)](https://github.com/fougue/mayo/releases)
89
[![Version](https://img.shields.io/badge/version-v0.9.0-blue.svg?style=flat)](https://github.com/fougue/mayo/releases)
910

0 commit comments

Comments
 (0)