Skip to content

Commit

Permalink
Test clang with and without optimisations (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
NWilson authored Nov 15, 2024
1 parent 6f2da25 commit b65cf00
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: ./autogen.sh

- name: Configure
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
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

- name: Build
run: make -j3
Expand All @@ -42,6 +42,9 @@ jobs:
# Tests with: clang AB/UB; link-size=3
name: Clang
runs-on: ubuntu-latest
strategy:
matrix:
opt: ["-O0", "-O2"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,13 +55,15 @@ jobs:
run: ./autogen.sh

- name: Configure
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
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

- name: Build
run: make -j3

- name: Test (main test script)
run: ./RunTest
run: |
ulimit -S -s 32768 # Raise stack limit; ASAN with -O0 is very stack-hungry
./RunTest
- name: Test (JIT test program)
run: ./pcre2_jit_test
Expand Down

0 comments on commit b65cf00

Please sign in to comment.