Skip to content

Commit f050a92

Browse files
committed
Merge remote-tracking branch 'origin/smoke-tests' into test_report
2 parents 7bbdf97 + 18bcc5c commit f050a92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1849
-409
lines changed

.github/configs/actionlint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
self-hosted-runner:
2+
# Labels of self-hosted runner in array of strings.
3+
labels:
4+
- DPDK
5+
- runner-1
6+
- runner-4
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
name: Base Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
branch:
7+
required: false
8+
type: string
9+
default: "main"
10+
description: "Branch to checkout"
11+
tag:
12+
required: false
13+
type: string
14+
description: "Tag to checkout"
15+
runner:
16+
required: false
17+
type: string
18+
default: "runner-4"
19+
description: "Runner to use for the build job"
20+
21+
env:
22+
BUILD_TYPE: Release
23+
BUILD_DIR: "${{ github.workspace }}/_build"
24+
DEBIAN_FRONTEND: noninteractive
25+
MTL_BUILD_DISABLE_PCAPNG: true
26+
PREFIX_DIR: "${{ github.workspace }}/_install"
27+
28+
defaults:
29+
run:
30+
shell: bash
31+
32+
permissions:
33+
contents: read
34+
35+
concurrency:
36+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
37+
cancel-in-progress: true
38+
39+
jobs:
40+
build-baremetal-ubuntu:
41+
runs-on: ${{ inputs.runner }}
42+
timeout-minutes: 120
43+
steps:
44+
- name: "Harden Runner"
45+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
46+
with:
47+
egress-policy: audit
48+
- name: "Fix permissions before checkout"
49+
run: |
50+
if [ -d "${{ github.workspace }}" ]; then
51+
sudo chown -R "${USER}" "${{ github.workspace }}" || true
52+
sudo chmod -R u+w "${{ github.workspace }}" || true
53+
fi
54+
55+
- name: "Checkout repository"
56+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
57+
with:
58+
ref: ${{ inputs.tag || inputs.branch }}
59+
60+
- name: "Install OS level dependencies"
61+
run: eval 'source scripts/setup_build_env.sh && install_package_dependencies'
62+
63+
- name: "Check local dependencies build cache"
64+
id: load-local-dependencies-cache
65+
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
66+
with:
67+
path: ${{ env.BUILD_DIR }}
68+
key: ${{ runner.os }}-${{ hashFiles('versions.env') }}-${{ hashFiles('scripts/setup*.sh') }}
69+
70+
- name: "Download, unpack and patch build dependencies"
71+
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
72+
run: eval 'source scripts/setup_build_env.sh && get_download_unpack_dependencies'
73+
74+
- name: "Clone and patch ffmpeg 7.0"
75+
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
76+
run: |
77+
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "7.0"
78+
79+
- name: "Build and Install xdp and libbpf"
80+
run: eval 'source scripts/setup_build_env.sh && lib_install_xdp_bpf_tools'
81+
82+
- name: "Build and Install libfabric"
83+
run: eval 'source scripts/setup_build_env.sh && lib_install_fabrics'
84+
85+
- name: "Build and Install the DPDK (skipped: already installed on runner)"
86+
if: always() && false # Always skip this step for now
87+
run: |
88+
echo "Skipping DPDK build and install as it is already installed on the machine."
89+
# eval 'source scripts/setup_build_env.sh && lib_install_dpdk'
90+
91+
- name: "Check if DPDK version needs to be updated"
92+
id: check_dpdk_version
93+
run: |
94+
if grep -q "DPDK_VER=25.03" "${{ github.workspace }}/versions.env" && \
95+
grep -q "DPDK_VER=25.03" "${{ github.workspace }}/ffmpeg-plugin/versions.env" && \
96+
grep -q "DPDK_VER=25.03" "${{ github.workspace }}/media-proxy/versions.env" && \
97+
grep -q "DPDK_VER=25.03" "${{ github.workspace }}/sdk/versions.env"; then
98+
echo "DPDK version is already set correctly."
99+
echo "need_update=false" >> "$GITHUB_OUTPUT"
100+
else
101+
echo "DPDK version needs to be updated."
102+
echo "need_update=true" >> "$GITHUB_OUTPUT"
103+
fi
104+
105+
- name: "Switch DPDK version to currently used on the machine"
106+
if: steps.check_dpdk_version.outputs.need_update == 'true'
107+
run: |
108+
sed -i 's|DPDK_VER=23.11|DPDK_VER=25.03|g' \
109+
"${{ github.workspace }}/versions.env" \
110+
"${{ github.workspace }}/ffmpeg-plugin/versions.env" \
111+
"${{ github.workspace }}/media-proxy/versions.env" \
112+
"${{ github.workspace }}/sdk/versions.env"
113+
114+
- name: "Check if MTL version needs to be updated"
115+
id: check_mtl_version
116+
run: |
117+
if grep -q "MTL_VER=main" "${{ github.workspace }}/versions.env" && \
118+
grep -q "MTL_VER=main" "${{ github.workspace }}/ffmpeg-plugin/versions.env" && \
119+
grep -q "MTL_VER=main" "${{ github.workspace }}/media-proxy/versions.env" && \
120+
grep -q "MTL_VER=main" "${{ github.workspace }}/sdk/versions.env"; then
121+
echo "MTL version is already set correctly."
122+
echo "need_update=false" >> "$GITHUB_OUTPUT"
123+
else
124+
echo "MTL version needs to be updated."
125+
echo "need_update=true" >> "$GITHUB_OUTPUT"
126+
fi
127+
128+
- name: "Switch MTL version to currently used on the machine"
129+
if: steps.check_mtl_version.outputs.need_update == 'true'
130+
run: |
131+
sed -i 's|MTL_VER=v25.02|MTL_VER=main|g' \
132+
"${{ github.workspace }}/versions.env" \
133+
"${{ github.workspace }}/ffmpeg-plugin/versions.env" \
134+
"${{ github.workspace }}/media-proxy/versions.env" \
135+
"${{ github.workspace }}/sdk/versions.env"
136+
137+
- name: "Build and Install the MTL(skipped: already installed on runner)"
138+
if: always() && false # Always skip this step for now
139+
run: |
140+
echo "Skipping MTL build and install as it is already installed on the machine."
141+
# eval 'source scripts/setup_build_env.sh && lib_install_mtl'
142+
143+
- name: "Build and Install JPEG XS"
144+
run: eval 'source scripts/setup_build_env.sh && lib_install_jpeg_xs'
145+
146+
- name: "Build and Install JPEG XS ffmpeg plugin"
147+
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl_jpeg_xs_plugin'
148+
149+
- name: "Build gRPC and dependencies"
150+
run: eval 'source scripts/setup_build_env.sh && lib_install_grpc'
151+
152+
- name: "Build MCM SDK and Media Proxy"
153+
run: eval 'source scripts/common.sh && ./build.sh "${PREFIX_DIR}"'
154+
155+
- name: "Build FFmpeg 7.0 with MCM plugin"
156+
working-directory: ${{ github.workspace }}/ffmpeg-plugin
157+
run: |
158+
./configure-ffmpeg.sh "7.0" --prefix=${{ env.BUILD_DIR }}/ffmpeg-7-0 --disable-doc --disable-debug && \
159+
./build-ffmpeg.sh "7.0"
160+
161+
- name: Install RxTxApp dependencies
162+
run: sudo apt-get update && sudo apt-get install -y libjansson-dev
163+
- name: "build RxTxApp"
164+
working-directory: ${{ github.workspace }}/tests/tools/TestApp
165+
run: |
166+
rm -rf build && \
167+
mkdir build && cd build && \
168+
cmake .. && \
169+
make
170+
- name: "clone FFMPEG repository"
171+
run: |
172+
echo "Cloning FFMPEG repository"
173+
- name: "clone MTL repository"
174+
run: |
175+
echo "Cloning MTL repository"
176+
- name: "build MTL FFMPEG"
177+
run: |
178+
echo "Building MTL FFMPEG"
179+
180+
- name: "upload media-proxy and mcm binaries"
181+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
182+
with:
183+
name: mcm-build
184+
path: |
185+
${{ env.BUILD_DIR }}/mcm/bin/media_proxy
186+
${{ env.BUILD_DIR }}/mcm/bin/mesh-agent
187+
${{ env.BUILD_DIR }}/mcm/lib/libmcm_dp.so.*
188+
${{ env.BUILD_DIR }}/ffmpeg-7-0/ffmpeg
189+
${{ env.BUILD_DIR }}/ffmpeg-7-0/lib/**

.github/workflows/base_build.yml

Lines changed: 91 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,23 @@ name: Base Build
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
6+
paths-ignore:
7+
- "**/*.md"
8+
- "tests/**"
9+
- "docs/**"
10+
- "LICENSE"
11+
- ".gitignore"
12+
- ".editorconfig"
613
pull_request:
7-
branches: [ "main" ]
14+
branches: ["main"]
15+
paths-ignore:
16+
- "**/*.md"
17+
- "tests/**"
18+
- "docs/**"
19+
- "LICENSE"
20+
- ".gitignore"
21+
- ".editorconfig"
822
workflow_dispatch:
923

1024
env:
@@ -27,80 +41,80 @@ concurrency:
2741

2842
jobs:
2943
build-baremetal-ubuntu:
30-
runs-on: 'ubuntu-22.04'
44+
runs-on: "ubuntu-22.04"
3145
timeout-minutes: 120
3246
steps:
33-
- name: 'Harden Runner'
34-
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
35-
with:
36-
egress-policy: audit
37-
38-
- name: 'Checkout repository'
39-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
40-
41-
- name: 'Install OS level dependencies'
42-
run: eval 'source scripts/setup_build_env.sh && install_package_dependencies'
43-
44-
- name: 'Check local dependencies build cache'
45-
id: load-local-dependencies-cache
46-
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
47-
with:
48-
path: ${{ env.BUILD_DIR }}
49-
key: ${{ runner.os }}-${{ hashFiles('versions.env') }}-${{ hashFiles('scripts/setup*.sh') }}
50-
51-
- name: 'Download, unpack and patch build dependencies'
52-
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
53-
run: eval 'source scripts/setup_build_env.sh && get_download_unpack_dependencies'
54-
55-
- name: 'Clone and patch ffmpeg 6.1 and 7.0'
56-
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
57-
run: |
58-
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "6.1"
59-
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "7.0"
60-
61-
- name: 'Build and Install xdp and libbpf'
62-
run: eval 'source scripts/setup_build_env.sh && lib_install_xdp_bpf_tools'
63-
64-
- name: 'Build and Install libfabric'
65-
run: eval 'source scripts/setup_build_env.sh && lib_install_fabrics'
66-
67-
- name: 'Build and Install the DPDK'
68-
run: eval 'source scripts/setup_build_env.sh && lib_install_dpdk'
69-
70-
- name: 'Build and Install the MTL'
71-
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl'
72-
73-
- name: 'Build and Install JPEG XS'
74-
run: eval 'source scripts/setup_build_env.sh && lib_install_jpeg_xs'
75-
76-
- name: 'Build and Install JPEG XS ffmpeg plugin'
77-
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl_jpeg_xs_plugin'
78-
79-
- name: 'Build gRPC and dependencies'
80-
run: eval 'source scripts/setup_build_env.sh && lib_install_grpc'
81-
82-
- name: 'Build MCM SDK and Media Proxy'
83-
run: eval 'source scripts/common.sh && ./build.sh "${PREFIX_DIR}"'
84-
85-
- name: 'Build FFmpeg 6.1 with MCM plugin'
86-
working-directory: ${{ github.workspace }}/ffmpeg-plugin
87-
run: |
88-
./configure-ffmpeg.sh "6.1" --disable-doc --disable-debug && \
89-
./build-ffmpeg.sh "6.1"
90-
91-
- name: 'Build FFmpeg 7.0 with MCM plugin'
92-
working-directory: ${{ github.workspace }}/ffmpeg-plugin
93-
run: |
94-
./configure-ffmpeg.sh "7.0" --disable-doc --disable-debug && \
95-
./build-ffmpeg.sh "7.0"
96-
97-
- name: 'upload media-proxy and mcm binaries'
98-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
99-
with:
100-
name: mcm-build
101-
path: |
102-
${{ env.BUILD_DIR }}/mcm/bin/media_proxy
103-
${{ env.BUILD_DIR }}/mcm/bin/mesh-agent
104-
${{ env.BUILD_DIR }}/mcm/lib/libmcm_dp.so.*
105-
${{ env.BUILD_DIR }}/ffmpeg-6-1/ffmpeg
106-
${{ env.BUILD_DIR }}/ffmpeg-7-0/ffmpeg
47+
- name: "Harden Runner"
48+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
49+
with:
50+
egress-policy: audit
51+
52+
- name: "Checkout repository"
53+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
54+
55+
- name: "Install OS level dependencies"
56+
run: eval 'source scripts/setup_build_env.sh && install_package_dependencies'
57+
58+
- name: "Check local dependencies build cache"
59+
id: load-local-dependencies-cache
60+
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
61+
with:
62+
path: ${{ env.BUILD_DIR }}
63+
key: ${{ runner.os }}-${{ hashFiles('versions.env') }}-${{ hashFiles('scripts/setup*.sh') }}
64+
65+
- name: "Download, unpack and patch build dependencies"
66+
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
67+
run: eval 'source scripts/setup_build_env.sh && get_download_unpack_dependencies'
68+
69+
- name: "Clone and patch ffmpeg 6.1 and 7.0"
70+
if: steps.load-local-dependencies-cache.outputs.cache-hit != 'true'
71+
run: |
72+
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "6.1"
73+
ffmpeg-plugin/clone-and-patch-ffmpeg.sh "7.0"
74+
75+
- name: "Build and Install xdp and libbpf"
76+
run: eval 'source scripts/setup_build_env.sh && lib_install_xdp_bpf_tools'
77+
78+
- name: "Build and Install libfabric"
79+
run: eval 'source scripts/setup_build_env.sh && lib_install_fabrics'
80+
81+
- name: "Build and Install the DPDK"
82+
run: eval 'source scripts/setup_build_env.sh && lib_install_dpdk'
83+
84+
- name: "Build and Install the MTL"
85+
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl'
86+
87+
- name: "Build and Install JPEG XS"
88+
run: eval 'source scripts/setup_build_env.sh && lib_install_jpeg_xs'
89+
90+
- name: "Build and Install JPEG XS ffmpeg plugin"
91+
run: eval 'source scripts/setup_build_env.sh && lib_install_mtl_jpeg_xs_plugin'
92+
93+
- name: "Build gRPC and dependencies"
94+
run: eval 'source scripts/setup_build_env.sh && lib_install_grpc'
95+
96+
- name: "Build MCM SDK and Media Proxy"
97+
run: eval 'source scripts/common.sh && ./build.sh "${PREFIX_DIR}"'
98+
99+
- name: "Build FFmpeg 6.1 with MCM plugin"
100+
working-directory: ${{ github.workspace }}/ffmpeg-plugin
101+
run: |
102+
./configure-ffmpeg.sh "6.1" --disable-doc --disable-debug && \
103+
./build-ffmpeg.sh "6.1"
104+
105+
- name: "Build FFmpeg 7.0 with MCM plugin"
106+
working-directory: ${{ github.workspace }}/ffmpeg-plugin
107+
run: |
108+
./configure-ffmpeg.sh "7.0" --disable-doc --disable-debug && \
109+
./build-ffmpeg.sh "7.0"
110+
111+
- name: "upload media-proxy and mcm binaries"
112+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
113+
with:
114+
name: mcm-build
115+
path: |
116+
${{ env.BUILD_DIR }}/mcm/bin/media_proxy
117+
${{ env.BUILD_DIR }}/mcm/bin/mesh-agent
118+
${{ env.BUILD_DIR }}/mcm/lib/libmcm_dp.so.*
119+
${{ env.BUILD_DIR }}/ffmpeg-6-1/ffmpeg
120+
${{ env.BUILD_DIR }}/ffmpeg-7-0/ffmpeg

0 commit comments

Comments
 (0)