forked from Motion-Project/motion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
115 lines (111 loc) · 6.09 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Travis testing script / matrix
#
# Due to changes in package names and errors/warnings in some upstream files, the package
# lists have some variations across the distros. Known issues and items to note:
#
# MariaDB has broken mysql.h and we do not test it for buster.
#
# At certain times...for some of these builds...the apt package tzdata gets invoked.
# It refuses to honor the noninteractive and hangs everything. To circumvent this,
# we have to set the timezone to UTC. This is done for all the debian based distros
# so that if it appears again for distro, it won't hang our testing matrix.
#
sudo: required
matrix:
include:
- os: osx
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=ubuntu:16.04
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=ubuntu:18.04
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=ubuntu:20.04
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=debian:stretch
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=debian:buster
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=alpine:latest
services: docker
language: c
compiler: gcc
before_install:
- if [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
echo $DOCKER_IMAGE;
docker pull $DOCKER_IMAGE;
docker run -d -v $(pwd):/motion -w /motion $DOCKER_IMAGE /bin/sh -c 'while true; do sleep 1; done';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
echo $DOCKER_IMAGE;
docker pull $DOCKER_IMAGE;
docker run -d -v $(pwd):/motion -w /motion $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done';
fi;
before_script:
- if [ $TRAVIS_OS_NAME = osx ]; then
brew upgrade ffmpeg pkg-config jpeg libmicrohttpd;
brew install ffmpeg pkg-config libjpeg libmicrohttpd;
export PATH="/usr/local/opt/gettext/bin:/usr/local/bin:$PATH";
autoreconf -fiv;
elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
docker exec $(docker ps -aq) /bin/sh -c 'apk update';
docker exec $(docker ps -aq) /bin/sh -c 'apk add alpine-sdk autoconf automake pkgconf libtool';
docker exec $(docker ps -aq) /bin/sh -c 'apk add libjpeg-turbo-dev libzip-dev ffmpeg-dev';
docker exec $(docker ps -aq) /bin/sh -c 'apk add libmicrohttpd-dev gettext-dev';
docker exec $(docker ps -aq) /bin/sh -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:buster" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'ln -fs /usr/share/zoneinfo/UTC /etc/localtime';
docker exec $(docker ps -aq) /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:stretch" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'ln -fs /usr/share/zoneinfo/UTC /etc/localtime';
docker exec $(docker ps -aq) /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "ubuntu:16.04" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'ln -fs /usr/share/zoneinfo/UTC /etc/localtime';
docker exec $(docker ps -aq) /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'ln -fs /usr/share/zoneinfo/UTC /etc/localtime';
docker exec $(docker ps -aq) /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
fi;
script:
- if [ $TRAVIS_OS_NAME = osx ]; then
./configure --with-developer-flags && make;
elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
docker exec $(docker ps -aq) /bin/sh -c './configure && make maintainer-check';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c './configure && make maintainer-check';
fi;