forked from Kagami/SVT-AV1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
229 lines (225 loc) · 8.14 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# Environment variables
language: c
cache: ccache
os: linux
dist: bionic
osx_image: xcode11.2
env: build_type=release
git:
depth: 5
quiet: true
submodules: false
addons:
apt:
packages: &native_deps
- cmake
- yasm
homebrew:
packages:
- yasm
- ccache
- python
update: true # Remove when Travis macOS images get updated
# Pipeline stages
stages:
- name: test
if: type != pull_request
# Default scripts
before_install:
- "sudo chown -R travis: $HOME/.ccache"
- |
if [ "$(uname -s)" == "Darwin" ]; then
sysctl -n machdep.cpu.brand_string
sysctl machdep.cpu.features
sysctl machdep.cpu.leaf7_features
elif [ -f "/proc/cpuinfo" ]; then
grep -Ei " sse*| ssse*| avx|model name" /proc/cpuinfo | sort -u
fi
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig PATH="/usr/local/opt/ccache/libexec:$PATH"
- cd $TRAVIS_BUILD_DIR
- wget -nc https://raw.githubusercontent.com/OpenVisualCloud/SVT-AV1-Resources/master/video.tar.gz || wget -nc http://randomderp.com/video.tar.gz
- tar xf video.tar.gz
- mkdir -p $TRAVIS_BUILD_DIR/Build/linux/${build_type:-Release}
- |
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
test -f "/usr/lib/ccache/${CC##*/}" || sudo ln -s /usr/bin/ccache /usr/lib/ccache/${CC##*/}
test -f "/usr/lib/ccache/${CXX##*/}" || sudo ln -s /usr/bin/ccache /usr/lib/ccache/${CXX##*/}
fi
install:
- |
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
export CFLAGS="-Werror"
if [ "$CC" = "clang" ]; then export CFLAGS+=" -Wno-error=array-bounds"; fi
fi
script:
- &base_script |
cd $TRAVIS_BUILD_DIR/Build/linux/${build_type:-Release}
cmake $TRAVIS_BUILD_DIR -G"${generator:-Unix Makefiles}" -DCMAKE_BUILD_TYPE=${build_type:-Release} ${CMAKE_EFLAGS}
cmake -j $(if [ $TRAVIS_OS_NAME = osx ]; then sysctl -n hw.ncpu; else nproc; fi) --build . &&
sudo cmake --build . --target install && cd $TRAVIS_BUILD_DIR
- &8bit_test |
SvtAv1EncApp -enc-mode 0 -i akiyo_cif.y4m -n 3 && SvtAv1EncApp -enc-mode 8 -i akiyo_cif.y4m -n 150
- &10bit_test |
SvtAv1EncApp -enc-mode 0 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 3 -lp 1 && SvtAv1EncApp -enc-mode 8 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 150
before_cache:
- "sudo chown -R travis: $HOME/.ccache"
- ccache -c
- ccache -s
# Build matrix
matrix:
fast_finish: true
allow_failures:
- name: Binary Identical?
- name: Valgrind
- name: Coveralls Linux+gcc
- name: Coveralls osx+clang
- name: Unit Tests Linux+gcc
- name: Unit Tests osx+clang
# Exclude these because if the encoder can run with a release build, the commit is probably fine. Also required for fast_finish.
include:
# GCC & Clang builds
- name: Linux GCC 7 build
stage: test
env: build_type=release CC=gcc-7 CXX=g++-7
addons:
apt:
packages:
- *native_deps
- gcc-7
- g++-7
- name: Linux GCC 8 build
env: build_type=release CC=gcc-8 CXX=g++-8
addons:
apt:
packages:
- *native_deps
- gcc-8
- g++-8
- name: Linux GCC 9 build
env: build_type=release CC=gcc-9 CXX=g++-9
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- *native_deps
- gcc-9
- g++-9
- name: Linux Clang 6 build
compiler: clang
env: build_type=release CC=clang-6.0 CXX=clang++-6.0
addons:
apt:
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
packages:
- *native_deps
- clang-6.0
- name: Linux Clang 10 build
compiler: clang
env: build_type=release CC=clang-10 CXX=clang++-10
addons:
apt:
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
packages:
- *native_deps
- clang-10
# Multiple CPU Architectures
- name: Arm64 GCC 7 build
env: build_type=release CC=gcc-7 CXX=g++-7
arch: arm64
- name: PowerPC GCC 7 build
env: build_type=release CC=gcc-7 CXX=g++-7
arch: ppc64le
- name: IBM Z GCC 7 build
env: build_type=release CC=gcc-7 CXX=g++-7
arch: s390x
# FFmpeg interation build
- name: FFmpeg patch
env: build_type=release CMAKE_EFLAGS="-DBUILD_SHARED_LIBS=OFF"
script:
# Build and install SVT-AV1
- *base_script
# Apply SVT-AV1 plugin and enable libsvtav1 to FFmpeg
- git clone https://github.com/FFmpeg/FFmpeg --branch release/4.2 --depth=1 ffmpeg && cd ffmpeg
- git apply $TRAVIS_BUILD_DIR/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
- "sudo chown -R travis: $HOME/.ccache"
- export CFLAGS=""
- ./configure --enable-libsvtav1 || less ffbuild/config.log
- make --quiet -j$(nproc) && sudo make install
# macOS builds and 8-bit test
- name: macOS Clang build and 8-bit test
os: osx
compiler: clang
script:
# Build and install SVT-AV1
- *base_script
# Run the 8-bit test
- *8bit_test
# macOS builds and 10-bit test
- name: macOS 10-bit test # allowed to fail for now
os: osx
compiler: clang
script:
# Build and install SVT-AV1
- *base_script
# Run the 10-bit test
- *10bit_test
# GStreamer interation build
- name: GStreamer patch
env: build_type=release
addons:
apt:
packages:
- *native_deps
- libgstreamer-plugins-base1.0-dev
- libgstreamer1.0-dev
script:
# Build and install SVT-AV1
- *base_script
# Build GST-SVT-AV1 plugin
- cd $TRAVIS_BUILD_DIR/gstreamer-plugin
- "sudo chown -R travis: $HOME/.ccache"
- CFLAGS="" cmake .
- make --quiet -j$(nproc)
- sudo make install
# Tests if .ivf files are identical on binary level
- name: Binary Identical?
script:
- mv -t $HOME akiyo_cif.y4m
- mv -t $HOME Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m
- *base_script
- cd $HOME
- SvtAv1EncApp -enc-mode 8 -i akiyo_cif.y4m -n 120 -b test-pr-8bit-m8.ivf
- SvtAv1EncApp -enc-mode 0 -i akiyo_cif.y4m -n 3 -b test-pr-8bit-m0.ivf
- SvtAv1EncApp -enc-mode 8 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 120 -b test-pr-10bit-m8.ivf
- SvtAv1EncApp -enc-mode 0 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 3 -b test-pr-10bit-m0.ivf
- cd $TRAVIS_BUILD_DIR
- git fetch https://github.com/OpenVisualCloud/SVT-AV1.git master
- git checkout FETCH_HEAD
- rm -rf $TRAVIS_BUILD_DIR/Build/linux/${build_type:-Release}/*
- *base_script
- cd $HOME
- SvtAv1EncApp -enc-mode 8 -i akiyo_cif.y4m -n 120 -b test-master-8bit-m8.ivf
- SvtAv1EncApp -enc-mode 0 -i akiyo_cif.y4m -n 3 -b test-master-8bit-m0.ivf
- SvtAv1EncApp -enc-mode 8 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 120 -b test-master-10bit-m8.ivf
- SvtAv1EncApp -enc-mode 0 -i Chimera-Aerial_480x264_2997fps_10bit_420_150frames.y4m -n 3 -b test-master-10bit-m0.ivf
- diff test-pr-8bit-m8.ivf test-master-8bit-m8.ivf
- diff test-pr-8bit-m0.ivf test-master-8bit-m0.ivf
- diff test-pr-10bit-m8.ivf test-master-10bit-m8.ivf
- diff test-pr-10bit-m0.ivf test-master-10bit-m0.ivf
# Valgrind on Linux and macOS
- name: Valgrind
env: build_type=debug
addons:
apt:
packages:
- *native_deps
- valgrind
script:
- *base_script
- travis_wait 60 valgrind -- SvtAv1EncApp -enc-mode 4 -i akiyo_cif.y4m -n 20 -b test1.ivf