@@ -2,139 +2,36 @@ name: nightly-tests-bare-metal
22on :
33 schedule :
44 - cron : ' 0 0 * * *' # Every day at midnight UTC
5- env :
6- BUILD_TYPE : ' Release'
7- DPDK_VERSION : ' 25.03'
8- DPDK_REBUILD : ' false'
95permissions :
106 contents : read
117jobs :
12- validation-build-mtl :
13- runs-on : [Linux, self-hosted, DPDK]
14- timeout-minutes : 60
15- outputs :
16- pipenv-activate : ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }}
8+ run-nightly-tests :
9+ runs-on : [self-hosted, linux, x64, dpdk]
10+ timeout-minutes : 720
1711 steps :
1812 - name : ' preparation: Harden Runner'
1913 uses : step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
2014 with :
2115 egress-policy : audit
22- - name : ' preparation: Restore valid repository owner and print env'
23- if : always()
24- run : |
25- sudo chown -R "${USER}" "$(pwd)" || true
26- env | grep TEST_ || true
2716 - name : ' preparation: Checkout MTL'
2817 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2918 with :
3019 ref : ' ${{ github.ref }}'
31- - name : ' preparation: Checkout DPDK'
32- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33- if : env.DPDK_REBUILD == 'true'
34- with :
35- repository : ' DPDK/dpdk'
36- ref : ' v${{ env.DPDK_VERSION }}'
37- path : ' dpdk'
38- - name : ' preparation: Checkout openh264'
39- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40- with :
41- repository : ' cisco/openh264'
42- ref : ' openh264v2.4.0'
43- path : ' openh264'
44- - name : ' preparation: Checkout FFmpeg'
45- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46- with :
47- repository : ' FFmpeg/FFmpeg'
48- ref : ' release/7.0'
49- path : ' ffmpeg'
50- - name : ' configuration: Install the build dependency'
51- run : |
52- sudo apt update
53- sudo apt-get remove -y pipenv || true
54- sudo apt-get install -y \
55- git gcc meson tar zip \
56- pkg-config \
57- python3 \
58- python3-pyelftools \
59- python3-virtualenv \
60- python3-pip \
61- libnuma-dev \
62- libjson-c-dev \
63- libpcap-dev \
64- libgtest-dev \
65- libsdl2-dev \
66- libsdl2-ttf-dev \
67- libssl-dev \
68- systemtap-sdt-dev \
69- libbpf-dev \
70- libelf1 \
71- gstreamer1.0-plugins-base \
72- gstreamer1.0-plugins-good \
73- gstreamer1.0-tools \
74- gstreamer1.0-libav \
75- libgstreamer1.0-dev \
76- libgstreamer-plugins-base1.0-dev
77- - name : ' configuration: Apply dpdk patches'
78- if : env.DPDK_REBUILD == 'true'
79- run : |
80- patch -d "dpdk" -p1 -i <(cat patches/dpdk/${{ env.DPDK_VERSION }}/*.patch)
81- - name : ' installation: Build dpdk'
82- working-directory : dpdk
83- if : env.DPDK_REBUILD == 'true'
84- run : |
85- meson build
86- ninja -C build
87- sudo ninja -C build install
88- - name : ' installation: Build mtl'
89- run : |
90- ./build.sh
91- sudo ldconfig
92- - name : ' installation: Build openh264'
93- working-directory : openh264
94- run : |
95- make -j "$(nproc)"
96- sudo make install
97- sudo ldconfig
98- - name : ' installation: Build FFmpeg'
99- working-directory : ffmpeg
100- run : |
101- git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
102- cp ../ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
103- cp ../ecosystem/ffmpeg_plugin/mtl_*.h -rf libavdevice/
104- ./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
105- make -j "$(nproc)"
106- sudo make install
107- sudo ldconfig
108- - name : ' installation: Build GStreamer'
109- working-directory : ecosystem/gstreamer_plugin
110- run : |
111- ./build.sh
20+ - uses : ./.github/actions/build
11221 - name : ' installation: Install pipenv environment'
11322 working-directory : tests/validation
11423 id : pipenv-install
11524 run : |
116- python3 -m venv venv
117- source venv/bin/activate
25+ python3 -m venv . venv
26+ source . venv/bin/activate
11827 pip install -r requirements.txt
119- echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV"
120- validation-run-tests :
121- needs : [validation-build-mtl]
122- runs-on : [Linux, self-hosted, DPDK]
123- timeout-minutes : 720
124- env :
125- PYTEST_RETRIES : ' 3'
126- steps :
12728 - name : Replace secrets in example config files
12829 run : |
12930 sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
13031 sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
13132 sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
13233 sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
13334 sed -i "s+KEY_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_SSH_KEY_PATH }}+" tests/validation/configs/topology_config.yaml
134- - name : ' preparation: Harden Runner'
135- uses : step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
136- with :
137- egress-policy : audit
13835 - name : ' preparation: Evaluate chosen validation-test-port-p and validation-test-port-r'
13936 run : |
14037 eval "export TEST_PORT_P=TEST_VF_PORT_P_0"
@@ -158,7 +55,10 @@ jobs:
15855 sudo MtlManager &
15956 - name : ' execution: Run nightly-bare-metal tests in virtual environment'
16057 run : |
161- sudo tests/validation/venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m nightly --template=html/index.html --report=report.html
58+ sudo tests/validation/.venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m nightly --template=html/index.html --report=report.html
59+ - name : Restore repository owner
60+ run : |
61+ sudo chown -R "${USER}" .
16262 - name : " upload report"
16363 if : always()
16464 id : upload-report
0 commit comments