forked from xxxbsd/motion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
69 lines (65 loc) · 1.98 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
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
- os: linux
env: DOCKER_IMAGE=ubuntu:16.04
services: docker
language: c
compiler: gcc
- os: linux
env: DOCKER_IMAGE=ubuntu:17.04
services: docker
language: c
compiler: gcc
before_install:
- if [ "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;
brew install ffmpeg pkg-config libjpeg;
autoreconf -fiv;
fi;
- if [ "$BUILD_IMAGE" = "14.04" ]; then
autoreconf -fiv;
fi;
- if [ "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';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
fi;
script:
- if [ $TRAVIS_OS_NAME = osx ]; then
./configure --with-developer-flags && make;
fi;
- if [ "$BUILD_IMAGE" = "14.04" ]; then
./test_builds.sh;
fi;
- if [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c './test_builds.sh';
fi;