Skip to content

Add some static analysis to the code base. #235

Add some static analysis to the code base.

Add some static analysis to the code base. #235

Workflow file for this run

name: Build and run tests
on:
push:
branches:
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: ${{ matrix.distro.image }}
env:
LDFLAGS: ${{ matrix.link-n-sane.ldflags }}
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
strategy:
matrix:
distro:
- { image: "debian:testing", update_cmd: "apt update", install_cmd: "apt install -y" }
- { image: "alpine:3.20", update_cmd: "true", install_cmd: "apk add --no-cache", packages: "g++ musl-dev" }
- { image: "alpine:edge", update_cmd: "true", install_cmd: "apk add --no-cache", packages: "g++ musl-dev" }
compiler:
- { cc: gcc, cxx: g++ }
- { cc: clang, cxx: clang++ }
link-n-sane:
- { ldflags: "", sanitizer: "none" }
- { ldflags: "-static", sanitizer: "none" }
- { sanitizer: "address,undefined" }
- { sanitizer: "thread" }
- { sanitizer: "memory" }
- { sanitizer: "leak" }
options:
- { pcie_opt: "true" }
- { pcie_opt: "false" }
steps:
- name: Install dependencies
run: ${{ matrix.distro.update_cmd }} && ${{ matrix.distro.install_cmd }} git meson ${{ matrix.distro.packages }} ${{ matrix.compiler.cc }}
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure
run: meson setup --buildtype release --werror -Dpcie_opt=${{ matrix.options.pcie_opt }} -Db_sanitize=${{ matrix.link-n-sane.sanitizer }} build || cat build/meson-logs/meson-log.txt /nonexistent
- name: Build
run: ninja -C build
- name: Run tests
run: ninja -C build test