Skip to content

Commit b65cf00

Browse files
authored
Test clang with and without optimisations (#559)
1 parent 6f2da25 commit b65cf00

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/dev.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: ./autogen.sh
2222

2323
- name: Configure
24-
run: ./configure CC='gcc' CFLAGS='-O0 -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CPPFLAGS='-Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=4
24+
run: ./configure CC='gcc -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CFLAGS='-O0 -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=4
2525

2626
- name: Build
2727
run: make -j3
@@ -42,6 +42,9 @@ jobs:
4242
# Tests with: clang AB/UB; link-size=3
4343
name: Clang
4444
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
opt: ["-O0", "-O2"]
4548
steps:
4649
- name: Checkout
4750
uses: actions/checkout@v4
@@ -52,13 +55,15 @@ jobs:
5255
run: ./autogen.sh
5356

5457
- name: Configure
55-
run: ./configure CC='clang -fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-integer-overflow,unsigned-shift-base,function' CPPFLAGS='-Wall -Wextra -Werror -Wno-error=unused-but-set-parameter -Wno-error=deprecated-declarations -Wno-error=incompatible-library-redeclaration -Wno-error=incompatible-pointer-types-discards-qualifiers' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=3
58+
run: ./configure CC='clang -fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-integer-overflow,unsigned-shift-base,function' CFLAGS='${{ matrix.opt }} -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter -Wno-error=deprecated-declarations -Wno-error=incompatible-library-redeclaration -Wno-error=incompatible-pointer-types-discards-qualifiers' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=3
5659

5760
- name: Build
5861
run: make -j3
5962

6063
- name: Test (main test script)
61-
run: ./RunTest
64+
run: |
65+
ulimit -S -s 32768 # Raise stack limit; ASAN with -O0 is very stack-hungry
66+
./RunTest
6267
6368
- name: Test (JIT test program)
6469
run: ./pcre2_jit_test

0 commit comments

Comments
 (0)