Skip to content

Commit c6fde5e

Browse files
Ci: nightly tests not working
1 parent e05ec2d commit c6fde5e

File tree

5 files changed

+97
-97
lines changed

5 files changed

+97
-97
lines changed

.github/actions/build/action.yml

Lines changed: 11 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,14 @@ name: Build
22
runs:
33
using: composite
44
steps:
5-
- name: 'preparation: Checkout openh264'
6-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7-
with:
8-
repository: 'cisco/openh264'
9-
ref: 'openh264v2.4.0'
10-
path: 'openh264'
11-
- name: 'preparation: Checkout FFmpeg'
12-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13-
with:
14-
repository: 'FFmpeg/FFmpeg'
15-
ref: 'release/7.0'
16-
path: 'ffmpeg'
17-
- name: 'configuration: Install the build dependency'
18-
run: |
19-
sudo apt update
20-
sudo apt-get remove -y pipenv || true
21-
sudo apt-get install -y \
22-
git gcc meson tar zip \
23-
pkg-config \
24-
python3 \
25-
python3-pyelftools \
26-
python3-virtualenv \
27-
python3-pip \
28-
libnuma-dev \
29-
libjson-c-dev \
30-
libpcap-dev \
31-
libgtest-dev \
32-
libsdl2-dev \
33-
libsdl2-ttf-dev \
34-
libssl-dev \
35-
systemtap-sdt-dev \
36-
libbpf-dev \
37-
libelf1 \
38-
gstreamer1.0-plugins-base \
39-
gstreamer1.0-plugins-good \
40-
gstreamer1.0-tools \
41-
gstreamer1.0-libav \
42-
libgstreamer1.0-dev \
43-
libgstreamer-plugins-base1.0-dev \
44-
patch \
45-
unzip
46-
shell: bash
47-
- name: 'installation: Build mtl'
48-
run: |
49-
./build.sh
50-
sudo ldconfig
51-
shell: bash
52-
- name: 'installation: Build FFmpeg'
53-
working-directory: ecosystem/ffmpeg_plugin
54-
run: ./build.sh
55-
shell: bash
56-
- name: 'installation: Build GStreamer'
57-
working-directory: ecosystem/gstreamer_plugin
58-
run: |
59-
./build.sh
60-
shell: bash
5+
- name: Setup environment and build
6+
shell: bash
7+
env:
8+
SETUP_BUILD_AND_INSTALL_DPDK: '0'
9+
SETUP_BUILD_AND_INSTALL_ICE_DRIVER: '0'
10+
SETUP_BUILD_AND_INSTALL_EBPF_XDP: '0'
11+
SETUP_BUILD_AND_INSTALL_GPU_DIRECT: '0'
12+
MTL_BUILD_AND_INSTALL: '1'
13+
ECOSYSTEM_BUILD_AND_INSTALL_FFMPEG_PLUGIN: '1'
14+
ECOSYSTEM_BUILD_AND_INSTALL_GSTREAMER_PLUGIN: '1'
15+
run: bash sudo .github/scripts/setup_environment.sh

.github/scripts/setup_environment.sh

Lines changed: 59 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function setup_ubuntu_install_dependencies() {
5353
echo "1.1. Install the build dependency from OS software store"
5454

5555
# Mtl library dependencies
56-
apt-get update
57-
apt-get install -y \
56+
apt update
57+
apt install -y \
5858
git \
5959
gcc \
6060
meson \
@@ -92,7 +92,7 @@ function setup_ubuntu_install_dependencies() {
9292
if [ "${SETUP_BUILD_AND_INSTALL_ICE_DRIVER}" == "1" ]; then
9393
echo "Installing Ice driver dependencies"
9494

95-
if apt-get install -y "linux-headers-$(uname -r)"; then
95+
if apt install -y "linux-headers-$(uname -r)"; then
9696
if [ "${CICD_BUILD}" != "0" ]; then
9797
ret=0
9898
else
@@ -103,7 +103,7 @@ function setup_ubuntu_install_dependencies() {
103103
fi
104104

105105
if [ "$ret" == "1" ]; then
106-
if ! apt-get install -y linux-headers-generic; then
106+
if ! apt install -y linux-headers-generic; then
107107
log_error "Error: Failed to install linux-headers-generic as well."
108108
else
109109
log_warning "Installed linux-headers-generic."
@@ -117,7 +117,7 @@ function setup_ubuntu_install_dependencies() {
117117

118118
if [ "${SETUP_BUILD_AND_INSTALL_EBPF_XDP}" == "1" ]; then
119119
echo "Installing eBPF/XDP dependencies"
120-
apt-get install -y \
120+
apt install -y \
121121
make \
122122
m4 \
123123
zlib1g-dev \
@@ -131,7 +131,7 @@ function setup_ubuntu_install_dependencies() {
131131
echo "Installing GPU Direct dependencies"
132132
ONE_API_TGZ="oneapi.tgz"
133133

134-
apt-get install -y file
134+
apt install -y file
135135

136136
wget "${ONE_API_REPO}" -O "${ONE_API_TGZ}"
137137
if [ -f "${ONE_API_TGZ}" ]; then
@@ -143,16 +143,19 @@ function setup_ubuntu_install_dependencies() {
143143
exit 1
144144
fi
145145

146-
cd "level-zero-${ONE_API_GPU_VER}" || exit 1
146+
pushd "level-zero-${ONE_API_GPU_VER}" >/dev/null || exit 1
147147

148148
if mkdir build; then
149149
rm -rf build
150150
mkdir build
151151
fi
152-
cd build || exit 1
152+
pushd build >/dev/null || exit 1
153153
cmake .. -D CMAKE_BUILD_TYPE=Release
154154
cmake --build . --target package -j"${nproc}"
155155
cmake --build . --target install -j"${nproc}"
156+
popd >/dev/null
157+
popd >/dev/null
158+
rm -rf "${setup_script_folder}/level-zero-${ONE_API_GPU_VER}"
156159
fi
157160

158161
if [ "${ECOSYSTEM_BUILD_AND_INSTALL_FFMPEG_PLUGIN}" == "1" ]; then
@@ -183,7 +186,7 @@ function setup_ubuntu_install_dependencies() {
183186

184187
if [ "${HOOK_PYTHON}" == "1" ]; then
185188
echo "Installing Python hook dependencies"
186-
apt-get install -y \
189+
apt install -y \
187190
swig \
188191
automake \
189192
yacc
@@ -193,14 +196,14 @@ function setup_ubuntu_install_dependencies() {
193196

194197
if [ "${HOOK_RUST}" == "1" ]; then
195198
echo "Installing Rust hook dependencies"
196-
apt-get install -y \
199+
apt install -y \
197200
cargo \
198201
rustc
199202
fi
200203

201204
if [ "${TOOLS_BUILD_AND_INSTALL_MTL_READPCAP}" == "1" ]; then
202205
echo "Installing MTL readpcap dependencies"
203-
apt-get install -y \
206+
apt install -y \
204207
libpcap-dev
205208
fi
206209

@@ -253,7 +256,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
253256
if [ "${SETUP_BUILD_AND_INSTALL_GPU_DIRECT}" == "1" ]; then
254257
echo "$STEP Install the build dependency for GPU Direct"
255258
# shellcheck disable=SC1091
256-
cd "${root_folder}/gpu_direct" || exit 1
259+
pushd "${root_folder}/gpu_direct" >/dev/null || exit 1
257260

258261
if [[ ":$LIBRARY_PATH:" != *":/usr/local/lib:"* ]]; then
259262
export LIBRARY_PATH="/usr/local/lib:$LIBRARY_PATH"
@@ -268,6 +271,8 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
268271
echo "mtl_gpu_direct is NOT available via pkg-config."
269272
fi
270273

274+
popd >/dev/null
275+
271276
STEP=$((STEP + 1))
272277
fi
273278

@@ -290,21 +295,25 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
290295
if [ -z "$setup_script_folder" ] || [ -z "$ICE_VER" ] || [ -z "$ICE_DMID" ]; then
291296
exit 3
292297
fi
293-
cd "${setup_script_folder}"
298+
pushd "${setup_script_folder}" >/dev/null || exit 1
294299

295300
echo "Building e810 driver version: $ICE_VER form mirror $ICE_DMID"
296301

297302
wget "https://downloadmirror.intel.com/${ICE_DMID}/ice-${ICE_VER}.tar.gz"
298303
tar xvzf "ice-${ICE_VER}.tar.gz"
299-
cd "ice-${ICE_VER}"
304+
pushd "ice-${ICE_VER}" >/dev/null || exit 1
300305

301306
git init
302307
git add .
303308
git commit -m "init version ${ICE_VER}"
304309
git am "${root_folder}"/patches/ice_drv/"${ICE_VER}"/*.patch
305310

306-
cd src
311+
pushd src >/dev/null || exit 1
307312
make -j"${nproc}"
313+
popd >/dev/null
314+
popd >/dev/null
315+
rm -rf "ice-${ICE_VER}" "ice-${ICE_VER}.tar.gz"
316+
popd >/dev/null
308317
STEP=$((STEP + 1))
309318
fi
310319

@@ -318,40 +327,48 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
318327

319328
if [ "${MTL_BUILD_AND_INSTALL_DEBUG}" == "1" ]; then
320329
echo "$STEP MTL debug build and install"
321-
cd "${root_folder}" && ./build.sh debug
330+
pushd "${root_folder}" >/dev/null || exit 1
331+
./build.sh debug
332+
popd >/dev/null
322333
STEP=$((STEP + 1))
323334
fi
324335

325336
if [ "${MTL_BUILD_AND_INSTALL}" == "1" ]; then
326337
echo "$STEP MTL build and install"
327-
cd "${root_folder}" && ./build.sh
338+
pushd "${root_folder}" >/dev/null || exit 1
339+
./build.sh
340+
popd >/dev/null
328341
STEP=$((STEP + 1))
329342
fi
330343

331344
if [ "${MTL_BUILD_AND_INSTALL_DOCKER}" == "1" ]; then
332345
echo "$STEP MTL docker build and install"
333-
cd "${root_folder}/docker" || exit 1
346+
pushd "${root_folder}/docker" >/dev/null || exit 1
334347

335348
if [ -n "${http_proxy}" ] && [ -n "${https_proxy}" ]; then
336349
docker build -t mtl:latest -f ubuntu.dockerfile --build-arg HTTP_PROXY="${http_proxy}" --build-arg HTTPS_PROXY="${https_proxy}" ../
337350
else
338351
docker build -t mtl:latest -f ubuntu.dockerfile ../
339352
fi
340353

354+
popd >/dev/null
355+
341356
STEP=$((STEP + 1))
342357
fi
343358

344359
if [ "${MTL_BUILD_AND_INSTALL_DOCKER_MANAGER}" == "1" ]; then
345360
echo "$STEP MTL docker manager build and install"
346361

347-
cd "${root_folder}/manager" | exit 1
362+
pushd "${root_folder}/manager" >/dev/null || exit 1
348363

349364
if [ -n "${http_proxy}" ] && [ -n "${https_proxy}" ]; then
350365
docker build --build-arg VERSION="$(cat ../VERSION)" -t mtl-manager:latest --build-arg HTTP_PROXY="${http_proxy}" --build-arg HTTPS_PROXY="${https_proxy}" .
351366
else
352367
docker build --build-arg VERSION="$(cat ../VERSION)" -t mtl-manager:latest .
353368
fi
354369

370+
popd >/dev/null
371+
355372
STEP=$((STEP + 1))
356373
fi
357374

@@ -372,7 +389,9 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
372389
if [ "${ECOSYSTEM_BUILD_AND_INSTALL_GSTREAMER_PLUGIN}" == "1" ]; then
373390
echo "$STEP Ecosystem GStreamer plugin build and install"
374391

375-
bash "${root_folder}/ecosystem/gstreamer_plugin/build.sh"
392+
pushd "${root_folder}/ecosystem/gstreamer_plugin" >/dev/null || exit 1
393+
bash build.sh
394+
popd >/dev/null
376395
STEP=$((STEP + 1))
377396
fi
378397

@@ -390,20 +409,23 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
390409

391410
if [ "${ECOSYSTEM_BUILD_AND_INSTALL_OBS_PLUGIN}" == "1" ]; then
392411
echo "$STEP Ecosystem OBS plugin build and install"
393-
cd "${root_folder}/ecosystem/obs_mtl" || exit 1
394-
cd linux-mtl
412+
pushd "${root_folder}/ecosystem/obs_mtl" >/dev/null || exit 1
413+
pushd linux-mtl >/dev/null || exit 1
395414
meson setup build
396415
meson compile -C build
397416
meson install -C build
417+
popd >/dev/null
418+
popd >/dev/null
398419
STEP=$((STEP + 1))
399420
fi
400421

401422
if [ "${PLUGIN_BUILD_AND_INSTALL_SAMPLE}" == "1" ]; then
402423
echo "$STEP Plugin sample build and install"
403-
cd "${root_folder}/plugins" || exit 1
424+
pushd "${root_folder}/plugins" >/dev/null || exit 1
404425
meson setup build
405426
meson compile -C build
406427
meson install -C build
428+
popd >/dev/null
407429
STEP=$((STEP + 1))
408430
fi
409431

@@ -421,53 +443,60 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
421443

422444
if [ "${HOOK_PYTHON}" == "1" ]; then
423445
echo "$STEP Hook Python"
424-
cd "${root_folder}" || exit 1
446+
pushd "${root_folder}" >/dev/null || exit 1
425447
if [ -d swig ]; then
426448
echo "SWIG directory already exists, skipping clone."
427449
else
428450
echo "Cloning SWIG repository..."
429451
git clone https://github.com/swig/swig.git
430452
fi
431-
cd swig/
453+
pushd swig >/dev/null || exit 1
432454
git checkout v4.1.1
433455
./autogen.sh
434456
./configure
435457
make -j"${nproc}"
436458
make install
437-
cd "${root_folder}/python/swig"
459+
popd >/dev/null
460+
pushd "${root_folder}/python/swig" >/dev/null || exit 1
438461
swig -python -I/usr/local/include -o pymtl_wrap.c pymtl.i
439462
python3 setup.py build_ext --inplace
440463
python3 setup.py install
464+
popd >/dev/null
465+
popd >/dev/null
441466
STEP=$((STEP + 1))
442467
fi
443468

444469
if [ "${HOOK_RUST}" == "1" ]; then
445470
echo "$STEP Hook Rust"
446-
cd "${root_folder}/rust" || exit 1
471+
pushd "${root_folder}/rust" >/dev/null || exit 1
447472
cargo update home --precise "${RUST_HOOK_CARGO_VER}"
448473
cargo build --release
474+
popd >/dev/null
449475
STEP=$((STEP + 1))
450476
fi
451477

452478
if [ "${TOOLS_BUILD_AND_INSTALL_MTL_MONITORS}" == "1" ]; then
453479
echo "$STEP Tools MTL monitors build and install"
454-
cd "${root_folder}/tools/ebpf" || exit 1
480+
pushd "${root_folder}/tools/ebpf" >/dev/null || exit 1
455481
make lcore_monitor -j"${nproc}"
456482
make udp_monitor -j"${nproc}"
483+
popd >/dev/null
457484
STEP=$((STEP + 1))
458485
fi
459486

460487
if [ "${TOOLS_BUILD_AND_INSTALL_MTL_READPCAP}" == "1" ]; then
461488
echo "$STEP Tools MTL readpcap build and install"
462-
cd "${root_folder}/tools/readpcap" || exit 1
489+
pushd "${root_folder}/tools/readpcap" >/dev/null || exit 1
463490
make -j"${nproc}"
491+
popd >/dev/null
464492
STEP=$((STEP + 1))
465493
fi
466494

467495
if [ "${TOOLS_BUILD_AND_INSTALL_MTL_CPU_EMULATOR}" == "1" ]; then
468496
echo "$STEP Tools MTL CPU emulator build and install"
469-
cd "${root_folder}/tools/sch_smi_emulate" || exit 1
497+
pushd "${root_folder}/tools/sch_smi_emulate" >/dev/null || exit 1
470498
make -j"${nproc}"
499+
popd >/dev/null
471500
STEP=$((STEP + 1))
472501
fi
473502

0 commit comments

Comments
 (0)