]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: Integrate Musl build into vtest.yml
authorTim Duesterhus <tim@bastelstu.be>
Mon, 13 Apr 2026 19:23:41 +0000 (21:23 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 14 Apr 2026 09:16:17 +0000 (11:16 +0200)
With the previous sync, these two workflows perform almost the same steps and
both logically belong to "Run VTest tests". Integrate musl.yml into vtest.yml,
which will hopefully encourage future changes to consistently apply to all jobs
in that workflow.

.github/workflows/musl.yml [deleted file]
.github/workflows/vtest.yml

diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml
deleted file mode 100644 (file)
index 4220e6f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-name: alpine/musl
-
-on:
-  push:
-
-permissions:
-  contents: read
-
-jobs:
-  Test:
-    name: musl, ${{ matrix.name }}
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        include:
-        - name: gcc
-          CC: gcc
-          FLAGS:
-          - ARCH_FLAGS='-ggdb3'
-          - USE_LUA=1
-          - LUA_INC=/usr/include/lua5.3
-          - LUA_LIB=/usr/lib/lua5.3
-          - USE_OPENSSL=1
-          - USE_PCRE2=1
-          - USE_PCRE2_JIT=1
-          - USE_PROMEX=1
-      fail-fast: false
-    container:
-      image: alpine:latest
-      options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
-      volumes:
-      - /tmp/core:/tmp/core
-    steps:
-    - name: Setup coredumps
-      run: |
-        echo '/tmp/core/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
-    - uses: actions/checkout@v6
-    - name: Install dependencies
-      run: apk add gcc gdb make tar git python3 libc-dev linux-headers pcre-dev pcre2-dev openssl-dev lua5.3-dev grep socat curl musl-dbg lua5.3-dbg jose
-    - uses: ./.github/actions/setup-vtest
-    - name: Compile HAProxy with ${{ matrix.CC }}
-      run: |
-        echo "::group::Show compiler's version"
-        echo | ${{ matrix.CC }} -v
-        echo "::endgroup::"
-        echo "::group::Show platform specific defines"
-        echo | ${{ matrix.CC }} -dM -xc -E -
-        echo "::endgroup::"
-        make -j$(nproc) all \
-          ERR=1 \
-          TARGET=linux-musl \
-          CC=${{ matrix.CC }} \
-          DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \
-          ${{ join(matrix.FLAGS, ' ') }} \
-          ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/"
-        make install-bin
-    - name: Show HAProxy version
-      id: show-version
-      run: |
-        echo "::group::Show dynamic libraries."
-        if command -v ldd > /dev/null; then
-          # Linux
-          ldd $(which haproxy)
-        else
-          # macOS
-          otool -L $(which haproxy)
-        fi
-        echo "::endgroup::"
-        haproxy -vv
-        echo "version=$(haproxy -vq)" >> $GITHUB_OUTPUT
-    - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
-      id: vtest
-      run: |
-        make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest REGTESTS_TYPES=default,bug,devel
-    - name: Show VTest results
-      if: ${{ failure() && steps.vtest.outcome == 'failure' }}
-      run: |
-        for folder in ${TMPDIR:-/tmp}/haregtests-*/vtc.*; do
-          printf "::group::"
-          cat $folder/INFO
-          cat $folder/LOG
-          echo "::endgroup::"
-        done
-        exit 1
-    - name: Run Unit tests
-      id: unittests
-      run: |
-        make unit-tests
-    - name: Show Unit-Tests results
-      if: ${{ failure() && steps.unittests.outcome == 'failure' }}
-      run: |
-        for result in ${TMPDIR:-/tmp}/ha-unittests-*/results/res.*; do
-          printf "::group::"
-          cat $result
-          echo "::endgroup::"
-        done
-        exit 1
-    - name: Show coredumps
-      if: ${{ failure() && steps.vtest.outcome == 'failure' }}
-      run: |
-        failed=false
-        ls /tmp/core/
-        for file in /tmp/core/core.*; do
-          failed=true
-          printf "::group::"
-          gdb -ex 'thread apply all bt full' ./haproxy $file
-          echo "::endgroup::"
-        done
-        if [ "$failed" = true ]; then
-          exit 1;
-        fi
index dec4735129f44f0665e73cdd5f76024f61fda87b..6113e4a3c4755dc349b73882aeb5926d7845ef92 100644 (file)
@@ -178,3 +178,105 @@ jobs:
         if [ "$failed" = true ]; then
           exit 1;
         fi
+  Test-musl:
+    name: Alpine+musl, ${{ matrix.name }}
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        include:
+        - name: gcc
+          CC: gcc
+          FLAGS:
+          - ARCH_FLAGS='-ggdb3'
+          - USE_LUA=1
+          - LUA_INC=/usr/include/lua5.3
+          - LUA_LIB=/usr/lib/lua5.3
+          - USE_OPENSSL=1
+          - USE_PCRE2=1
+          - USE_PCRE2_JIT=1
+          - USE_PROMEX=1
+      fail-fast: false
+    container:
+      image: alpine:latest
+      options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
+      volumes:
+      - /tmp/core:/tmp/core
+    steps:
+    - name: Setup coredumps
+      run: |
+        echo '/tmp/core/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
+    - uses: actions/checkout@v6
+    - name: Install dependencies
+      run: apk add gcc gdb make tar git python3 libc-dev linux-headers pcre-dev pcre2-dev openssl-dev lua5.3-dev grep socat curl musl-dbg lua5.3-dbg jose
+    - uses: ./.github/actions/setup-vtest
+    - name: Compile HAProxy with ${{ matrix.CC }}
+      run: |
+        echo "::group::Show compiler's version"
+        echo | ${{ matrix.CC }} -v
+        echo "::endgroup::"
+        echo "::group::Show platform specific defines"
+        echo | ${{ matrix.CC }} -dM -xc -E -
+        echo "::endgroup::"
+        make -j$(nproc) all \
+          ERR=1 \
+          TARGET=linux-musl \
+          CC=${{ matrix.CC }} \
+          DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \
+          ${{ join(matrix.FLAGS, ' ') }} \
+          ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/"
+        make install-bin
+    - name: Show HAProxy version
+      id: show-version
+      run: |
+        echo "::group::Show dynamic libraries."
+        if command -v ldd > /dev/null; then
+          # Linux
+          ldd $(which haproxy)
+        else
+          # macOS
+          otool -L $(which haproxy)
+        fi
+        echo "::endgroup::"
+        haproxy -vv
+        echo "version=$(haproxy -vq)" >> $GITHUB_OUTPUT
+    - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
+      id: vtest
+      run: |
+        make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest REGTESTS_TYPES=default,bug,devel
+    - name: Show VTest results
+      if: ${{ failure() && steps.vtest.outcome == 'failure' }}
+      run: |
+        for folder in ${TMPDIR:-/tmp}/haregtests-*/vtc.*; do
+          printf "::group::"
+          cat $folder/INFO
+          cat $folder/LOG
+          echo "::endgroup::"
+        done
+        exit 1
+    - name: Run Unit tests
+      id: unittests
+      run: |
+        make unit-tests
+    - name: Show Unit-Tests results
+      if: ${{ failure() && steps.unittests.outcome == 'failure' }}
+      run: |
+        for result in ${TMPDIR:-/tmp}/ha-unittests-*/results/res.*; do
+          printf "::group::"
+          cat $result
+          echo "::endgroup::"
+        done
+        exit 1
+    - name: Show coredumps
+      if: ${{ failure() && steps.vtest.outcome == 'failure' }}
+      run: |
+        failed=false
+        ls /tmp/core/
+        for file in /tmp/core/core.*; do
+          failed=true
+          printf "::group::"
+          gdb -ex 'thread apply all bt full' ./haproxy $file
+          echo "::endgroup::"
+        done
+        if [ "$failed" = true ]; then
+          exit 1;
+        fi