-
Notifications
You must be signed in to change notification settings - Fork 55
144 lines (125 loc) · 4.46 KB
/
ffmpeg_plugin.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
name: FFmpeg plugin build
on:
# allow manually trigger
workflow_dispatch:
push:
branches:
- main
- 'maint-**'
pull_request:
branches:
- main
- 'maint-**'
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.ffmpeg_plugin == 'true' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2
id: filter
with:
filters: .github/path_filters.yml
build:
needs: changes
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
container:
image: ubuntu:latest
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Update to latest git
run: |
apt-get update -y
apt-get install -y git
- name: Git config
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
- name: checkout kahawai repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: checkout openh264 repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'cisco/openh264'
ref: openh264v2.4.0
path: openh264
- name: checkout FFmpeg repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'FFmpeg/FFmpeg'
path: FFmpeg
fetch-depth: 0
- name: Install the build dependency
run: |
apt-get update -y
apt-get install -y sudo git gcc meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev
apt-get install -y dpdk-dev
apt-get install -y nasm yasm
apt-get install -y libavcodec-dev
apt-get install -y make m4 clang llvm zlib1g-dev libelf-dev libcap-ng-dev gcc-multilib
apt-get install -y systemtap-sdt-dev
- name: Build
run: |
./build.sh
- name: Build st22 avcodec plugin
run: |
./script/build_st22_avcodec_plugin.sh
- name: Build openh264
run: |
cd openh264/
make -j "$(nproc)"
sudo make install
sudo ldconfig
cd ../
- name: Build ffmpeg 7.0 plugin
run: |
cd FFmpeg/
git checkout release/7.0
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.c ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.h ./libavdevice/
git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
make clean || true
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
make -j "$(nproc)"
sudo make install
sudo ldconfig
cd ../
- name: Build ffmpeg 6.1 plugin
run: |
cd FFmpeg/
git checkout release/6.1
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.c ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.h ./libavdevice/
git am ../ecosystem/ffmpeg_plugin/6.1/*.patch
make clean || true
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
make -j "$(nproc)"
sudo make install
sudo ldconfig
cd ../
- name: Build ffmpeg 4.4 plugin
run: |
cd FFmpeg/
git checkout release/4.4
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.c ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/mtl_*.h ./libavdevice/
git am ../ecosystem/ffmpeg_plugin/4.4/*.patch
make clean || true
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
make -j "$(nproc)"
sudo make install
sudo ldconfig
cd ../