forked from xiph/rav1e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
164 lines (148 loc) · 3.55 KB
/
.gitlab-ci.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
variables:
CARGO_HOME: $CI_PROJECT_DIR/.cargo
LATEST_IMAGE_TAG: '1.37'
MINIMUM_IMAGE_TAG: '1.36'
stages:
- check
- lint
- build
- test
- doc
cache:
paths:
- $CARGO_HOME
key: rav1e-${CI_COMMIT_REF_SLUG}
before_script:
- ls target/ || true
- ls $CARGO_HOME || true
- rustc --version
- nasm --version
- aomenc --help | grep 'AOMedia Project AV1 Encoder'
- dav1d --version
- kcov --version
image: registry.gitlab.xiph.org/xiph/rav1e-docker/rust-rav1e:$LATEST_IMAGE_TAG
Latest Stable Rustc:
stage: check
tags:
- docker
- alpine
script:
- cargo check --features=decode_test,decode_test_dav1d,quick_test --tests
artifacts:
paths:
- target/
- Cargo.lock
expire_in: 4 hours
Minimum Rustc:
image: registry.gitlab.xiph.org/xiph/rav1e-docker/rust-rav1e:$MINIMUM_IMAGE_TAG
stage: check
tags:
- docker
- alpine
script:
- cargo check --features=decode_test,decode_test_dav1d,quick_test --tests
No Default Features:
stage: check
tags:
- docker
- alpine
script:
- cargo check --no-default-features
CAPI and Debugging Features:
stage: check
tags:
- docker
- alpine
script:
- cargo check --features=capi,dump_lookahead_data
Compile Benchmarks:
stage: check
tags:
- docker
- alpine
script:
- cargo check --features=bench --benches
Clippy Lints:
stage: lint
dependencies:
- Latest Stable Rustc
tags:
- docker
- alpine
script:
- touch src/lib.rs # Ensure cargo re-checks rav1e, since we ran `cargo check` earlier
- >-
cargo clippy -- -D warnings -A clippy::cast_lossless -A clippy::cast_ptr_alignment
-A clippy::cognitive_complexity -A clippy::needless_range_loop -A clippy::too_many_arguments
-A clippy::verbose_bit_mask -A clippy::unreadable_literal -A clippy::many_single_char_names
Code Styles:
stage: lint
tags:
- docker
- alpine
script:
- cargo fmt -- --check
Build rav1e:
stage: build
dependencies:
- Latest Stable Rustc
tags:
- docker
- alpine
script:
- RUSTFLAGS="-C link-dead-code" cargo build --features=decode_test,decode_test_dav1d,quick_test --tests
artifacts:
paths:
- target/
- Cargo.lock
expire_in: 4 hours
Coveralls Tests:
stage: test
dependencies:
- Build rav1e
tags:
- docker
- alpine
variables:
CI_NAME: Gitlab
CI_BUILD_NUMBER: "$CI_PIPELINE_ID"
CI_BUILD_URL: "$CI_PIPELINE_URL"
CI_BRANCH: "$CI_COMMIT_REF_NAME"
CI_PULL_REQUEST: "$CI_MERGE_REQUEST_ID"
# This is named "Travis", but it also allows cargo-kcov to use a repo_token to push to Coveralls
TRAVIS_JOB_ID: ""
script:
# Currently not pushing to coveralls. Add `--coveralls` to the first half when ready to enable.
# Requires TRAVIS_JOB_ID to be set to coveralls repo_token (via Gitlab secrets) first.
- cargo kcov -v --no-clean-rebuild -- --verify --exclude-pattern="$HOME/.cargo,aom_build,.h,test"
Slow Tests (aom):
stage: test
dependencies:
- Latest Stable Rustc
tags:
- docker
- alpine
script:
- cargo test --release --features=decode_test --color=always -- --color=always --ignored
Slow Tests (dav1d):
stage: test
dependencies:
- Latest Stable Rustc
tags:
- docker
- alpine
script:
- cargo test --release --features=decode_test_dav1d --color=always -- --color=always --ignored
Generate Docs:
stage: doc
dependencies:
- Latest Stable Rustc
tags:
- docker
- alpine
script:
- cargo doc --no-deps
artifacts:
paths:
- target/doc/
expire_in: 1 week