kmod: refactor into csum-hack-{kfunc,kprobe} #199
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: Test and build on push | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt install python3 clang-15 pahole \ | |
bats bc conntrack ethtool iperf3 jq socat tshark wireguard-tools \ | |
libbpf-dev libffi-dev libelf-dev | |
- name: Build & Test | |
run: | | |
export BPF_CC=clang-15 | |
sudo cp /sys/kernel/btf/vmlinux /lib/modules/`uname -r`/build | |
make -j | |
sudo nft delete table filter # Docker's nftables rule drops IPv4 packets in tests | |
sudo insmod out/mimic.ko | |
sudo make test | |
- name: Upload captured packets | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: pcap | |
path: out/*.pcapng | |
build-bookworm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: jtdor/build-deb-action@v1 | |
with: | |
buildpackage-opts: -b -us -uc | |
docker-image: debian:bookworm-slim | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bookworm | |
path: debian/artifacts/*.deb | |
build-noble: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: jtdor/build-deb-action@v1 | |
with: | |
buildpackage-opts: -b -us -uc | |
docker-image: ubuntu:noble | |
- name: Test Install | |
run: | | |
sudo apt install ./debian/artifacts/*.deb linux-headers-`uname -r` | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: noble | |
path: | | |
debian/artifacts/*.deb | |
debian/artifacts/*.ddeb |