travis: Add sonarcloud build
This commit is contained in:
@@ -7,6 +7,10 @@ compiler:
|
|||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|
||||||
|
addons:
|
||||||
|
sonarcloud:
|
||||||
|
organization: "strongswan"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- travis_retry ./scripts/test.sh deps
|
- travis_retry ./scripts/test.sh deps
|
||||||
- travis_retry ./scripts/test.sh pydeps
|
- travis_retry ./scripts/test.sh pydeps
|
||||||
@@ -53,6 +57,10 @@ matrix:
|
|||||||
env: TEST=apidoc
|
env: TEST=apidoc
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: TEST=coverage
|
env: TEST=coverage
|
||||||
|
- compiler: gcc
|
||||||
|
env: TEST=sonarcloud
|
||||||
|
git:
|
||||||
|
depth: false
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: TEST=win64 MONOLITHIC=yes
|
env: TEST=win64 MONOLITHIC=yes
|
||||||
# this does not work on 14.04 due to a missing @4 decoration for
|
# this does not work on 14.04 due to a missing @4 decoration for
|
||||||
|
|||||||
+18
-2
@@ -29,7 +29,7 @@ gcrypt)
|
|||||||
printf-builtin)
|
printf-builtin)
|
||||||
CONFIG="--with-printf-hooks=builtin"
|
CONFIG="--with-printf-hooks=builtin"
|
||||||
;;
|
;;
|
||||||
all|coverage)
|
all|coverage|sonarcloud)
|
||||||
CONFIG="--enable-all --disable-android-dns --disable-android-log
|
CONFIG="--enable-all --disable-android-dns --disable-android-log
|
||||||
--disable-dumm --disable-kernel-pfroute --disable-keychain
|
--disable-dumm --disable-kernel-pfroute --disable-keychain
|
||||||
--disable-lock-profiler --disable-padlock --disable-fuzzing
|
--disable-lock-profiler --disable-padlock --disable-fuzzing
|
||||||
@@ -202,7 +202,16 @@ apidoc)
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$ make $TARGET"
|
echo "$ make $TARGET"
|
||||||
make -j4 $TARGET || exit $?
|
case "$TEST" in
|
||||||
|
sonarcloud)
|
||||||
|
# without target, coverage is currently not supported anyway because
|
||||||
|
# sonarqube only supports gcov, not lcov
|
||||||
|
build-wrapper-linux-x86-64 --out-dir bw-output make -j4 || exit $?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
make -j4 $TARGET || exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case "$TEST" in
|
case "$TEST" in
|
||||||
apidoc)
|
apidoc)
|
||||||
@@ -211,6 +220,13 @@ apidoc)
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
sonarcloud)
|
||||||
|
sonar-scanner \
|
||||||
|
-Dsonar.projectKey=strongswan \
|
||||||
|
-Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \
|
||||||
|
-Dsonar.sources=. \
|
||||||
|
-Dsonar.cfamily.build-wrapper-output=bw-output || exit $?
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user