mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Travis CI: add SonarCloud integration for static code analysis
[skip azurepipelines]
This commit is contained in:
parent
41b2655846
commit
b517f01047
@ -2,6 +2,14 @@ sudo: required # Required for apt-get build-dep
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "mumble-voip"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- '$HOME/.sonar/cache'
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
|
||||
@ -17,20 +17,32 @@ if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
|
||||
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
|
||||
fi
|
||||
qmake CONFIG+="release tests g15-emulator ${EXTRA_CONFIG}" DEFINES+="MUMBLE_VERSION=${TRAVIS_COMMIT:0:7}" -recursive && make -j2 && make check
|
||||
# The next few lines should really be done by "make install"; https://github.com/mumble-voip/mumble/issues/1029
|
||||
mkdir -p appdir/usr/bin appdir/usr/lib/mumble appdir/usr/share/metainfo/ appdir/usr/share/icons/scalable/apps/ appdir/usr/share/applications/
|
||||
cp release/lib* appdir/usr/lib/
|
||||
cp release/mumble appdir/usr/bin
|
||||
cp release/plugins/lib* appdir/usr/lib/mumble/
|
||||
cp scripts/mumble.desktop appdir/usr/share/applications/
|
||||
cp scripts/mumble.appdata.xml appdir/usr/share/metainfo/
|
||||
cp icons/mumble.svg appdir/usr/share/icons/scalable/apps/
|
||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||
./linuxdeployqt-continuous-x86_64.AppImage $(find $HOME -type d -name 'appdir'| head -n 1)/usr/share/applications/*.desktop -appimage -extra-plugins=sqldrivers/libqsqlite.so
|
||||
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
bash upload.sh Mumble*.AppImage*
|
||||
qmake CONFIG+="release tests g15-emulator ${EXTRA_CONFIG}" DEFINES+="MUMBLE_VERSION=${TRAVIS_COMMIT:0:7}" -recursive
|
||||
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
|
||||
# Wraps the compilation with the Build Wrapper to generate the configuration used later by the SonarQube Scanner.
|
||||
mkdir build
|
||||
build-wrapper-linux-x86-64 --out-dir build/sonar make -j 2
|
||||
make check
|
||||
|
||||
# Run the SonarQube analysis
|
||||
sonar-scanner
|
||||
else
|
||||
make -j2 && make check
|
||||
|
||||
# The next few lines should really be done by "make install"; https://github.com/mumble-voip/mumble/issues/1029
|
||||
mkdir -p appdir/usr/bin appdir/usr/lib/mumble appdir/usr/share/metainfo/ appdir/usr/share/icons/scalable/apps/ appdir/usr/share/applications/
|
||||
cp release/lib* appdir/usr/lib/
|
||||
cp release/mumble appdir/usr/bin
|
||||
cp release/plugins/lib* appdir/usr/lib/mumble/
|
||||
cp scripts/mumble.desktop appdir/usr/share/applications/
|
||||
cp scripts/mumble.appdata.xml appdir/usr/share/metainfo/
|
||||
cp icons/mumble.svg appdir/usr/share/icons/scalable/apps/
|
||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||
./linuxdeployqt-continuous-x86_64.AppImage $(find $HOME -type d -name 'appdir'| head -n 1)/usr/share/applications/*.desktop -appimage -extra-plugins=sqldrivers/libqsqlite.so
|
||||
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
bash upload.sh Mumble*.AppImage*
|
||||
fi
|
||||
elif [ "${MUMBLE_QT}" == "qt5" ] && [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ]; then
|
||||
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P ../
|
||||
unzip ../asiosdk2.3.zip -d ../
|
||||
|
||||
9
sonar-project.properties
Normal file
9
sonar-project.properties
Normal file
@ -0,0 +1,9 @@
|
||||
sonar.projectKey=mumble-voip_mumble
|
||||
sonar.projectName=Mumble
|
||||
|
||||
sonar.sources=src
|
||||
sonar.tests=src/tests
|
||||
|
||||
sonar.sourceEncoding=UTF-8
|
||||
|
||||
sonar.cfamily.threads=2
|
||||
Loading…
Reference in New Issue
Block a user