-
Notifications
You must be signed in to change notification settings - Fork 23
84 lines (74 loc) · 2.72 KB
/
ci.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.81.0
override: true
components: rustfmt, clippy
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install pyelftools
run: |
pip3 install pyelftools
- name: Install libpcap (Linux)
run: |
sudo apt-get update
sudo apt-get install libpcap-dev
- name: DPDK
run: |
echo "Compiling DPDK..." ;
export STABLE=
export VERSION=20.11
export PKG_CONFIG_PATH=$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/pkgconfig/ ;
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/dpdk-$STABLE$VERSION/install/lib/x86_64-linux-gnu/ ;
export DPDK_PATH=$(pwd)/dpdk-$STABLE$VERSION/install/
if [ ! -e "dpdk-$STABLE$VERSION" ] || ! pkg-config --exists libdpdk ; then
wget http://fast.dpdk.org/rel/dpdk-$VERSION.tar.gz &&
tar -zxf dpdk-$VERSION.tar.gz &&
cd dpdk-$STABLE$VERSION &&
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ build &&
cd build &&
ninja &&
ninja install &&
cd .. &&
cd .. ;
fi
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "DPDK_PATH=$DPDK_PATH" >> $GITHUB_ENV
- name: Remove LLVM and Clang 13/14
run: sudo apt remove --auto-remove clang-14 llvm-14 && sudo apt remove --auto-remove clang-13 llvm-13;
- name: Clippy retina-core (no mlx5)
run: cargo clippy --manifest-path core/Cargo.toml --no-default-features -- --deny warnings
- name: Unit test retina-core (no mlx5)
run: cargo test core --manifest-path core/Cargo.toml --no-default-features
- name: Clippy retina-core (with timing)
run: cargo clippy --manifest-path core/Cargo.toml --no-default-features --features timing
- name: Clippy retina-filtergen (no mlx5)
run: cargo clippy --manifest-path filtergen/Cargo.toml --no-default-features -- --deny warnings
format:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: cargo fmt
run: cargo fmt --all -- --check