forked from Netflix/vmaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (94 loc) · 2.97 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
os: linux
dist: bionic
language: c++
cache: ccache
addons:
apt:
update: true
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
packages:
- python3-pip
- ninja-build
- python3-setuptools
- ccache
- yasm
homebrew:
packages:
- ninja
- ccache
- yasm
update: true
before_install: "sudo chown -R travis: $HOME/.ccache"
install:
- ccache -s
- pip3 install meson
- |
if type apt-get; then
case "$CC" in
gcc-7) sudo apt-get install -qq gcc-7 g++-7 ;;
gcc-8) sudo apt-get install -qq gcc-8 g++-8 ;;
gcc-9) sudo apt-get install -qq gcc-9 g++-9 ;;
clang-6.0) sudo apt-get install -qq clang-6.0 ;;
clang) sudo apt-get install -qq clang ;;
esac
fi
- export CC="ccache $CC" CXX="ccache $CXX"
after_script:
- ccache -s
matrix:
fast_finish: true
include:
- name: libvmaf GCC-7
env: CC=gcc-7 CXX=g++-7
script: &base-gcc-script
- mkdir libvmaf/build && cd libvmaf/build
- meson .. --buildtype release
- sudo ninja -v install
- sudo ninja -v test
- cd $TRAVIS_BUILD_DIR
- name: libvmaf GCC-9
env: CC=gcc-9 CXX=g++-9
script: *base-gcc-script
- name: libvmaf Clang
env: CC=clang CXX=clang++
script: *base-gcc-script
- name: libvmaf AppleClang
os: osx
osx_image: xcode11.2
compiler: clang
script: *base-gcc-script
- name: Python3 Tox
language: python
python: "3.7"
env: CC=gcc-7 CXX=g++-7
cache: &python-cache
pip: true
directories:
- $HOME/.ccache
before_script: *base-gcc-script
script: &python-tox
- pip3 install tox-travis
- make -C third_party/libsvm -j lib
- tox -c python/ -- -v -p no:warnings -m 'main or lib' --doctest-modules
- name: libvmaf FFmpeg
before_script: *base-gcc-script
script:
- git clone https://github.com/FFmpeg/FFmpeg --branch master --depth=1 ffmpeg && cd ffmpeg
- "sudo chown -R travis: $HOME/.ccache"
- CFLAGS="-static" ./configure --enable-libvmaf --enable-version3 || less ffbuild/config.log
- make --quiet -j $(nproc) && sudo make install
- curl https://gist.githubusercontent.com/1480c1/0c4575da638ef6e8203feffd0597de16/raw/akiyo_cif.tar.xz.base64 | base64 -d | tar xJ
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/x86_64-linux-gnu
- vmaf_score=$(ffmpeg -hide_banner -nostats -i encoded.mkv -i orig.mkv -filter_complex libvmaf -f null - 2>&1 | grep 'VMAF score' | tr ' ' '\n' | tail -n1)
- echo "$vmaf_score"
- |
if [[ $vmaf_score != "93.665821" ]]; then
echo "vmaf Score doesn't match 93.665821"
return 1
else
echo "vmaf score matches"
return 0
fi