Travis/Coverity: try to only scan libdivecomputer and Subsurface

Build the dependencies outside the part that gets scanned.
And remove all the commented out noise.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-12-27 08:41:37 -08:00
parent 40c6d9521e
commit 15efc4e2c7
3 changed files with 22 additions and 59 deletions

View file

@ -43,19 +43,22 @@ matrix:
project:
name: "Subsurface-divelog/subsurface"
description: "Build submitted via Travis CI"
notification_email: glance@acc.umu.se
build_command: bash ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh
notification_email: coverity@subsurface-divelog.org
build_command: bash ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh -no-deps
branch_pattern: coverity_scan
before_install:
# When the build on this branch gets triggered by travis-cron, do a coverty scan.
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/before_install.sh
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh -only-deps
script:
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh
echo "built in coverity_scan section"
# - source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/travisbuild.sh
after_success:
- source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/after_success.sh
echo "don't post binaries"
# - source ${TRAVIS_BUILD_DIR}/scripts/${SUBSURFACE_PLATFORM}/after_success.sh
branches:
except:

View file

@ -14,6 +14,13 @@
# create a log file of the build
exec 1> >(tee build.log) 2>&1
CURRENTWD=$(pwd)
# if someone starts this script inside the subsurface directory, just go up a level
if [ "$(basename $(pwd))" = "subsurface" ] ; then
cd ..
fi
SRC=$(pwd)
PLATFORM=$(uname)
@ -527,3 +534,4 @@ if [ -z "$ONLY_DEPS" ] ; then
else
echo "Done building the dependencies, did not build libdivecomputer and Subsurface"
fi
cd $CURRENTWD

View file

@ -13,60 +13,12 @@ export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
# build both desktop and mobile - first desktop without BT support and without
# webkit to make sure that still works, then with all components in order
# to create an AppImage
cd ..
bash -e -x ./subsurface/scripts/build.sh -desktop -no-bt
bash -e -x ${TRAVIS_BUILD_DIR}/scripts/build.sh -desktop -no-bt $@
if [ "$1" = "-onlydeps" ] ; then
exit 0
fi
rm -rf subsurface/build
bash -e -x ./subsurface/scripts/build.sh -both -create-appdir -build-with-webkit
export QT_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_DEBUG_PLUGINS=1
# for debugging: find $QT_ROOT/plugins
env CTEST_OUTPUT_ON_FAILURE=1 make -C subsurface/build check
# set up the appdir
mkdir -p appdir/usr/plugins/
# mv googlemaps and Grantlee plugins into place
mv appdir/usr/usr/local/Qt*/plugins/* appdir/usr/plugins # the usr/usr is not a typo - that's where it ends up
mv appdir/usr/lib/grantlee/ appdir/usr/plugins/
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
rm -rf appdir/usr/usr appdir/usr/lib/cmake appdir/usr/lib/pkgconfig
# get the linuxdeployqt tool and run it to collect the libraries
wget -q -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
unset QTDIR
unset QT_PLUGIN_PATH
unset LD_LIBRARY_PATH
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -qmldir=./subsurface/map-widget/ -verbose=2
# create the AppImage
export VERSION=$(cd ${TRAVIS_BUILD_DIR}/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -qmldir=./subsurface/map-widget/ -verbose=2
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
# SmartTrak import tool
bash -e -x ./subsurface/scripts/smtk2ssrf-build.sh
# Create AppImage for smtk2ssrf
mkdir -p ./smtk2ssrf_appdir/usr/share
mkdir -p ./smtk2ssrf_appdir/usr/plugins
mkdir -p ./smtk2ssrf_appdir/usr/bin
mkdir -p ./smtk2ssrf_appdir/usr/lib
cp -f subsurface/icons/subsurface-icon.svg smtk2ssrf_appdir/
cp -f subsurface/smtk-import/smtk2ssrf.desktop smtk2ssrf_appdir/
cp -f install-root/bin/smtk2ssrf smtk2ssrf_appdir/usr/bin/
cp -f install-root/lib/libdivecomputer.so.0 smtk2ssrf_appdir/usr/lib/
cp -f install-root/lib/libgit2* smtk2ssrf_appdir/usr/lib/
# Why is Grantlee needed? We have built subsurface without printing support!!!
cp -f install-root/lib/libGrantlee* smtk2ssrf_appdir/usr/lib/
cp -rf appdir/usr/plugins/{bearer,iconengines,imageformats,platforms,xcbglintegrations} smtk2ssrf_appdir/usr/plugins
./linuxdeployqt*.AppImage ./smtk2ssrf_appdir/smtk2ssrf.desktop -bundle-non-qt-libs -verbose=2
./linuxdeployqt*.AppImage ./smtk2ssrf_appdir/smtk2ssrf.desktop -appimage -verbose=2
find ./smtk2ssrf_appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
bash -e -x ${TRAVIS_BUILD_DIR}/scripts/build.sh -both -create-appdir -build-with-webkit $@