forked from viking-gps/viking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (48 loc) · 3.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: c
services:
- docker
env:
global:
# https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1802718
# and/or travis docker image(s) not having enabled 'deb-src' lines
# contrary to docker documentation -> https://docs.docker.com/samples/library/ubuntu/
# NB At time of writing 2018-11-11: artful doesn't really need this FIX_APT_CONFIG, but no harm in applying it
# TRAVIS BROKEN
# - FIX_APT_CONFIG="sed -i '/^#\sdeb-src /s/^#//' /etc/apt/sources.list"
# The common extra dependencies required beyond the default distribution 'build-dep'
- COMMON_DEPS="gtk-doc-tools yelp-tools libgeoclue-2-dev nettle-dev liboauth-dev libzip-dev libjson-glib-dev libgtk-3-dev xxd"
# 'glib-compile-resources' has moved around packages libglib2.0-bin --> libglib2.0-dev-bin, so can't be in common.
#
# For available build images-> https://docs.travis-ci.com/user/reference/overview/
#
matrix:
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin
# Docker images previously (temporarily?) available but have vanished:
# - BUILD_IMG=ubuntu:18.10
# - BUILD_IMG=ubuntu:19.04
# - BUILD_IMG=ubuntu:19.10 DEPS=libglib2.0-dev-bin
# Test basic levels of some configure options
# Use the latest LTS version for these
- BUILD_IMG=ubuntu:18.04 DEPS="libglib2.0-dev-bin libexif-dev" OPTS="--with-libexif"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-bzip2"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-geotag"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-magic"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-mapnik"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-mbtiles"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-nettle"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-realtime-gps-tracking"
- BUILD_IMG=ubuntu:18.04 DEPS=libglib2.0-dev-bin OPTS="--disable-zip"
# NB Ubuntu 16.04 doesn't have a new enough geoclue so simply disable using it
# NB Ubuntu 16.04 is GTK 3.18.9, so keep as GTK2 only
- BUILD_IMG=ubuntu:16.04 DEPS="libglib2.0-bin libmapnik-dev" OPTS="--enable-gtk2 --disable-geoclue"
- BUILD_IMG=ubuntu:18.04 DEPS="libglib2.0-dev-bin libgtk2.0-dev" OPTS="--enable-gtk2"
#
# Allow specifying docker user for increased rate allowance (compared to anonymous access):
# https://docs.docker.com/docker-hub/download-rate-limit/
# https://www.docker.com/increase-rate-limits
# These DOCKERHUB env vars can be set in your travis settings
#
script: >
if [ ! -z "${DOCKERHUB_USERNAME:-}" ]; then set -x; echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin; set +x; fi &&
docker run --rm=true -v $HOME:$HOME:rw $BUILD_IMG /bin/sh -c "sed -i '/^#\sdeb-src /s/^#//' /etc/apt/sources.list && apt-get update && apt-get build-dep --yes viking && apt-get install --yes $COMMON_DEPS $DEPS && cd $PWD && ./autogen.sh $OPTS && make -j && make -j check || (cat test/test-suite.log ; false) && make install"
# Further packages are installed as these are new dependencies for the latest source code, compared to the dependencies listed in the distribution version (`apt-get build-dep` always refers to the version which is built for the OS rather than the up-to-date source)