forked from Motion-Project/motion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
112 lines (108 loc) · 4.55 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
sudo: required
matrix:
include:
- os: osx
language: c
compiler: gcc
- os: linux
env: BUILD_IMAGE=14.04
language: c
compiler: gcc
addons:
apt:
packages:
- libavformat-dev
- libavcodec-dev
- libavutil-dev
- libswscale-dev
- libavdevice-dev
- libjpeg8-dev
- libzip-dev
- libsqlite3-dev
- libpq-dev
- libmysqlclient-dev
- libwebp-dev
- libmicrohttpd-dev
- gettext
- os: linux
env: DOCKER_IMAGE=ubuntu:16.04
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=ubuntu:17.10
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=debian:jessie
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=debian:stretch
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;
autoreconf -fiv;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
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:stretch" ]; then
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 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 default-libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:jessie" ]; then
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 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 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake 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';
fi;
script:
- if [ $TRAVIS_OS_NAME = osx ]; then
./configure --with-developer-flags && make;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
./test_builds.sh;
elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
docker exec $(docker ps -aq) /bin/sh -c './test_builds.sh';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c './test_builds.sh';
fi;