@@ -2,139 +2,36 @@ name: nightly-tests-bare-metal
2
2
on :
3
3
schedule :
4
4
- cron : ' 0 0 * * *' # Every day at midnight UTC
5
- env :
6
- BUILD_TYPE : ' Release'
7
- DPDK_VERSION : ' 25.03'
8
- DPDK_REBUILD : ' false'
9
5
permissions :
10
6
contents : read
11
7
jobs :
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
17
11
steps :
18
12
- name : ' preparation: Harden Runner'
19
13
uses : step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
20
14
with :
21
15
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
27
16
- name : ' preparation: Checkout MTL'
28
17
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
18
with :
30
19
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
112
21
- name : ' installation: Install pipenv environment'
113
22
working-directory : tests/validation
114
23
id : pipenv-install
115
24
run : |
116
- python3 -m venv venv
117
- source venv/bin/activate
25
+ python3 -m venv . venv
26
+ source . venv/bin/activate
118
27
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 :
127
28
- name : Replace secrets in example config files
128
29
run : |
129
30
sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
130
31
sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
131
32
sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
132
33
sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
133
34
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
138
35
- name : ' preparation: Evaluate chosen validation-test-port-p and validation-test-port-r'
139
36
run : |
140
37
eval "export TEST_PORT_P=TEST_VF_PORT_P_0"
@@ -158,7 +55,10 @@ jobs:
158
55
sudo MtlManager &
159
56
- name : ' execution: Run nightly-bare-metal tests in virtual environment'
160
57
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}" .
162
62
- name : " upload report"
163
63
if : always()
164
64
id : upload-report
0 commit comments