local: workflow: exercise nft #492
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: 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 selinux-policy-dev libxdp-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-24.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: 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 |