Skip to content

prevent host ignore on NoSuchObject for system OIDs #522

prevent host ignore on NoSuchObject for system OIDs

prevent host ignore on NoSuchObject for system OIDs #522

Workflow file for this run

name: CI
on:
push:
branches: [develop, '1.2.x']
pull_request:
branches: [develop, '1.2.x']
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
mysql-server libmysqlclient-dev \
libsnmp-dev libssl-dev build-essential \
help2man autoconf automake libtool dos2unix libcmocka-dev
- name: Prepare for Spine Build
run: |
./bootstrap
./configure --enable-warnings
- name: Build Spine
run: |
make -j"$(nproc)"
- name: Run the unit tests
run: |
set -euo pipefail
make check
# cppcheck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
#
# - name: Install cppcheck
# run: |
# sudo apt-get update
# sudo apt-get install -y cppcheck build-essential
#
# - name: Run cppcheck
# run: |
# cppcheck \
# --enable=all \
# --std=c11 \
# --error-exitcode=1 \
# --suppress=missingIncludeSystem \
# --suppress=unusedFunction \
# --suppress=checkersReport \
# --suppress=variableScope \
# --suppress=unreadVariable \
# --suppress=shadowVariable \
# --suppress=constVariablePointer \
# --suppress=redundantAssignment \
# --suppress=toomanyconfigs \
# *.c *.h
# Coverage is reported, not gated. The number is only meaningful once
# something measures it; the threshold conversation comes after that.
coverage:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install build dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y mysql-server libmysqlclient-dev libsnmp-dev \
libssl-dev build-essential help2man autoconf automake libtool \
dos2unix libcmocka-dev gcovr
- name: Build instrumented
run: |
set -euo pipefail
./bootstrap
./configure CFLAGS="-g -O0 --coverage" LDFLAGS="--coverage"
make -j"$(nproc)"
- name: Run the unit tests
run: make check
- name: Report coverage
run: |
set -euo pipefail
# configure leaves instrumented conftest objects behind and gcovr
# cannot resolve their sources
rm -f ./*conftest*.gcno ./*conftest*.gcda
gcovr -r . --exclude 'tests/.*' --txt --print-summary
flawfinder:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: "3.x"
- name: Install flawfinder
run: pip install flawfinder==2.0.19
# Note: flawfinder will light up like a christmas tree on this codebase.
# error-level=5 means only critical hits fail the build — the rest is
# informational so we have a baseline to chip away at.
- name: Run flawfinder
run: |
flawfinder \
--minlevel=3 \
--error-level=5 \
--columns \
--context \
. | tee flawfinder-report.txt
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
if: always()
with:
name: flawfinder-report
path: flawfinder-report.txt
# Spine is a threaded network daemon; ASan and UBSan are the checks most
# likely to catch a real defect here.
sanitizers:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Install build dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y clang mysql-server libmysqlclient-dev libsnmp-dev \
libssl-dev build-essential help2man autoconf automake libtool dos2unix libcmocka-dev
- name: Build with ASan and UBSan
env:
CC: clang
run: |
set -euo pipefail
./bootstrap
./configure \
CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1" \
LDFLAGS="-fsanitize=address,undefined"
make -j"$(nproc)"
- name: Run the binary under the sanitizers
env:
ASAN_OPTIONS: detect_leaks=1:exitcode=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
run: |
set -euo pipefail
./spine --version
./spine --help > /dev/null
# A release tarball that cannot be compiled is a release blocker, and the
# only way to catch it is to build from the tarball the way a packager does.
distcheck:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Install build dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y mysql-server libmysqlclient-dev libsnmp-dev \
libssl-dev build-essential help2man autoconf automake libtool dos2unix libcmocka-dev
- name: make distcheck
run: |
set -euo pipefail
./bootstrap
./configure
make distcheck