forked from xiph/rav1e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (117 loc) · 3.66 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
language: rust
dist: bionic
env:
- RUST_BACKTRACE=1
addons:
apt:
packages:
- binutils-dev
- libcurl4-openssl-dev
- zlib1g-dev
- libdw-dev
- libiberty-dev
- ninja-build
- python3-setuptools
- python3-pip
- python3-wheel
- libsdl2-dev
- libvulkan-dev
- ruby # needed by casher on arm64
before_install:
- export BUILD_DIR="$TRAVIS_HOME/.build"
- export DEPS_DIR="$TRAVIS_HOME/.local"
- export ARCH="`uname -m`"
- mkdir -p "$BUILD_DIR"
- mkdir -p "$DEPS_DIR/bin"
- mkdir -p "$DEPS_DIR/lib/pkgconfig"
- export PATH="$PATH:$DEPS_DIR/bin"
- export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$DEPS_DIR/lib/pkgconfig:$DEPS_DIR/lib/$ARCH-linux-gnu/pkgconfig"
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEPS_DIR/lib:$DEPS_DIR/lib/$ARCH-linux-gnu"
- pip3 install meson
- source "$TRAVIS_BUILD_DIR/.travis/install-sccache.sh"
- export SCCACHE_CACHE_SIZE=500M
- export SCCACHE_DIR="$TRAVIS_HOME/.cache/sccache"
- bash "$TRAVIS_BUILD_DIR/.travis/install-nasm.sh"
- bash "$TRAVIS_BUILD_DIR/.travis/install-kcov.sh"
- bash "$TRAVIS_BUILD_DIR/.travis/install-aom.sh"
- aomenc --help | grep "AV1 Encoder"
- bash "$TRAVIS_BUILD_DIR/.travis/install-dav1d.sh"
- dav1d --version
- cd "$TRAVIS_BUILD_DIR"
cache:
directories:
- $TRAVIS_HOME/.cache/sccache
- $TRAVIS_HOME/.local
after_script:
- sccache -s
jobs:
include:
- name: "Code Formatting"
rust: stable
script:
- rustup component add rustfmt
- cargo fmt -- --check
env:
- CACHE_NAME=RUSTFMT
- name: "Build & Coveralls"
rust: stable
script:
- which cargo-kcov || cargo install cargo-kcov
# We need to run cargo clean to avoid caching issues
- cargo clean
- RUSTFLAGS="-C link-dead-code" cargo build --features=decode_test,decode_test_dav1d,quick_test --tests --verbose
- cargo kcov -v --coveralls --no-clean-rebuild -- --verify --exclude-pattern="$HOME/.cargo,aom_build,.h,test"
env:
- CACHE_NAME=COVERALLS
- name: "Minimum Supported Rustc"
# This should reference the earliest supported rustc version
# and should match the version number in build.rs
rust: 1.36.0
script:
- cargo test --features=decode_test,decode_test_dav1d,quick_test,capi --verbose
env:
- CACHE_NAME=MIN_RUSTC
- name: "Ignored Tests (aom)"
rust: stable
script:
- travis_wait 60 cargo test --release --features=decode_test --verbose --color=always -- --color=always --ignored
env:
- CACHE_NAME=IGNORED_TESTS_AOM
branches:
only:
- master
- name: "Ignored Tests (dav1d)"
rust: stable
script:
- travis_wait 60 cargo test --release --features=decode_test_dav1d --verbose --color=always -- --color=always --ignored
env:
- CACHE_NAME=IGNORED_TESTS_DAV1D
branches:
only:
- master
- name: "Bench"
rust: stable
script: cargo bench --features=bench --no-run --verbose
env:
- CACHE_NAME=BENCH
- name: "Doc & Clippy (linter): verifying code quality"
rust: stable
script:
- cargo doc --verbose --no-deps
- rustup component add clippy
- cargo clippy --version
- cargo clippy -- -D warnings --verbose
env:
- CACHE_NAME=CLIPPY
- name: "No default features"
rust: stable
script:
- cargo check --no-default-features
env:
- CACHE_NAME=CHECK
- name: "Extra features"
rust: stable
script:
- cargo check --features=capi,dump_lookahead_data
env:
- CACHE_NAME=CHECK_EXTRA_FEATURES