-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy path.travis.yml
115 lines (108 loc) · 3.53 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
dist: trusty
sudo: false
language: cpp
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
- libpng-dev
- libjpeg-dev
env:
- BUILD_TYPE=Debug
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
- libpng-dev
- libjpeg-dev
env:
- BUILD_TYPE=Release
# - compiler: clang
# addons:
# apt:
# packages:
# - libpng-dev
# - libjpeg-dev
# env:
# - BUILD_TYPE=Debug
# - compiler: clang
# addons:
# apt:
# packages:
# - libpng-dev
# - libjpeg-dev
# env:
# - BUILD_TYPE=Release
- compiler: clang
os: osx
env:
- BUILD_TYPE=Release
osx_image: xcode12
before_install:
############################################################################
# Setup support for local dependencies
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
mkdir -p ${DEPS_DIR}/local
export CXXFLAGS="-isystem ${DEPS_DIR}/local/include"
export PKG_CONFIG_PATH=${DEPS_DIR}/local/lib/pkgconfig
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DEPS_DIR}/local/lib"
export LDFLAGS="-L${DEPS_DIR}/local/lib"
if [[ "${CXX}" == "g++" ]]; then
export CC=gcc-4.9
export CXX=g++-4.9
else
export CC=clang-4.9
export CXX=clang++-4.9
fi
fi
############################################################################
# Install a recent CMake
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz"
mkdir -p ${DEPS_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
fi
############################################################################
# Osx dependencies
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install ffmpeg
brew upgrade cmake
fi
install:
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
wget https://www.ffmpeg.org/releases/ffmpeg-4.4.tar.bz2
tar xf ffmpeg-4.4.tar.bz2
cd ffmpeg-4.4 && ./configure --prefix=/${DEPS_DIR}/local --disable-static --enable-shared --disable-avdevice --disable-doc --disable-htmlpages --disable-manpages --disable-programs --disable-encoders --disable-muxers --enable-swscale --disable-yasm --enable-protocol=file --enable-protocol=http --enable-iconv && make -j4 install
cd ..
fi
script:
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_STATIC=ON -DENABLE_SHARED=ON -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .
- cmake --build .
- CTEST_OUTPUT_ON_FAILURE=1 ctest
addons:
coverity_scan:
project:
name: "dirkvdb/ffmpegthumbnailer"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "cmake ."
build_command: "make -j4"
branch_pattern: coverity_scan