-
Notifications
You must be signed in to change notification settings - Fork 57
92 lines (77 loc) · 2.33 KB
/
ubuntu_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Ubuntu build
on:
push:
branches:
- main
- 'maint-**'
pull_request:
branches:
- main
- 'maint-**'
env:
# Customize the env if
# Disable since mtl patched dpdk pcapng and this job use prebuilt pkg
MTL_BUILD_DISABLE_PCAPNG: true
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.src == 'true' || steps.filter.outputs.build == 'true' }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2
id: filter
with:
filters: .github/path_filters.yml
build:
needs: changes
if: ${{ 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@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: DoozyX/clang-format-lint-action@a83a8fb7d371f66da7dd1c4f33a193023899494b # v0.16
with:
source: '.'
extensions: 'hpp,h,cpp,c,cc'
- name: Install the build dependency
run: |
apt-get update -y
apt-get install -y sudo git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev
apt-get install -y dpdk-dev
apt-get install -y doxygen
- name: Install the python package
run: pip install pyelftools==0.29 ninja==1.11.1
- name: Git config
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
- name: Build
run: |
./build.sh
- name: Build with debug
run: |
rm build -rf
./build.sh debug
- name: Build with kni
run: |
rm build -rf
MTL_BUILD_ENABLE_KNI=true ./build.sh
- name: doxygen
run: |
cd doc/doxygen
./build-doc.sh
cd ../../