-
Notifications
You must be signed in to change notification settings - Fork 45
69 lines (67 loc) · 2.35 KB
/
address-sanitizer.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
66
67
68
69
---
name: Address sanitizer
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
name: CI with Address Sanitizer
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
name: [fedora, debian]
include:
- name: fedora
container: fedora:latest
- name: debian
container: debian:sid
container: ${{ matrix.container }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Dependencies
run: |
if [ -f /etc/fedora-release ]; then
dnf -y install git clang gcc automake libtool pkgconf-pkg-config \
autoconf-archive openssl-devel openssl diffutils expect \
softhsm opensc p11-kit-devel p11-kit-server gnutls-utils \
nss-softokn nss-tools nss-softokn-devel \
dnf-command\(debuginfo-install\) libasan
dnf -y debuginfo-install openssl
elif [ -f /etc/debian_version ]; then
cat .github/sid.debug.list > /etc/apt/sources.list.d/debug.list
apt-get -q update
apt-get -yq install git gcc clang make automake \
libtool pkg-config autoconf-archive libssl-dev openssl expect \
procps libnss3 libnss3-tools libnss3-dev softhsm opensc p11-kit \
libp11-kit-dev p11-kit-modules gnutls-bin \
openssl-dbgsym libssl3-dbgsym
fi
- name: Setup
# The detection on debian works ok, but on Fedora, we get linker script,
# that is not compabitlbe with LD_PRELOAD so we force the absolute path.
run: |
if [ -f /etc/fedora-release ]; then
autoreconf -fiv
CC=gcc \
./configure --with-address-sanitizer=/usr/lib64/libasan.so.8.0.0
elif [ -f /etc/debian_version ]; then
autoreconf -fiv
CC=gcc \
./configure --with-address-sanitizer
fi
- name: Build and Test
run: make check
- uses: actions/upload-artifact@v3
if: failure()
with:
name: Address sanitizer logs on ${{ matrix.name }}
path: |
tests/*.log
tests/openssl.cnf
tests/tmp.${{ matrix.token }}/p11prov-debug.log
tests/tmp.${{ matrix.token }}/testvars
config.log