mumble/scripts/travis-ci/script.bash
Davide Beatrici 8d20129db0 Travis CI: disable SonarCloud scanner, incompatible with Ubuntu Bionic (18.04)
Unfortunately "sonar-scanner" fails with the following error:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:239)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:403)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:399)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:362)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:98)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

The file is not generated because the C/C++ plugin library fails to load:

ERROR: ld.so: object '/home/travis/.sonar/cache/87f7532f0609a32b83c77be7ae487f14/build-wrapper-linux-x86/libinterceptor-${PLATFORM}.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
2019-10-15 02:59:55 +02:00

57 lines
2.2 KiB
Bash
Executable File

#!/bin/bash -ex
#
# Copyright 2005-2019 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
if [ "${TRAVIS_REPO_SLUG}" == "mumble-voip/mumble" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
if [ "${TRAVIS_BRANCH}" == "master" ]; then
MASTER_BRANCH=1
fi
fi
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
if [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
EXTRA_CONFIG=PREFIX=/usr
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
elif [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ]; then
qmake CONFIG+="release tests warnings-as-errors ${EXTRA_CONFIG}" -recursive
make -j $(nproc)
elif [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ]; then
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P ../
unzip ../asiosdk2.3.zip -d ../
mv ../ASIOSDK2.3 3rdparty/asio
PATH=$PATH:/usr/lib/mxe/usr/bin
export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc
EXTRA_CONFIG=
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
fi
${MUMBLE_HOST}.static-qmake-qt5 -recursive -Wall CONFIG+="release tests warnings-as-errors g15-emulator no-overlay no-bonjour no-elevation no-ice ${EXTRA_CONFIG}"
make -j2
make check TESTRUNNER="wine-development"
elif [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P ../
unzip ../asiosdk2.3.zip -d ../
mv ../ASIOSDK2.3 3rdparty/asio
PATH=$PATH:/usr/lib/mxe/usr/bin
export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc
EXTRA_CONFIG=
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
fi
${MUMBLE_HOST}.static-qmake-qt5 -recursive -Wall CONFIG+="release tests warnings-as-errors g15-emulator no-overlay no-bonjour no-elevation no-ice ${EXTRA_CONFIG}"
make -j2
make check TESTRUNNER="wine-development"
else
exit 1
fi
else
exit 1
fi