diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-06-29 01:41:35 +0300 |
---|---|---|
committer | Davide Beatrici <davidebeatrici@gmail.com> | 2019-06-29 01:41:35 +0300 |
commit | b517f01047a402deb162b72ec7362c19584ee4f0 (patch) | |
tree | 19a4d3a561709acd15efbc869d90f663159ca168 /scripts | |
parent | 41b265584654c7ac216fd3ccb9c141734d3f839b (diff) |
Travis CI: add SonarCloud integration for static code analysis
[skip azurepipelines]
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/travis-ci/script.bash | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/scripts/travis-ci/script.bash b/scripts/travis-ci/script.bash index bfbc7f62b..000a8223f 100755 --- a/scripts/travis-ci/script.bash +++ b/scripts/travis-ci/script.bash @@ -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 ../ |