upload build artifacts in ubuntu build #122
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gtest-bare-metal | |
on: | |
# allow manually trigger | |
workflow_dispatch: | |
inputs: | |
branch-to-checkout: | |
type: string | |
default: 'main' | |
required: false | |
description: 'Branch name to use' | |
push: | |
branches: | |
- main | |
- 'maint-**' | |
pull_request: | |
branches: | |
- main | |
- 'maint-**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
# Customize the env if | |
BUILD_TYPE: 'Release' | |
DPDK_VERSION: '23.11' | |
# Bellow ENV variables are required to be defined on runner side: | |
# TEST_PF_PORT_P: '0000:49:00.0' | |
# TEST_PF_PORT_R: '0000:49:00.1' | |
# TEST_PORT_P: '0000:49:01.2' | |
# TEST_PORT_R: '0000:49:01.3' | |
# TEST_DMA_PORT_P: '0000:6a:01.0' | |
# TEST_DMA_PORT_R: '0000:6f:01.0' | |
permissions: | |
contents: read | |
jobs: | |
gtest-check-for-changes: | |
runs-on: ubuntu-22.04 | |
permissions: | |
pull-requests: read | |
outputs: | |
changed: ${{ steps.filter.outputs.linux_gtest == 'true' }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2 | |
id: filter | |
with: | |
filters: .github/path_filters.yml | |
gtest-build-mtl: | |
needs: gtest-check-for-changes | |
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch') | |
runs-on: [Linux, self-hosted, DPDK] | |
timeout-minutes: 60 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout MTL | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: '${{ inputs.branch-to-checkout || github.sha || github.ref }}' | |
- name: Install the build dependency | |
run: | | |
sudo apt-get install -y \ | |
git gcc meson \ | |
python3-dev \ | |
python3-pyelftools \ | |
libjson-c-dev libpcap-dev libgtest-dev \ | |
libsdl2-dev libsdl2-ttf-dev libssl-dev \ | |
pkg-config libnuma-dev \ | |
systemtap-sdt-dev | |
- name: Build | |
run: | | |
./build.sh | |
sudo ldconfig | |
gtest-perform-tests: | |
needs: [gtest-check-for-changes, gtest-build-mtl] | |
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch') | |
runs-on: [Linux, self-hosted, DPDK] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Kill previous gtest routine | |
run: | | |
sudo killall -SIGINT KahawaiTest || true | |
sudo killall -SIGINT KahawaiUfdTest || true | |
sudo killall -SIGINT KahawaiUplTest || true | |
sudo killall -SIGINT MtlManager || true | |
- name: Binding network adapter | |
run: | | |
sudo nicctl create_vf "${TEST_PF_PORT_P}" || true | |
sudo dpdk-devbind.py -b vfio-pci "${TEST_DMA_PORT_P}" || true | |
sudo dpdk-devbind.py -b vfio-pci "${TEST_DMA_PORT_R}" || true | |
- name: Start MtlManager at background | |
run: | | |
sudo MtlManager & | |
- name: Run ufd test case | |
run: | | |
sudo ./build/tests/KahawaiUfdTest --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" | |
- name: Run shared ufd test case | |
run: | | |
sudo ./build/tests/KahawaiUfdTest --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" --queue_mode shared | |
- name: Run shared ufd test case with lcore | |
run: | | |
sudo ./build/tests/KahawaiUfdTest --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" --queue_mode shared --udp_lcore | |
- name: Run ufd test case with rss | |
run: | | |
sudo ./build/tests/KahawaiUfdTest --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" --rss_mode l3_l4 | |
- name: Run udp ld preload test case | |
run: | | |
sudo MUFD_CFG=.github/workflows/upl_gtest.json LD_PRELOAD=/usr/local/lib/x86_64-linux-gnu/libmtl_udp_preload.so ./build/tests/KahawaiUplTest --p_sip 192.168.2.80 --r_sip 192.168.2.81 | |
- name: Run st2110 test case | |
run: | | |
sudo ./build/tests/KahawaiTest --auto_start_stop --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" --dma_dev "${TEST_DMA_PORT_P},${TEST_DMA_PORT_R}" --gtest_filter=-St22_?x.* | |
- name: Run st2110 st20p test case in simulation ENA environment | |
run: | | |
sudo ./build/tests/KahawaiTest --auto_start_stop --p_port "${TEST_PORT_P}" --r_port "${TEST_PORT_R}" --rss_mode l3_l4 --pacing_way tsc --iova_mode pa --multi_src_port --gtest_filter=Main.*:St20p*:-*ext* | |
- name: Run st2110 st20p test case with kernel loopback | |
run: | | |
./build/tests/KahawaiTest --p_port kernel:lo --r_port kernel:lo --auto_start_stop --gtest_filter=St20p* | |
- name: Kill gtest routines that could have been left | |
if: always() | |
run: | | |
sudo killall -SIGINT KahawaiTest || true | |
sudo killall -SIGINT KahawaiUfdTest || true | |
sudo killall -SIGINT KahawaiUplTest || true | |
sudo killall -SIGINT MtlManager || true |