actions: test install in build-noble #172
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-22.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 \ | |
libffi-dev libelf-dev | |
- name: Prepare libbpf | |
run: | | |
git clone --depth 1 --branch v1.4.0 https://github.com/libbpf/libbpf.git | |
cd libbpf/src | |
make -j | |
sudo make LIBSUBDIR=lib install | |
- name: Build | |
run: | | |
sudo cp /sys/kernel/btf/vmlinux /lib/modules/`uname -r`/build | |
make -j BPF_CC=clang-15 | |
- name: Test | |
run: | | |
sudo nft delete table filter # Docker's nftables rule drops IPv4 packets in tests | |
sudo insmod out/mimic.ko | |
sudo make test BPF_CC=clang-15 | |
- name: Upload captured packets | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: pcap | |
path: out/general.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 |