]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: move VTest preparation & friends to dedicated composite action
authorIlia Shipitsin <chipitsine@gmail.com>
Wed, 17 Sep 2025 20:26:24 +0000 (22:26 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 22 Sep 2025 17:18:23 +0000 (19:18 +0200)
reference: https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action

preparing coredump limits, installing VTest are now served by dedicated
composite action

.github/actions/setup-vtest/action.yml [new file with mode: 0644]
.github/workflows/aws-lc-template.yml
.github/workflows/fedora-rawhide.yml
.github/workflows/openssl-nodeprecated.yml
.github/workflows/quictls.yml
.github/workflows/vtest.yml
.github/workflows/wolfssl.yml

diff --git a/.github/actions/setup-vtest/action.yml b/.github/actions/setup-vtest/action.yml
new file mode 100644 (file)
index 0000000..0d9d85e
--- /dev/null
@@ -0,0 +1,34 @@
+name: 'setup VTest'
+description: 'ssss'
+
+runs:
+  using: "composite"
+  steps:
+
+    - name: Setup coredumps
+      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
+      shell: bash
+      run: |
+        sudo sysctl -w fs.suid_dumpable=1
+        sudo sysctl kernel.core_pattern=/tmp/core.%h.%e.%t
+
+    - name: Setup ulimit for core dumps
+      shell: bash
+      run: |
+        # This is required for macOS which does not actually allow to increase
+        # the '-n' soft limit to the hard limit, thus failing to run.
+        ulimit -n 65536
+        ulimit -c unlimited
+
+    - name: Install VTest
+      shell: bash
+      run: |
+        scripts/build-vtest.sh
+
+    - name: Install problem matcher for VTest
+      shell: bash
+      # This allows one to more easily see which tests fail.
+      run: echo "::add-matcher::.github/vtest.json"
+
+
+
index 60f6e607ffd7f74b4d7f2edae1222a2cec15304a..056d263363e30bfbf7a028be9ea4bb7b8792f360 100644 (file)
@@ -16,9 +16,6 @@ jobs:
     if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }}
     steps:
       - uses: actions/checkout@v5
-      - name: Install VTest
-        run: |
-          scripts/build-vtest.sh
       - name: Determine latest AWS-LC release
         id: get_aws_lc_release
         run: |
@@ -52,16 +49,10 @@ jobs:
           ldd $(which haproxy)
           haproxy -vv
           echo "version=$(haproxy -v |awk 'NR==1{print $3}')" >> $GITHUB_OUTPUT
-      - name: Install problem matcher for VTest
-        run: echo "::add-matcher::.github/vtest.json"
+      - uses: ./.github/actions/setup-vtest
       - name: Run VTest for HAProxy
         id: vtest
         run: |
-          # This is required for macOS which does not actually allow to increase
-          # the '-n' soft limit to the hard limit, thus failing to run.
-          ulimit -n 65536
-          # allow to catch coredumps
-          ulimit -c unlimited
           make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
       - name: Run Unit tests
         id: unittests
index 8965e464bc2c0eb3612ebba99385c10b823499e4..38808f510a1015c0779fbbb167d56af8e81502e5 100644 (file)
@@ -29,8 +29,7 @@ jobs:
       run: |
         dnf -y install awk diffutils git pcre-devel zlib-devel pcre2-devel 'perl(FindBin)' perl-IPC-Cmd 'perl(File::Copy)' 'perl(File::Compare)' lua-devel socat findutils systemd-devel clang
         dnf -y install 'perl(FindBin)' 'perl(File::Compare)' perl-IPC-Cmd 'perl(File::Copy)' glibc-devel.i686 lua-devel.i686 lua-devel.x86_64 systemd-devel.i686 zlib-ng-compat-devel.i686 pcre-devel.i686 libatomic.i686
-    - name: Install VTest
-      run: scripts/build-vtest.sh
+    - uses: ./.github/actions/setup-vtest
     - name: Install QuicTLS
       run: QUICTLS=yes QUICTLS_EXTRA_ARGS="${{ matrix.platform.QUICTLS_EXTRA_ARGS }}" scripts/build-ssl.sh
     - name: Build contrib tools
index 6038870f097c434a4faa996f9f9de65f39e63a8a..6a4037c0caeab675e889d05493c940b61049c446 100644 (file)
@@ -23,9 +23,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v5
-    - name: Install VTest
-      run: |
-        scripts/build-vtest.sh
+    - uses: ./.github/actions/setup-vtest
     - name: Compile HAProxy
       run: |
         make DEFINE="-DOPENSSL_API_COMPAT=0x10100000L -DOPENSSL_NO_DEPRECATED" -j3 CC=gcc ERR=1 TARGET=linux-glibc USE_OPENSSL=1
index a6870dbb50bd5e2b581bea46c372ae4ae6063afa..a8b2f96b4d025ab758cee1d942cf3489a6d2dff7 100644 (file)
@@ -18,9 +18,6 @@ jobs:
     if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }}
     steps:
       - uses: actions/checkout@v5
-      - name: Install VTest
-        run: |
-          scripts/build-vtest.sh
       - name: Install apt dependencies
         run: |
           sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
@@ -42,16 +39,10 @@ jobs:
           ldd $(which haproxy)
           haproxy -vv
           echo "version=$(haproxy -v |awk 'NR==1{print $3}')" >> $GITHUB_OUTPUT
-      - name: Install problem matcher for VTest
-        run: echo "::add-matcher::.github/vtest.json"
+      - uses: ./.github/actions/setup-vtest
       - name: Run VTest for HAProxy
         id: vtest
         run: |
-          # This is required for macOS which does not actually allow to increase
-          # the '-n' soft limit to the hard limit, thus failing to run.
-          ulimit -n 65536
-          # allow to catch coredumps
-          ulimit -c unlimited
           make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
       - name: Show VTest results
         if: ${{ failure() && steps.vtest.outcome == 'failure' }}
index 4e859a4c8b152348296bc2ed60bc9160e15ef6d1..3a75b525a44a89ebf8a5eedc2e6d54b303a40ac1 100644 (file)
@@ -48,12 +48,6 @@ jobs:
       with:
         fetch-depth: 100
 
-    - name: Setup coredumps
-      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
-      run: |
-        sudo sysctl -w fs.suid_dumpable=1
-        sudo sysctl kernel.core_pattern=/tmp/core.%h.%e.%t
-
 #
 # Github Action cache key cannot contain comma, so we calculate it based on job name
 #
@@ -93,9 +87,7 @@ jobs:
       run: |
         brew install socat
         brew install lua
-    - name: Install VTest
-      run: |
-        scripts/build-vtest.sh
+    - uses: ./.github/actions/setup-vtest
     - name: Install SSL ${{ matrix.ssl }}
       if: ${{ matrix.ssl && matrix.ssl != 'stock' && steps.cache_ssl.outputs.cache-hit != 'true' }}
       run: env ${{ matrix.ssl }} scripts/build-ssl.sh
@@ -136,16 +128,9 @@ jobs:
         echo "::endgroup::"
         haproxy -vv
         echo "version=$(haproxy -v |awk 'NR==1{print $3}')" >> $GITHUB_OUTPUT
-    - name: Install problem matcher for VTest
-      # This allows one to more easily see which tests fail.
-      run: echo "::add-matcher::.github/vtest.json"
     - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
       id: vtest
       run: |
-        # This is required for macOS which does not actually allow to increase
-        # the '-n' soft limit to the hard limit, thus failing to run.
-        ulimit -n 65536
-        ulimit -c unlimited
         make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
     - name: Show VTest results
       if: ${{ failure() && steps.vtest.outcome == 'failure' }}
index 7dbc6a279c5367a79469881caf52e7339652eb21..d99e084ab8337c4a0f2a416b1fa46add0623cac8 100644 (file)
@@ -14,9 +14,6 @@ jobs:
     if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }}
     steps:
       - uses: actions/checkout@v5
-      - name: Install VTest
-        run: |
-          scripts/build-vtest.sh
       - name: Install apt dependencies
         run: |
           sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
@@ -38,16 +35,10 @@ jobs:
           ldd $(which haproxy)
           haproxy -vv
           echo "version=$(haproxy -v |awk 'NR==1{print $3}')" >> $GITHUB_OUTPUT
-      - name: Install problem matcher for VTest
-        run: echo "::add-matcher::.github/vtest.json"
+      - uses: ./.github/actions/setup-vtest
       - name: Run VTest for HAProxy
         id: vtest
         run: |
-          # This is required for macOS which does not actually allow to increase
-          # the '-n' soft limit to the hard limit, thus failing to run.
-          ulimit -n 65536
-          # allow to catch coredumps
-          ulimit -c unlimited
           make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
       - name: Run Unit tests
         id: unittests