Skip to content

Commit 01f9fa5

Browse files
committed
github: run unit tests with sanitizers
Running with sanitizers in CI will help prevent us from introducing new memory safety errors.
1 parent 4f30857 commit 01f9fa5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,40 @@ jobs:
101101
./configure
102102
make -j $(nproc) check-units installcheck
103103
104+
check-units-sanitizers:
105+
name: Run unit tests with ASan and UBSan
106+
runs-on: ubuntu-22.04
107+
timeout-minutes: 60
108+
env:
109+
COMPAT: 1
110+
ASAN: 1
111+
UBSAN: 1
112+
VALGRIND: 0
113+
needs:
114+
- prebuild
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v3
118+
119+
- name: Set up Python 3.7
120+
uses: actions/setup-python@v4
121+
with:
122+
python-version: 3.7
123+
124+
- name: Install dependencies
125+
run: |
126+
bash -x .github/scripts/setup.sh
127+
sudo apt-get install -y -qq lowdown
128+
pip install -U pip wheel poetry
129+
# Export and then use pip to install into the current env
130+
poetry export -o /tmp/requirements.txt --without-hashes --with dev
131+
pip install -r /tmp/requirements.txt
132+
133+
- name: Build
134+
run: |
135+
./configure CC=clang
136+
make -j $(nproc) check-units installcheck
137+
104138
check-fuzz:
105139
name: Run fuzz regression tests
106140
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)