13
13
env :
14
14
CARGO_TERM_COLOR : always
15
15
CARGO_INCREMENTAL : 0
16
- RUSTFLAGS : " -D warnings"
17
- RUST_BACKTRACE : 1
16
+ RUST_LOG : info
17
+ RUST_FLAGS : " -D warnings"
18
+ RUST_BACKTRACE : " full"
18
19
19
20
jobs :
20
21
21
22
build-linux :
22
- name : build / linux / ffmpeg ${{ matrix.ffmpeg_version }}
23
+ name : build / linux / ffmpeg+opencv+pytorch
23
24
runs-on : ubuntu-latest
24
- container : jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
25
-
26
25
strategy :
27
26
matrix :
28
27
include :
29
- - ffmpeg_version : " 7.1"
30
- feature : " rsmpeg"
31
- fail-fast : false
28
+ - feature : " full,test-tch"
32
29
33
30
steps :
34
31
- name : Checkout
35
32
uses : actions/checkout@v4
36
33
37
34
- name : Install dependencies
38
35
run : |
39
- DEBIAN_FRONTEND=noninteractive apt-get update
40
- DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential ca-certificates clang curl pkg-config
36
+ sudo apt-get update
37
+ sudo apt-get install -y \
38
+ build-essential \
39
+ ca-certificates \
40
+ clang \
41
+ curl \
42
+ pkg-config \
43
+ software-properties-common \
44
+ wget \
45
+ cmake \
46
+ python3 \
47
+ python3-pip \
48
+ python3-dev \
49
+ ffmpeg \
50
+ libavcodec-dev \
51
+ libavdevice-dev \
52
+ libavfilter-dev \
53
+ libavformat-dev \
54
+ libavutil-dev \
55
+ libswresample-dev \
56
+ libswscale-dev \
57
+ libopencv-dev \
58
+ python3-opencv
41
59
42
60
- name : Setup Rust
43
61
uses : dtolnay/rust-toolchain@stable
44
62
45
63
- name : Build
46
64
run : cargo build --features ${{ matrix.feature }} --verbose
47
65
48
- # # TODO: Failed test on linux
49
- # undefined reference to symbol '__tls_get_addr@@GLIBC_2.3'
50
- # collect2: error: ld returned 1 exit status
51
- # - name: Run Test
52
- # run: cargo test --features ${{ matrix.feature }} --verbose -- --nocapture
66
+ - name : Run Test
67
+ run : cargo test --features ${{ matrix.feature }} --verbose -- --nocapture
53
68
54
69
build-macos :
55
- name : build / macos / latest ffmpeg
70
+ name : build / macos / ffmpeg+opencv+pytorch
56
71
runs-on : macos-latest
57
72
58
73
steps :
67
82
uses : dtolnay/rust-toolchain@stable
68
83
69
84
- name : Build
70
- run : cargo build --verbose
85
+ run : cargo build --all-features -- verbose
71
86
72
87
- name : Run Test
73
88
run : cargo test --verbose -- --nocapture
@@ -110,51 +125,34 @@ jobs:
110
125
# - name: Run Test
111
126
# run: cargo test --features ${{ matrix.feature }} --verbose -- --nocapture
112
127
113
- test :
128
+ fmt :
129
+ name : Rustfmt
114
130
runs-on : ubuntu-latest
115
- container : jrottenberg/ffmpeg:7.1-ubuntu
116
- strategy :
117
- matrix :
118
- include :
119
- - feature : " rsmpeg"
120
-
121
131
steps :
122
- - name : Checkout
123
- uses : actions/checkout@v4
124
-
125
- - name : Install dependencies
126
- run : |
127
- DEBIAN_FRONTEND=noninteractive apt-get update
128
- DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential ca-certificates clang curl pkg-config
129
-
130
- # - name: Setup Rust
131
- # uses: dtolnay/rust-toolchain@stable
132
- - name : Setup Rust
133
- uses : dtolnay/rust-toolchain@nightly
134
-
135
- - name : Test
136
- run : cargo +nightly test --features ${{ matrix.feature }} --verbose
132
+ - uses : actions/checkout@v2
133
+ - uses : actions-rs/toolchain@v1
134
+ with :
135
+ profile : minimal
136
+ toolchain : stable
137
+ override : true
138
+ - run : rustup component add rustfmt
139
+ - uses : actions-rs/cargo@v1
140
+ with :
141
+ command : fmt
142
+ args : --all -- --check
137
143
138
- lints :
144
+ clippy :
145
+ name : Clippy
139
146
runs-on : ubuntu-latest
140
- container : jrottenberg/ffmpeg:7.1-ubuntu
141
-
142
147
steps :
143
- - name : Checkout
144
- uses : actions/checkout@v4
145
-
146
- - name : Install dependencies
147
- run : |
148
- DEBIAN_FRONTEND=noninteractive apt-get update
149
- DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential ca-certificates clang curl pkg-config
150
-
151
- - name : Setup Rust
152
- uses : dtolnay/rust-toolchain@stable
148
+ - uses : actions/checkout@v2
149
+ - uses : actions-rs/toolchain@v1
153
150
with :
154
- components : rustfmt, clippy
155
-
156
- - name : Rustfmt
157
- run : cargo fmt --all -- --check
158
-
159
- - name : Clippy
160
- run : cargo clippy --all-features -- -D warnings
151
+ profile : minimal
152
+ toolchain : stable
153
+ override : true
154
+ - run : rustup component add clippy
155
+ - uses : actions-rs/cargo@v1
156
+ with :
157
+ command : clippy
158
+ args : --examples --tests --all-features --all -- -D warnings
0 commit comments