forked from NLnetLabs/nsd
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 2.22 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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)