Travis: build Subsurface AppImage against Qt 5.12

For this we need our own hand crafted trusty container with Qt 5.12,
including QtWebKit and an updated cmake and libdbus, as well as already
build googlemaps plugin, grantlee and libgit2.

At the same time stop uploading the Subsurface AppImage in the
traditional trusty build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-09-03 23:07:37 -07:00
parent 6670ea7bdb
commit a921acb3ce
6 changed files with 113 additions and 9 deletions

View file

@ -69,6 +69,12 @@ matrix:
- libglib2.0-dev - libglib2.0-dev
- mdbtools-dev - mdbtools-dev
- env: SUBSURFACE_PLATFORM='linux-trusty-qt512'
os: linux
language: c++
services:
- docker
- env: SUBSURFACE_PLATFORM='linux2' - env: SUBSURFACE_PLATFORM='linux2'
os: linux os: linux
dist: trusty dist: trusty

View file

@ -0,0 +1,23 @@
#!/bin/bash
cd ${TRAVIS_BUILD_DIR}
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
fi
# set up the release message to use
source ./scripts/release-message.sh
echo "Submitting the folloing AppImage for continuous build release:"
find . -name "Subsurface*.AppImage"
# get and run the upload script
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
# don't fail if the zsync file is missing
if [ -f Subsurface*.AppImage.zsync ] ; then
bash ./upload.sh Subsurface*.AppImage Subsurface*.AppImage.zsync
else
bash ./upload.sh Subsurface*.AppImage
fi

View file

@ -0,0 +1,31 @@
#!/bin/bash
# prep things so we can build for Linux
# we have a custom built Qt some gives us just what we need, including QtWebKit
#
set -x
# when running this locally, set TRAVIS_BUILD_DIR to the Subsurface
# directory inside your Windows build tree
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
git fetch --unshallow || true # if running locally, unshallow could fail
git pull --tags
git submodule init
git describe
# make sure we have libdivecomputer
echo "Get libdivecomputer"
cd ${TRAVIS_BUILD_DIR}
git submodule update --recursive
cd libdivecomputer
autoreconf --install
autoreconf --install
export QT_ROOT=/usr/local/Qt/5.12.4
cd ${TRAVIS_BUILD_DIR}/..
# start the container and keep it running
docker run -v $PWD/subsurface:/subsurface --name=trusty-qt512 -w / -d dirkhh/trusty-qt512:0.6 /bin/sleep 60m

View file

@ -0,0 +1,40 @@
#!/bin/bash
set -x
set -e
# this gets executed by Travis when building an AppImage for Linux
# inside of the trusty-qt512 container
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH for linuxdeployqt
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
bash -e -x /subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit -quick
export QT_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_DEBUG_PLUGINS=1
# set up the appdir
mkdir -p appdir/usr/plugins/
# mv googlemaps and Grantlee plugins into place
mv appdir/usr/usr/local/Qt/5.12.4/gcc_64/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
curl -L -O "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 --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -qmldir=./subsurface/map-widget/ -verbose=2
# create the AppImage
export VERSION=$(cd /subsurface/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -appimage -qmldir=./subsurface/map-widget/ -verbose=2
# copy AppImage to the calling VM
cp Subsurface*.AppImage* /subsurface

View file

@ -0,0 +1,13 @@
#!/bin/bash
set -x
set -e
# this is run to actually trigger the creation of the AppImage
# inside the container
docker exec -t trusty-qt512 bash subsurface/scripts/linux-trusty-qt512/in-container-build.sh 2>&1 | tee build.log
# fail the build if we didn't create the target binary
grep "Please consider submitting your AppImage to AppImageHub" build.log

View file

@ -7,16 +7,7 @@ fi
# set up the release message to use # set up the release message to use
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
echo "Submitting the folloing AppImage for continuous build release:"
ls -lh Subsurface*.AppImage
# get and run the upload script # get and run the upload script
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
# don't fail if the zsync file is missing
if [ -f Subsurface*.AppImage.zsync ] ; then
bash ./upload.sh Subsurface*.AppImage Subsurface*.AppImage.zsync
else
bash ./upload.sh Subsurface*.AppImage
fi
bash ./upload.sh smtk2ssrf*.AppImage bash ./upload.sh smtk2ssrf*.AppImage