-
Notifications
You must be signed in to change notification settings - Fork 91
79 lines (79 loc) · 2.48 KB
/
build.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
name: build
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
build-test-lint:
name: FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
runs-on: ubuntu-latest
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
strategy:
matrix:
ffmpeg_version: ['3.3', '3.4', '4.0', '4.1', '4.2', '4.3', '4.4', '5.0', '5.1', '6.0', '6.1']
fail-fast: false
env:
FEATURES: avcodec,avdevice,avfilter,avformat,postproc,swresample,swscale
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
apt update
apt install -y --no-install-recommends clang curl pkg-config
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Build
run: |
cargo build --features $FEATURES
- name: Test
run: |
cargo test --features $FEATURES
- name: Lint
run: |
cargo clippy --features $FEATURES -- -D warnings
- name: Check format
run: |
cargo fmt -- --check
# Added only because there is no ffmpeg7.0 docker image here yet
# https://github.com/jrottenberg/ffmpeg
# Note that postproc feature is not tested here
build-test-lint-7-0:
name: FFmpeg 7.0 - build, test and lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
FEATURES: avcodec,avdevice,avfilter,avformat,swresample,swscale #,postproc
FFMPEG_DIR: /home/runner/work/rust-ffmpeg-sys/rust-ffmpeg-sys/ffmpeg-7.0-linux-clang-default
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends clang curl pkg-config xz-utils
curl -L https://sourceforge.net/projects/avbuild/files/linux/ffmpeg-7.0-linux-clang-default.tar.xz/download -o ffmpeg.tar.xz
tar -xf ffmpeg.tar.xz
pwd
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Build
run: |
cargo build --features $FEATURES
- name: Test
run: |
cargo test --features $FEATURES
- name: Lint
run: |
cargo clippy --features $FEATURES -- -D warnings
- name: Check format
run: |
cargo fmt -- --check