Skip to content

Commit 6b7c3ec

Browse files
committed
Add a GitHub actions build variant for testing the AddressSanitizer integration
1 parent b04e920 commit 6b7c3ec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build.yml

+11
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ jobs:
175175
ocamlparam: '_,w=-46,regalloc=cfg,vectorize=1'
176176
check_arch: true
177177

178+
- name: address_sanitizer
179+
config: --enable-middle-end=flambda2 --enable-address-sanitizer
180+
os: ubuntu-latest
181+
cc: clang
182+
178183
env:
179184
J: "3"
180185
run_testsuite: "true"
@@ -190,6 +195,10 @@ jobs:
190195
if: matrix.os == 'ubuntu-latest'
191196
run: sudo apt-get install afl++
192197

198+
- name: Install clang
199+
if: matrix.os == 'ubuntu-latest' && matrix.cc == 'clang'
200+
run: sudo apt-get install clang
201+
193202
- name: Install AFL (for macOS workers)
194203
# The "afl-fuzz" package is deprecated (2023-10) and can no longer be installed
195204
if: matrix.os == 'macos-latest'
@@ -279,6 +288,8 @@ jobs:
279288
- name: Configure Flambda backend
280289
working-directory: flambda_backend
281290
run: |
291+
CC="${{matrix.cc}}"
292+
export CC="${CC:-gcc}"
282293
autoconf
283294
./configure \
284295
--prefix=$GITHUB_WORKSPACE/_install \

0 commit comments

Comments
 (0)