]> git.kaiwu.me - haproxy.git/commitdiff
CI: github: restrict WolfSSL sanitizer flags to debug jobs
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 18 Nov 2026 10:18:51 +0000 (10:18 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 18 Nov 2026 10:19:24 +0000 (11:19 +0100)
Only override WolfSSL CFLAGS and HAProxy ARCH_FLAGS when debug=1.
Keep WolfSSL debugging and AddressSanitizer enabled for that variant.

For debug=0, use the default WolfSSL compiler flags and HAProxy's
default ARCH_FLAGS=-g, matching the flags of the removed VTest job.
Leave the shared HAProxy debug defines unchanged.

.github/workflows/wolfssl.yml

index 3d4c5eb2c635c5d082a361221bdd0445b5de2948..2a97627662203a71891a593edd262b41b66ac7d3 100644 (file)
@@ -15,7 +15,7 @@ jobs:
       fail-fast: false
       matrix:
         wolfssl: [5.7.0]
-        # Cover both normal builds and WolfSSL's --enable-debug configuration.
+        # Keep normal build flags at debug=0; enable WolfSSL debugging and ASan at debug=1.
         debug: [0, 1]
     runs-on: ubuntu-latest
     if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }}
@@ -26,7 +26,7 @@ jobs:
           sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
           sudo apt-get --no-install-recommends -y install socat gdb jose
       - name: Install WolfSSL
-        run: env WOLFSSL_VERSION=${{ matrix.wolfssl }} WOLFSSL_DEBUG=${{ matrix.debug }} CFLAGS="-fsanitize=address -g" scripts/build-ssl.sh
+        run: env WOLFSSL_VERSION=${{ matrix.wolfssl }} WOLFSSL_DEBUG=${{ matrix.debug }} ${{ matrix.debug == 1 && 'CFLAGS="-fsanitize=address -g"' || '' }} scripts/build-ssl.sh
       - name: Compile HAProxy
         run: |
           make -j$(nproc) ERR=1 CC=gcc TARGET=linux-glibc \
@@ -34,7 +34,7 @@ jobs:
             SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \
             DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \
             ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" \
-            ARCH_FLAGS="-ggdb3 -fsanitize=address"
+            ${{ matrix.debug == 1 && 'ARCH_FLAGS="-ggdb3 -fsanitize=address"' || '' }}
           sudo make install
       - name: Show HAProxy version
         id: show-version