-
Notifications
You must be signed in to change notification settings - Fork 55
/
action.yml
144 lines (129 loc) · 3.69 KB
/
action.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: Windows MSYS2 Composite build
env:
# FIXME: For some reason enabling jit debugging "fixes" random python crashes
# see https://github.com/msys2/MINGW-packages/issues/11864 and
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3280#note_1678973
MSYS: winjitdebug
permissions:
contents: read
inputs:
sys:
description: MSYS2 support on systems MinGW64, Ucrt64
required: true
default: mingw64
dpdk:
description: DPDK support version on Media Transport
required: true
default: 23.11
tap:
description: Enable TAP device
required: true
default: true
runs:
using: 'composite'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Install dependencies
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff # v2
with:
msystem: ${{inputs.sys}}
update: true
install: >-
git
base-devel
unzip
zip
pacboy: >-
pkgconf:p
openssl:p
gcc:p
meson:p
json-c:p
libpcap:p
gtest:p
SDL2:p
SDL2_ttf:p
dlfcn:p
binutils:p
clang:p
diffutils:p
libx264:p
libva:p
ffnvcodec-headers:p
nasm:p
yasm:p
- name: Install tools
shell: msys2 {0}
run: |
wget https://nmap.org/npcap/dist/npcap-sdk-1.12.zip
unzip -d npcap-sdk npcap-sdk-1.12.zip
cp npcap-sdk/Lib/x64/* $MSYSTEM_PREFIX/lib/
git clone https://github.com/alitrack/mman-win32
cd mman-win32
./configure --prefix=$MSYSTEM_PREFIX
make && make install
- name: Checkout MTL repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'OpenVisualCloud/Media-Transport-Library'
ref: main
path: .
- name: Checkout DPDK repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'DPDK/dpdk'
ref: v${{inputs.dpdk}}
path: dpdk
clean: true
- name: Convert symlink patch files to real file
shell: msys2 {0}
run: |
cd patches/dpdk/${{inputs.dpdk}}
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
cd windows
ls *.patch | xargs -I{} bash -c 'if [[ $(sed -n '1p' "{}") =~ ^../.*\.patch$ ]]; then cp "$(cat "{}")" "{}"; fi'
- name: Apply patches for DPDK
shell: bash
run: |
cd dpdk
git config user.name github-actions
git config user.email [email protected]
git am ../patches/dpdk/${{inputs.dpdk}}/*.patch
git am ../patches/dpdk/${{inputs.dpdk}}/windows/*.patch
- name: Build dpdk
shell: msys2 {0}
run: |
cd dpdk
meson setup build
meson install -C build
- name: Build MTL lib
shell: msys2 {0}
run: |
meson setup build
meson install -C build
- name: Build MTL app
shell: msys2 {0}
run: |
cd app
meson setup build
meson compile -C build
- name: Build MTL test
shell: msys2 {0}
run: |
cd tests
meson setup build
meson compile -C build
- name: Build MTL plugins
shell: msys2 {0}
run: |
cd plugins
meson setup build
meson install -C build
- name: Build MTL lib with TAP
shell: msys2 {0}
run: |
meson setup tap_build -Denable_tap=${{inputs.tap}}
meson install -C tap_build