Skip to content

Commit

Permalink
Merge branch 'master' into devel/verbosity-levels-with-master
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Nov 12, 2024
2 parents 749f33f + 8c1f32c commit 24f1d98
Show file tree
Hide file tree
Showing 118 changed files with 7,794 additions and 1,063 deletions.
126 changes: 0 additions & 126 deletions .cirrus.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .github/workflows/analysis_ports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Analysis and Ports

on:
workflow_dispatch:
inputs:
start:
description: 'Start analysis and port workflow'
default: 'yes'
required: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux and clang-analyzer
os: ubuntu-latest
config: "--enable-checking --disable-flto"
make_test: "yes"
clang_analysis: "yes"
- name: FreeBSD
os: ubuntu-latest
config: "no"
make: "no"
with_cross_platform_action: "yes"
cross_platform_os: "freebsd"
cross_platform_arch: "x86-64"
cross_platform_version: "14.1"
cross_platform_config: "--enable-checking --disable-flto --with-libevent"
- name: OpenBSD
os: ubuntu-latest
config: "no"
make: "no"
with_cross_platform_action: "yes"
cross_platform_os: "openbsd"
cross_platform_arch: "x86-64"
cross_platform_version: "7.5"
cross_platform_config: "--enable-checking --disable-flto --with-libevent"
- name: NetBSD
os: ubuntu-latest
config: "no"
make: "no"
with_cross_platform_action: "yes"
cross_platform_os: "netbsd"
cross_platform_arch: "x86-64"
cross_platform_version: "10.0"
cross_platform_config: "--enable-checking --disable-flto --with-libevent=no"

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: cross-platform-action on ${{ matrix.cross_platform_os }} ${{ matrix.cross_platform_version }}
if: ${{ matrix.with_cross_platform_action == 'yes' }}
uses: cross-platform-actions/action@v0.25.0
env:
CROSS_PLATFORM_OS: ${{ matrix.cross_platform_os }}
with:
environment_variables: CROSS_PLATFORM_OS
operating_system: ${{ matrix.cross_platform_os }}
architecture: ${{ matrix.cross_platform_arch }}
version: ${{ matrix.cross_platform_version }}
shell: bash
memory: 4G
cpu_count: 2
run: |
set -e -x
if test "$CROSS_PLATFORM_OS" = "freebsd"; then sudo pkg install -y autoconf libtool openssl libevent; fi
if test "$CROSS_PLATFORM_OS" = "openbsd"; then sudo pkg_add autoconf-2.71 libtool libevent; export AUTOCONF_VERSION="2.71"; fi
if test "$CROSS_PLATFORM_OS" = "netbsd"; then sudo pkgin -y install autoconf libtool; fi
echo "::group::configure"
autoconf && autoheader
(cd simdzone && autoconf && autoheader)
libtoolize -c -i || glibtoolize -c -i
./configure ${{ matrix.cross_platform_config }}
echo "::endgroup::"
echo "::group::make"
make -j2
echo "::endgroup::"
echo "::group::make cutest; ./cutest"
make -j2 cutest
./cutest
echo "::endgroup::"
- name: configure
if: ${{ matrix.config != 'no' }}
run: |
set -e -x
if test `uname` = "Linux"; then sudo apt-get install libevent-dev; fi
autoconf && autoheader
(cd simdzone && autoconf && autoheader)
libtoolize -c -i || glibtoolize -c -i
./configure ${{ matrix.config }}
- name: make
if: ${{ matrix.make != 'no' }}
run: make -j2
- name: make cutest; ./cutest
if: ${{ matrix.make_test == 'yes' }}
run: |
set -e -x
make -j2 cutest
./cutest
- name: clang-analysis
if: ${{ matrix.clang_analysis == 'yes' }}
run: (cd tpkg/clang-analysis.tdir; bash clang-analysis.test)
65 changes: 65 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build-test

on: [ push, pull_request ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
cc: gcc
cflags: -g2 -O0 -fsanitize=address,undefined,leak -fno-sanitize-recover=all
packages: autoconf automake libtool make libevent-dev libssl-dev flex bison
- os: ubuntu-24.04
cc: clang
cflags: -g2 -O0 -fsanitize=address,undefined,leak -fno-sanitize-recover=all
packages: autoconf automake libtool make libevent-dev libssl-dev flex bison
- os: macos-15
cflags: -g2 -O0 -fsanitize=address,undefined -fno-sanitize-recover=all
packages: autoconf automake libtool flex bison
# The libevent and openssl packages are already installed.
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Workaround for actions/runner-images#9491'
if: runner.os == 'Linux'
run: sudo sysctl vm.mmap_rnd_bits=28
- name: 'Install Linux packages'
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get install ${{matrix.packages}}
- name: 'Install macOS packages'
if: runner.os == 'macOS'
shell: bash
run: |
brew install ${{matrix.packages}}
- name: 'Build'
id: build
shell: bash
env:
CC: ${{matrix.cc}}
CFLAGS: ${{matrix.cflags}}
run: |
set -e -x
autoconf && autoheader
(cd simdzone && autoconf && autoheader)
libtoolize -c -i || glibtoolize -c -i
if test "${{runner.os}}" = 'macOS'; then
./configure --enable-checking --disable-flto --with-ssl=/opt/homebrew/opt/openssl --with-libevent=/opt/homebrew/opt/libevent
else
./configure --enable-checking --disable-flto --with-ssl=yes --with-libevent=yes
fi
make -j 2
- name: 'Run tests'
id: test
shell: bash
run: |
set -e -x
make cutest
./cutest
(cd tpkg/clang-analysis.tdir && bash clang-analysis.test)
(cd tpkg && ./mini_tdir.sh -a ../.. exe checkconf.tdir)
100 changes: 100 additions & 0 deletions .github/workflows/coverity-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#
# coverity-scan.yml -- GitHub Actions workflow for Coverity Scan analysis
#
# Copyright (c) 2023, NLnet Labs. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#
name: coverity-scan

on:
schedule:
- cron: "0 12 * * *"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
cc: gcc
cflags: -g2 -O0
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- id: install_packages
shell: bash
run: |
sudo apt-get install autoconf automake libtool make libevent-dev libssl-dev flex bison
- id: setup_coverity
shell: bash
env:
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
set -e -x
headers=$(basename $(mktemp "$(pwd)/cov.XXXXXXXX"))
code=$(curl -X HEAD -s -S -F project="${GITHUB_REPOSITORY}" \
-F token="${token}" \
-o /dev/null -D ${headers} -w '%{http_code}' \
'https://scan.coverity.com/download/cxx/linux64')
[ "${code}" != "200" ] && echo "cURL exited with ${code}" 1>&2 && exit 1
file=$(sed -n -E 's/.*filename="([^"]+)".*/\1/p' ${headers})
echo "cov_archive=${file}" >> $GITHUB_OUTPUT
echo "$(pwd)/cov-analysis/bin" >> $GITHUB_PATH
rm -f ${headers}
- id: cache_coverity
uses: actions/cache/restore@v3
with:
key: coverity | 1 | "$(cov_archive)"
path: cov-analysis
- id: install_coverity
if: steps.cache_coverity.outputs.cache-hit != 'true'
shell: bash
env:
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
set -e -x
headers=$(basename $(mktemp "$(pwd)/cov.XXXXXXXX"))
code=$(curl -s -S -F project="${GITHUB_REPOSITORY}" \
-F token="${token}" \
-O -J -D ${headers} -w '%{http_code}' \
'https://scan.coverity.com/download/cxx/linux64')
[ "${code}" != "200" ] && echo "cURL exited with ${code}" 1>&2 && exit 1
file=$(sed -n -E 's/^.*filename="([^"]+)".*$/\1/p' ${headers})
tar -xzf ${file} -C .
dir=$(find . -type d -name "cov-analysis*" | head -1)
mv "${dir}" "cov-analysis"
rm -f ${headers} "${file}"
- id: build_nsd
shell: bash
env:
CC: ${{ matrix.cc }}
CFLAGS: ${{ matrix.cflags }}
run: |
set -e -x
autoconf && autoheader
(cd simdzone && autoconf && autoheader)
libtoolize -c -i || glibtoolize -c -i
./configure --enable-checking --disable-flto --with-ssl=yes --with-libevent=yes
cov-build --dir cov-int make -j 2
- id: submit_to_coverity_scan
shell: bash
env:
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
set -e -x
tar -czf analysis-results.tgz cov-int
code=$(curl -s -S -F project="${GITHUB_REPOSITORY}" \
-F token="${token}" \
-F file=@analysis-results.tgz \
-F version=$(git rev-parse --short HEAD) \
-F description="GitHub Actions build" \
-F email="${email:=spam@nlnetlabs.nl}" \
-w '%{http_code}' \
"https://scan.coverity.com/builds")
[[ "${code}" =~ "success" ]] || (echo "cURL exited with ${code}" 1>&2 && exit 1)
rm -f analysis-results.tgz
Loading

0 comments on commit 24f1d98

Please sign in to comment.