Fix: linter errors and lincensing infomration (#1036) #796
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: Ubuntu tools build | |
on: | |
# allow manually trigger | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- 'maint-**' | |
pull_request: | |
branches: | |
- main | |
- 'maint-**' | |
permissions: | |
contents: read | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
changed: ${{ steps.filter.outputs.tools_build == 'true' }} | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2 | |
id: filter | |
with: | |
filters: .github/path_filters.yml | |
build: | |
needs: changes | |
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
container: | |
image: ubuntu:latest | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- uses: DoozyX/[email protected] | |
with: | |
clangFormatVersion: '14' | |
source: '.' | |
extensions: 'hpp,h,cpp,c,cc' | |
- name: Install the build dependency | |
run: | | |
apt-get update -y | |
apt-get install -y sudo git make m4 gcc clang llvm | |
apt-get install -y libpcap-dev | |
apt-get install -y zlib1g-dev libelf-dev libcap-ng-dev libcap2-bin gcc-multilib | |
apt-get install -y systemtap-sdt-dev | |
- name: Build sch_smi_emulate | |
run: | | |
cd tools/sch_smi_emulate/ | |
make | |
cd ../../ | |
- name: Build readpcap | |
run: | | |
cd tools/readpcap/ | |
make | |
cd ../../ | |
- name: Checkout bpftool | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
repository: 'libbpf/bpftool' | |
path: bpftool | |
submodules: recursive | |
- name: Build and install libbpf | |
run: | | |
cd bpftool/libbpf/src/ | |
make install | |
cd ../../../ | |
- name: Build and install bpftool | |
run: | | |
cd bpftool/src/ | |
make install | |
cd ../../ | |
- name: Checkout xdp-tools | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
repository: 'xdp-project/xdp-tools' | |
path: xdp-tools | |
submodules: recursive | |
- name: Build and install xdp-tools | |
run: | | |
cd xdp-tools && ./configure | |
make install | |
- name: Build ebpf based IMTL tools | |
run: | | |
cd tools/ebpf/ | |
make | |
cd ../../ |