forked from mikrosimage/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (80 loc) · 2.28 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
# Use container-based infrastructure
sudo: required
services:
- docker
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
- AVTRANSCODER_BUILD=${TRAVIS_BUILD_DIR}/build-avtranscoder
- AVTRANSCODER_INSTALL=${TRAVIS_BUILD_DIR}/install-avtranscoder
- DEPENDENCY_INSTALL=${TRAVIS_BUILD_DIR}/install-dependency
- CI_NODE_TOTAL=2
matrix:
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=false
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=true
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=false
matrix:
# generate coverage only with gcc
exclude:
- compiler: clang
env: DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=true
- compiler: clang
env: DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
allow_failures:
- os: osx
fast_finish: true
# This results in a 2×2×2x2 build matrix.
# Where the variables are: os / compiler / DEPENDENCY_MODE / ENABLE_COVERAGE
addons:
apt:
sources: ['kalakris-cmake']
packages:
- cmake
- swig
- python-dev
- python-nose
- freeglut3-dev
cache:
# Caching Ubuntu packages
apt: true
# Caching other directories
directories:
- ${DEPENDENCY_INSTALL}
before_script:
- env | sort
- date -u
- uname -a
- cd ${TRAVIS_BUILD_DIR}
# install coverage tools
- if [ ${ENABLE_COVERAGE} ]; then ./tools/travis.gcc.install.coverage.sh; fi
# install avtranscoder dependencies
- if [ ${TRAVIS_OS_NAME} = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
- if [ ${TRAVIS_OS_NAME} = "osx" ]; then ./tools/travis.osx.install.deps.sh; fi
script:
# build
- ./tools/travis.build.sh
# launch tests
- if [ ${DEPENDENCY_MODE} = "ffmpeg" ]; then ./tools/travis.python.nosetests.sh; fi
after_success:
# generate coverage for coveralls
- if [ ${ENABLE_COVERAGE} ]; then ./tools/travis.gcc.generate.coverage.sh; fi
before_deploy:
# create archive
- cd ${TRAVIS_BUILD_DIR}
- tar -cvzf avtranscoder-${TRAVIS_OS_NAME}-${CC}-${DEPENDENCY_MODE}.tgz ${DEPENDENCY_INSTALL} ${AVTRANSCODER_INSTALL}
deploy:
provider: releases
api_key:
secure: ${GITHUB_RELEASE_API_KEY}
file: avtranscoder-${TRAVIS_OS_NAME}-${CC}-${DEPENDENCY_MODE}.tgz
skip_cleanup: true
on:
branch: master
condition: ${ENABLE_COVERAGE} = false