6 # Define test environments.
12 - IMAGE=debian:stretch
13 - PREPARE_UPDATE_CMD="apt-get update"
14 - PREPARE_UPGRADE_CMD="apt-get -y full-upgrade"
15 - PREPARE_INSTALL_CMD="apt-get -y install autoconf automake libtool
16 autopoint gettext pkg-config cmake make g++ libglib2.0-dev
17 libpurple-dev libsigc++-2.0-dev libncursesw5-dev libtermkey-dev
18 python3 doxygen graphviz"
23 - PREPARE_UPDATE_CMD="dnf makecache"
24 - PREPARE_UPGRADE_CMD="dnf -y upgrade"
25 - PREPARE_INSTALL_CMD="dnf -y install autoconf automake libtool
26 gettext-devel pkgconfig cmake make gcc-c++ glib2-devel libpurple-devel
27 libsigc++20-devel ncurses-devel libtermkey-devel doxygen graphviz"
29 # Define common environment variables.
35 # Spin a docker image.
36 - docker run -d --name ${NAME} -v $(pwd):/travis ${IMAGE} tail -f /dev/null
39 # Update the system to the last version of all packages. Note that typically
40 # package upgrade should be done when an image is created from a Dockerfile to
41 # provide a reproducible environment. However, it is more interesting to test
42 # that CenterIM 5 works on a fully updated system and this approach also saves
43 # troubles with building and storing own Docker images and keeping them
44 # appropriately updated.
45 - docker exec -t ${NAME} bash -c "${PREPARE_UPDATE_CMD}"
46 - docker exec -t ${NAME} bash -c "${PREPARE_UPGRADE_CMD}"
47 - docker exec -t ${NAME} bash -c "${PREPARE_INSTALL_CMD}"
48 - docker restart ${NAME}
51 # Check the autotools build.
52 - docker exec -t ${NAME} bash -c "cd /travis;
53 ./bootstrap && ./configure && make ${MAKE_JOBS} distcheck"
54 # Check the cmake build. This uses the tarball produced in the previous step
55 # to make sure the distribution includes all files necessary for cmake.
56 - docker exec -t ${NAME} bash -c "cd /travis;
57 mkdir distcheck-cmake && cd distcheck-cmake &&
58 tar -xvzf ../centerim5-*.tar.gz && cmake centerim5-* &&
59 make ${MAKE_JOBS} && make ${MAKE_JOBS} check"
60 # Build the documentation.
61 - docker exec -t ${NAME} bash -c "cd /travis; make doc"