Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:NLnetLabs/ldns into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Jul 12, 2024
2 parents d69415c + f2195ea commit e6cd24c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 8 deletions.
108 changes: 102 additions & 6 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@ on:

jobs:
linux:
name: Linux (Ubuntu)

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@main
with:
submodules: recursive
- run: libtoolize -ci
- run: autoreconf -fi
- run: libtoolize -vci
- run: autoreconf -vfi
- run: ./configure
- run: make test

mac:
name: macOS

runs-on: macos-latest

steps:
- run: brew install automake libtool
- uses: actions/checkout@v3
- uses: actions/checkout@main
with:
submodules: recursive
- run: glibtoolize -ci
- run: autoreconf -fi
- run: glibtoolize -vci
- run: autoreconf -vfi

# macOS’s system OpenSSL (LibreSSL, actually) isn’t meant for linking,
# and Homebrew’s# OpenSSL isn’t CI-friendly. So build without OpenSSL.
Expand All @@ -37,3 +41,95 @@ jobs:
# As of now the test suite requires OpenSSL, so no tests.
# cf. https://github.com/NLnetLabs/ldns/issues/162
- run: make

# Pending https://github.com/NLnetLabs/ldns/issues/197,
# only builds succeed here.
cygwin:
name: Cygwin

runs-on: windows-latest

steps:
- name: Make git ignore line breaks
run: git config --global core.autocrlf false
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: make gcc-g++ bash libtool automake autoconf libssl-devel bind-utils
- uses: actions/checkout@main
with:
submodules: recursive
- shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
name: Build
run: |
cd $GITHUB_WORKSPACE
libtoolize -vci
autoreconf -vfi
./configure
make
qemu-alpine:
name: Linux (Alpine, ${{ matrix.platform }})

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- i386
- arm32v6
- arm32v7
- arm64v8
- s390x

steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Get the qemu container
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: "${{ matrix.platform }}: Build and test"
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add make gcc libc-dev libtool automake autoconf openssl-dev m4 indent bash bind-tools && cd /host && libtoolize -vci && autoreconf -vfi && ./configure && make test"

BSDs:
name: ${{ matrix.os.dispname }} ${{ matrix.os.version }}

runs-on: macos-latest

strategy:
fail-fast: false
matrix:
os:
- name: freebsd
dispname: FreeBSD
version: '13.0'
pkginstall: pkg install -y libtool automake bind-tools gmake gindent
env:
configure_args:

# OpenBSD seems to require explicit auto* versions.
- name: openbsd
dispname: OpenBSD
version: '7.1'
pkginstall: pkg_add -v libtool gmake gindent automake-1.16.3 autoconf-2.71
env: AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16
configure_args: --disable-dane-verify

steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Build and test on ${{ matrix.os.name }}
uses: cross-platform-actions/action@master
with:
operating_system: ${{ matrix.os.name }}
version: ${{ matrix.os.version }}
shell: bash
run: |
export DUMMY12345=1 ${{ matrix.os.env }}
sudo ${{ matrix.os.pkginstall }}
libtoolize -vci
autoreconf -vfi
./configure ${{ matrix.os.configure_args }}
gmake test
6 changes: 4 additions & 2 deletions test/codingstyle.tpkg/codingstyle.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
L=90
OPT="-ncs -sai -nut -ce -nfca -nlp -ncdb -br -ts08 -i8 -nbad"

LC_OSTYPE=$(echo $OSTYPE | tr 'A-Z' 'a-z')

st=0
for i in ../../*.c; do

Expand All @@ -23,11 +25,11 @@ for i in ../../*.c; do
continue;;
esac

case $OSTYPE in
case $LC_OSTYPE in
linux*)
diff -w -u $i <(cat $i | indent -l$L $OPT) | grep ^---
;;
*bsd*)
*bsd*)
diff -w -u $i <(cat $i | gindent -l$L $OPT)| grep ^---
;;
darwin*)
Expand Down

0 comments on commit e6cd24c

Please sign in to comment.