-
Notifications
You must be signed in to change notification settings - Fork 47
123 lines (99 loc) · 3.86 KB
/
Copy pathrust-ci.yml
File metadata and controls
123 lines (99 loc) · 3.86 KB
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
name: CI
on:
push:
branches: [ "main", "dev", "x" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
lints:
name: Clippy Matrix (${{ matrix.feature }})
runs-on: ubuntu-latest
container: jrottenberg/ffmpeg:8.1-ubuntu
strategy:
fail-fast: false
matrix:
feature:
- "all-features"
- ""
- "vision"
- "vlm"
- "ort-download-binaries,ort-api-24"
- "ort-load-dynamic,ort-api-24"
- "video"
- "viewer"
- "annotator"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libssl-dev ca-certificates clang curl pkg-config protobuf-compiler
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rustfmt
if: matrix.feature == 'all-features'
run: cargo fmt --all -- --check
- name: Clippy
run: |
if [ "${{ matrix.feature }}" = "all-features" ]; then
cargo clippy --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets -- -D warnings
elif [ "${{ matrix.feature }}" = "" ]; then
cargo clippy --no-default-features --all-targets -- -D warnings
else
cargo clippy --no-default-features --features "${{ matrix.feature }}" --all-targets -- -D warnings
fi
check:
name: cargo-check
runs-on: ubuntu-latest
container: jrottenberg/ffmpeg:8.1-ubuntu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libssl-dev ca-certificates clang curl pkg-config protobuf-compiler
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets
test:
name: cargo-test
runs-on: ubuntu-latest
container: jrottenberg/ffmpeg:8.1-ubuntu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libssl-dev ca-certificates clang curl pkg-config protobuf-compiler
- name: Setup Rust
uses: dtolnay/rust-toolchain@nightly
- name: Test
run: cargo +nightly test --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24" --all-targets
build-linux:
needs: test
name: cargo build / linux / ffmpeg ${{ matrix.ffmpeg_version }}
runs-on: ubuntu-latest
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
strategy:
matrix:
ffmpeg_version: [ "5.0", "5.1", "6.0", "6.1", "7.0", "7.1", "8.0", "8.1" ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libssl-dev ca-certificates clang curl pkg-config protobuf-compiler
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --no-default-features --features "all-models,video,viewer,annotator,ort-download-binaries,ort-load-dynamic,ort-api-24"