Skip to content

local: workflow: exercise nft #490

local: workflow: exercise nft

local: workflow: exercise nft #490

name: Build and Test
on: [push, pull_request]
env:
python_default: 3.12
jobs:
build-linux:
env:
dependencies: |
automake libtool gcc bc libjemalloc2 libjemalloc-dev libssl-dev \
llvm-dev libnuma-dev libpcap-dev selinux-policy-dev libbpf-dev \
lftp libreswan
CC: ${{ matrix.compiler }}
DPDK: ${{ matrix.dpdk }}
DPDK_SHARED: ${{ matrix.dpdk_shared }}
LIBS: ${{ matrix.libs }}
M32: ${{ matrix.m32 }}
OPTS: ${{ matrix.opts }}
SANITIZERS: ${{ matrix.sanitizers }}
STD: ${{ matrix.std }}
TESTSUITE: ${{ matrix.testsuite }}
TEST_RANGE: ${{ matrix.test_range }}
name: linux ${{ join(matrix.*, ' ') }}
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- compiler: gcc
testsuite: check-offloads
test_range: "-100"
steps:
- name: checkout
uses: actions/checkout@v4
- name: update PATH
run: |
echo "$HOME/bin" >> $GITHUB_PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: set up python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_default }}
- name: update APT cache
run: sudo apt update || true
- name: install common dependencies
run: sudo apt install -y ${{ env.dependencies }}
- name: install libunbound libunwind python3-unbound
# GitHub Actions doesn't have 32-bit versions of these libraries.
if: matrix.m32 == ''
run: sudo apt install -y libunbound-dev libunwind-dev python3-unbound
- name: install 32-bit libraries
if: matrix.m32 != ''
run: sudo apt install -y gcc-multilib
- name: Reduce ASLR entropy
if: matrix.sanitizers != ''
# Asan in llvm 14 provided in ubuntu-22.04 is incompatible with
# high-entropy ASLR configured in much newer kernels that GitHub
# runners are using leading to random crashes:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: check tools
run: |
which iptables
which jq
which nft
- name: prepare
run: ./.ci/linux-prepare.sh
- name: build
run: ./.ci/linux-build.sh
- name: copy logs
run: |
# upload-artifact throws exceptions if it tries to upload socket
# files and we could have some socket files in testsuite.dir.
# Also, upload-artifact doesn't work well enough with wildcards.
# So, we're just archiving everything here to avoid any issues.
mkdir logs
cp config.log ./logs/
cp -r ./*/_build/sub/tests/testsuite.* ./logs/ || true
sudo cp -r ./tests/*testsuite.* ./logs/ || true
sudo tar -czvf logs.tgz logs/
- name: upload
uses: actions/upload-artifact@v4
with:
name: logs-linux-${{ join(matrix.*, '-') }}
path: logs.tgz