-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
65 lines (59 loc) · 2.37 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: cpp
sudo: required
services:
- docker
# Define test environments.
matrix:
include:
# Debian 9 (stretch).
- env:
- NAME=debian
- IMAGE=debian:stretch
- PREPARE_UPDATE_CMD="apt-get update"
- PREPARE_UPGRADE_CMD="apt-get -y full-upgrade"
- PREPARE_INSTALL_CMD="apt-get -y install autoconf automake libtool
autopoint gettext pkg-config cmake make g++ libglib2.0-dev
libpurple-dev libsigc++-2.0-dev libncursesw5-dev libtermkey-dev
python3 doxygen graphviz"
# Fedora 27.
- env:
- NAME=fedora
- IMAGE=fedora:27
- PREPARE_UPDATE_CMD="dnf makecache"
- PREPARE_UPGRADE_CMD="dnf -y upgrade"
- PREPARE_INSTALL_CMD="dnf -y install autoconf automake libtool
gettext-devel pkgconfig cmake make gcc-c++ glib2-devel libpurple-devel
libsigc++20-devel ncurses-devel libtermkey-devel doxygen graphviz"
# Define common environment variables.
env:
global:
- MAKE_JOBS=-j4
before_install:
# Spin a docker image.
- docker run -d --name ${NAME} -v $(pwd):/travis ${IMAGE} tail -f /dev/null
install:
# Update the system to the last version of all packages. Note that typically
# package upgrade should be done when an image is created from a Dockerfile to
# provide a reproducible environment. However, it is more interesting to test
# that CenterIM 5 works on a fully updated system and this approach also saves
# troubles with building and storing own Docker images and keeping them
# appropriately updated.
- docker exec -t ${NAME} bash -c "${PREPARE_UPDATE_CMD}"
- docker exec -t ${NAME} bash -c "${PREPARE_UPGRADE_CMD}"
- docker exec -t ${NAME} bash -c "${PREPARE_INSTALL_CMD}"
- docker restart ${NAME}
script:
# Check the autotools build.
- docker exec -t ${NAME} bash -c "cd /travis;
./bootstrap && ./configure && make ${MAKE_JOBS} distcheck"
# Check the cmake build. This uses the tarball produced in the previous step
# to make sure the distribution includes all files necessary for cmake.
- docker exec -t ${NAME} bash -c "cd /travis;
mkdir distcheck-cmake && cd distcheck-cmake &&
tar -xvzf ../centerim5-*.tar.gz && cmake centerim5-* &&
make ${MAKE_JOBS} && make ${MAKE_JOBS} check"
# Build the documentation.
- docker exec -t ${NAME} bash -c "cd /travis; make doc"
after_script:
# Stop the container.
- docker stop ${NAME}