Skip to content

Commit 48cf0b4

Browse files
committed
Make ASAN CI independent
reb reb reb
1 parent 079012b commit 48cf0b4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-22.04]
21-
backend: [mkl, dnnl]
21+
backend: [mkl, dnnl, asan]
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -50,6 +50,15 @@ jobs:
5050
sudo apt-get install -y intel-oneapi-dnnl-devel=$DNNL_VERSION intel-oneapi-dnnl=$DNNL_VERSION
5151
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DBUILD_TESTS=ON -DWITH_MKL=OFF -DOPENMP_RUNTIME=COMP -DWITH_DNNL=ON .
5252
53+
- name: Configure with ASAN
54+
if: startsWith(matrix.os, 'ubuntu') && matrix.backend == 'asan'
55+
env:
56+
DNNL_VERSION: 2023.0.0-25399
57+
run: |
58+
sudo apt-get install -y intel-oneapi-dnnl-devel=$DNNL_VERSION intel-oneapi-dnnl=$DNNL_VERSION
59+
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DBUILD_TESTS=ON -DWITH_MKL=OFF -DOPENMP_RUNTIME=COMP -DWITH_DNNL=ON \
60+
-DGOOGLE_ADDRESS_SANITIZER=ON -DCMAKE_BUILD_TYPE=Debug .
61+
5362
- name: Build
5463
run: |
5564
make install
@@ -71,7 +80,10 @@ jobs:
7180
if: matrix.backend == 'dnnl'
7281
run: |
7382
tests/ctranslate2_test tests/data
74-
83+
- name: Test ASAN
84+
if: matrix.backend == 'asan'
85+
run: |
86+
ASAN_OPTIONS=detect_leaks=1:print_stats=1 tests/ctranslate2_test tests/data
7587
#
7688
# build-and-test-cpp-aarch64:
7789
# runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)