Skip to content

Worker fixes

Worker fixes #203

Workflow file for this run

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Robin Jarry
---
name: Check
permissions:
contents: read
on:
workflow_call:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-tests:
strategy:
fail-fast: false
matrix:
conf:
- compiler: gcc-13
sanitize: none
buildtype: debugoptimized
os: ubuntu-24.04
- compiler: gcc-14
sanitize: address
buildtype: debug
os: ubuntu-24.04
- compiler: clang-15
sanitize: none
buildtype: debugoptimized
os: ubuntu-22.04
- compiler: clang-16
sanitize: none
buildtype: debugoptimized
os: ubuntu-24.04
- compiler: clang-18
sanitize: none
buildtype: debugoptimized
os: ubuntu-24.04
runs-on: ${{ matrix.conf.os }}
env:
SANITIZE: ${{ matrix.conf.sanitize }}
BUILDTYPE: ${{ matrix.conf.buildtype }}
DEBIAN_FRONTEND: noninteractive
NEEDRESTART_MODE: l
CC: ccache ${{ matrix.conf.compiler }}
steps:
- name: install system dependencies
run: |
set -xe
sudo apt-get update -qy
sudo apt-get install -qy --no-install-recommends \
make gcc ccache ninja-build meson git go-md2man libibverbs-dev \
libasan8 libcmocka-dev libedit-dev libarchive-dev \
libevent-dev libsmartcols-dev libnuma-dev python3-pyelftools \
socat tcpdump traceroute graphviz iproute2 iputils-ping ndisc6
if printf '%s\n0.63.0\n' "$(meson --version)" | sort -V -C ; then
sudo apt install -y python3-pip
pip3 install --user -U meson~=0.63.0
fi
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # force fetch all history
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- run: git config --global --add safe.directory $PWD
- run: echo "CCACHE_DIR=$(ccache -k cache_dir)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-x86_64-${{ matrix.conf.compiler }}-${{ github.ref }}
restore-keys: |
ccache-x86_64-${{ matrix.conf.compiler }}-refs/heads/main
ccache-x86_64-${{ matrix.conf.compiler }}-
- run: ccache -sv
- run: git rebase -x "git --no-pager log --oneline -1 && make all unit-tests && sudo smoke/run.sh build" "HEAD~${{ github.event.pull_request.commits }}"
if: ${{ github.event.pull_request.commits }}
- run: make all unit-tests && sudo smoke/run.sh build
if: ${{ ! github.event.pull_request.commits }}
- run: ccache -sv
build-cross-aarch64:
runs-on: ubuntu-24.04
container: debian:testing
env:
MESON_EXTRA_OPTS: --cross-file=devtools/cross/aarch64.ini
DEBIAN_FRONTEND: noninteractive
NEEDRESTART_MODE: l
steps:
- name: install system dependencies
run: |
set -xe
dpkg --add-architecture arm64
apt update -qy
apt install -qy --no-install-recommends \
make gcc ccache git meson go-md2man python3-pyelftools ca-certificates pkg-config \
crossbuild-essential-arm64 libcmocka-dev:arm64 libedit-dev:arm64 \
libevent-dev:arm64 libnuma-dev:arm64 libsmartcols-dev:arm64
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # force fetch all history
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- run: git config --global --add safe.directory $PWD
- run: echo "CCACHE_DIR=$(ccache -k cache_dir)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-aarch64-${{ github.ref }}
restore-keys: |
ccache-aarch64-refs/heads/main
ccache-aarch64-
- run: ccache -sv
- run: git rebase -x "git --no-pager log --oneline -1 && make" "HEAD~${{ github.event.pull_request.commits }}"
if: ${{ github.event.pull_request.commits }}
- run: make
if: ${{ ! github.event.pull_request.commits }}
- run: ccache -sv
lint:
runs-on: ubuntu-24.04
container: fedora:latest
steps:
- run: dnf install -y make clang-tools-extra git jq curl codespell
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # force fetch all history
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- run: git config --global --add safe.directory $PWD
- run: git rebase -x "git --no-pager log --oneline -1 && make lint" "HEAD~${{ github.event.pull_request.commits }}"
if: ${{ github.event.pull_request.commits }}
- run: make lint
if: ${{ ! github.event.pull_request.commits }}
commits:
runs-on: ubuntu-24.04
if: ${{ github.event.pull_request.commits }}
container: fedora:latest
env:
REVISION_RANGE: "HEAD~${{ github.event.pull_request.commits }}.."
steps:
- run: dnf install -y make git jq curl codespell
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # force fetch all history
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- run: git config --global --add safe.directory $PWD
- run: make check-patches