Skip to content

ci(github): bump to Ubuntu 24.04 #266

ci(github): bump to Ubuntu 24.04

ci(github): bump to Ubuntu 24.04 #266

Workflow file for this run

name: testsuite
on: [push, pull_request]
jobs:
test:
env:
apt-dependencies: |
autoconf automake ebtables intltool ipset iptables libdbus-1-dev \
libgirepository1.0-dev libglib2.0-dev libxml2-utils network-manager \
pkg-config python3-cap-ng
pip-dependencies: |
dbus-python PyGObject
name: >-
python-${{ matrix.python-version }}
nftables-${{ matrix.nftables-version }}
keyword=${{ matrix.keyword }}
no-iptables=${{ matrix.no-iptables }}
no-ip6tables=${{ matrix.no-ip6tables }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [3.8]
libnftnl-version: [libnftnl-1.2.5]
nftables-version: [v1.0.7]
keyword: [offline, nftables, iptables]
no-iptables: [true, false]
no-ip6tables: [true, false]
exclude:
- keyword: offline
no-ip6tables: true
- keyword: offline
no-iptables: true
- keyword: iptables
no-iptables: true
- keyword: nftables
no-iptables: true
no-ip6tables: true
include:
- python-version: 3.8
libnftnl-version: master
nftables-version: master
keyword: nftables
no-iptables: false
no-ip6tables: false
steps:
- name: checkout
uses: actions/checkout@v4
- name: apt update
run: sudo apt update
- name: apt install dependencies
run: sudo apt install -y ${{ env.apt-dependencies }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: pip install dependencies
run: |
python -m pip install --upgrade pip
pip install ${{ env.pip-dependencies }}
- name: install nftables build dependencies
run: |
sudo apt install -y libmnl-dev libgmp-dev libreadline-dev \
libjansson-dev libedit-dev
- name: install libnftnl ${{ matrix.libnftnl-version }}
run: |
cd /tmp
git clone --depth=1 --branch ${{ matrix.libnftnl-version }} git://git.netfilter.org/libnftnl
cd libnftnl
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
- name: install nftables ${{ matrix.nftables-version }}
run: |
cd /tmp
git clone --depth=1 --branch ${{ matrix.nftables-version }} git://git.netfilter.org/nftables
cd nftables
./autogen.sh
./configure --disable-man-doc --with-json --disable-python
make
sudo make install
cd py
pip install .
sudo ldconfig
- name: remove iptables, et al.
if: ${{ matrix.no-iptables }}
run: |
sudo apt-get -y remove iptables ebtables ipset
- name: build firewalld (no ip6tables)
if: ${{ matrix.no-ip6tables }}
run: |
./autogen.sh
./configure --disable-docs IP6TABLES=/bin/false IP6TABLES_RESTORE=/bin/false
make -j $(nproc)
- name: build firewalld
if: ${{ ! matrix.no-ip6tables }}
run: |
./autogen.sh
./configure --disable-docs
make -j $(nproc)
- name: run testsuite
run: |
sudo make -C src/tests check-local TESTSUITEFLAGS="-k ${{ matrix.keyword }} -j$(nproc)" \
|| sudo make -C src/tests check-local TESTSUITEFLAGS="--recheck --errexit --verbose"