v2 attached пн, 12 мая 2025 г. в 15:19, William Lallemand <wlallem...@haproxy.com>:
> Hello Ilya, > > Could you just fix the following part: > > > the unit-test ones lack the "show unit-tests results" that we have in > > vtest.yml, it would be better to have it to > > display what's going on upon failure. > > And I'll take them, > > Thanks > > > On Mon, May 12, 2025 at 10:21:40AM +0200, Илья Шипицин wrote: > > Subject: Re: [PATCH 01/10] CI: musl: enable unit tests > > all patches were rejected ? > > > > чт, 24 апр. 2025 г. в 14:56, William Lallemand <wlallem...@haproxy.com>: > > > > > Hello Ilia, > > > > > > On Wed, Apr 23, 2025 at 04:44:03PM +0200, Илья Шипицин wrote: > > > > personally, I do not think we'll benefit much from "templating" > > > workflows. > > > > > > > > > > Only vtest.yml with matrix.py which basically does this templating does > > > not lack anything. But if you take a look at the > > > other .yml files it lacks a lot of things because we don't bother > spending > > > time copying the same new things again and > > > again in the other 20 .yml files. I think we could really improve that > in > > > the future. > > > > > > > what would be really interesting is some kind of reporting based, for > > > > example on JUnit xml files (like this Unit test reports | GitLab Docs > > > > <https://docs.gitlab.com/ci/testing/unit_test_reports/> ) > > > > that way you'll be able to track tests from execution to execution, > which > > > > one slow down, which one is flaky and so on. > > > > > > > > it is a pity that you cannot build reports from GHA > > > > > > > > > > Honestly no idea, We probably won't have time to read them, we only > > > checking things when there is a failed status on the > > > CI. > > > > > > > > > > ср, 23 апр. 2025 г. в 10:40, William Lallemand < > wlallem...@haproxy.com>: > > > > > > > > > On Thu, Apr 17, 2025 at 10:56:12PM +0200, Ilia Shipitsin wrote: > > > > > > Subject: [PATCH 01/10] CI: musl: enable unit tests > > > > > > Run the new make unit-tests on the CI. > > > > > > --- > > > > > > .github/workflows/musl.yml | 6 +++++- > > > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/.github/workflows/musl.yml > b/.github/workflows/musl.yml > > > > > > index a54414fab..b4d91e45a 100644 > > > > > > --- a/.github/workflows/musl.yml > > > > > > +++ b/.github/workflows/musl.yml > > > > > > @@ -26,7 +26,7 @@ jobs: > > > > > > - name: Install VTest > > > > > > run: scripts/build-vtest.sh > > > > > > - name: Build > > > > > > - run: make -j$(nproc) TARGET=linux-musl > ARCH_FLAGS='-ggdb3' > > > > > CC=cc V=1 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 > > > > > > + run: make -j$(nproc) TARGET=linux-musl > > > > > DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" ARCH_FLAGS='-ggdb3' > CC=cc > > > V=1 > > > > > 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 > > > > > > - name: Show version > > > > > > run: ./haproxy -vv > > > > > > - name: Show linked libraries > > > > > > @@ -37,6 +37,10 @@ jobs: > > > > > > - name: Run VTest > > > > > > id: vtest > > > > > > run: make reg-tests VTEST_PROGRAM=../vtest/vtest > > > > > REGTESTS_TYPES=default,bug,devel > > > > > > + - name: Run Unit tests > > > > > > + id: unittests > > > > > > + run: | > > > > > > + make unit-tests > > > > > > - name: Show coredumps > > > > > > if: ${{ failure() && steps.vtest.outcome == 'failure' }} > > > > > > run: | > > > > > > > > > > Hello Ilia, > > > > > > > > > > the unit-test ones lack the "show unit-tests results" that we have > in > > > > > vtest.yml, it would be better to have it to > > > > > display what's going on upon failure. > > > > > > > > > > I wonder if we can't just inherit most of the steps instead of > copying > > > the > > > > > same yml part in every part, it would be less > > > > > difficult to maintain. > > > > > > > > > > Regards, > > > > > > > > > > -- > > > > > William Lallemand > > > > > > > > > > > -- > > > William Lallemand > > > > > -- > William Lallemand >
From 5badd5716cf260b89cc5b1a655bc7aa7f3a28e50 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:35:29 +0200 Subject: [PATCH 1/6] CI: AWS-LC(fips): enable unit tests Run the new make unit-tests on the CI. --- .github/workflows/aws-lc-fips.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws-lc-fips.yml b/.github/workflows/aws-lc-fips.yml index 41da4e437..f8fda0105 100644 --- a/.github/workflows/aws-lc-fips.yml +++ b/.github/workflows/aws-lc-fips.yml @@ -11,6 +11,7 @@ permissions: jobs: test: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: Install VTest @@ -31,7 +32,7 @@ jobs: - name: Install apt dependencies run: | sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none - sudo apt-get --no-install-recommends -y install socat gdb + sudo apt-get --no-install-recommends -y install socat gdb jose - name: Install AWS-LC if: ${{ steps.cache_ssl.outputs.cache-hit != 'true' }} run: env ${{ steps.get_aws_lc_release.outputs.result }} scripts/build-ssl.sh @@ -40,7 +41,7 @@ jobs: make -j$(nproc) ERR=1 CC=gcc TARGET=linux-glibc \ USE_OPENSSL_AWSLC=1 USE_QUIC=1 \ SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \ - DEBUG="-DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \ ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" sudo make install - name: Show HAProxy version @@ -60,6 +61,10 @@ jobs: # 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 + run: | + make unit-tests - name: Show VTest results if: ${{ failure() && steps.vtest.outcome == 'failure' }} run: | @@ -84,3 +89,13 @@ jobs: if [ "$failed" = true ]; then exit 1; fi + - 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 + -- 2.46.0.windows.1
From ab043745436f707ebc379aa98514b88b56738373 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:36:17 +0200 Subject: [PATCH 2/6] CI: AWS-LC: enable unit tests Run the new make unit-tests on the CI. --- .github/workflows/aws-lc.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws-lc.yml b/.github/workflows/aws-lc.yml index 6b4ad490c..39e779fde 100644 --- a/.github/workflows/aws-lc.yml +++ b/.github/workflows/aws-lc.yml @@ -11,6 +11,7 @@ permissions: jobs: test: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: Install VTest @@ -31,7 +32,7 @@ jobs: - name: Install apt dependencies run: | sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none - sudo apt-get --no-install-recommends -y install socat gdb + sudo apt-get --no-install-recommends -y install socat gdb jose - name: Install AWS-LC if: ${{ steps.cache_ssl.outputs.cache-hit != 'true' }} run: env ${{ steps.get_aws_lc_release.outputs.result }} scripts/build-ssl.sh @@ -40,7 +41,7 @@ jobs: make -j$(nproc) ERR=1 CC=gcc TARGET=linux-glibc \ USE_OPENSSL_AWSLC=1 USE_QUIC=1 \ SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \ - DEBUG="-DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \ ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" sudo make install - name: Show HAProxy version @@ -60,6 +61,10 @@ jobs: # 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 + run: | + make unit-tests - name: Show VTest results if: ${{ failure() && steps.vtest.outcome == 'failure' }} run: | @@ -84,3 +89,13 @@ jobs: if [ "$failed" = true ]; then exit 1; fi + - 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 + -- 2.46.0.windows.1
From ffabad0abdff0479d6fe55f099b880d7e985be10 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:37:35 +0200 Subject: [PATCH 4/6] CI: musl: enable unit tests Run the new make unit-tests on the CI. --- .github/workflows/musl.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml index a54414fab..a05661f33 100644 --- a/.github/workflows/musl.yml +++ b/.github/workflows/musl.yml @@ -22,11 +22,11 @@ jobs: echo '/tmp/core/core.%h.%e.%t' > /proc/sys/kernel/core_pattern - uses: actions/checkout@v4 - 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 + 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 - name: Install VTest run: scripts/build-vtest.sh - name: Build - run: make -j$(nproc) TARGET=linux-musl ARCH_FLAGS='-ggdb3' CC=cc V=1 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 + run: make -j$(nproc) TARGET=linux-musl DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" ARCH_FLAGS='-ggdb3' CC=cc V=1 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 - name: Show version run: ./haproxy -vv - name: Show linked libraries @@ -37,6 +37,10 @@ jobs: - name: Run VTest id: vtest run: make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel + - name: Run Unit tests + id: unittests + run: | + make unit-tests - name: Show coredumps if: ${{ failure() && steps.vtest.outcome == 'failure' }} run: | @@ -60,3 +64,13 @@ jobs: cat $folder/LOG echo "::endgroup::" done + - 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 + -- 2.46.0.windows.1
From 770cf8365c8e3efa2b2f1136ff4ad5bf050c7349 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:36:41 +0200 Subject: [PATCH 3/6] CI: compliance: limit run on forks only to manual + cleanup --- .github/workflows/compliance.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 29af0a9e8..6f8d1efc6 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -11,13 +11,8 @@ permissions: jobs: h2spec: name: h2spec - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - TARGET: linux-glibc - CC: gcc - os: ubuntu-latest + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: Install h2spec @@ -28,12 +23,12 @@ jobs: tar xvf h2spec.tar.gz sudo install -m755 h2spec /usr/local/bin/h2spec echo "version=${H2SPEC_VERSION}" >> $GITHUB_OUTPUT - - name: Compile HAProxy with ${{ matrix.CC }} + - name: Compile HAProxy with gcc run: | make -j$(nproc) all \ ERR=1 \ - TARGET=${{ matrix.TARGET }} \ - CC=${{ matrix.CC }} \ + TARGET=linux-glibc \ + CC=gcc \ DEBUG="-DDEBUG_POOL_INTEGRITY" \ USE_OPENSSL=1 sudo make install -- 2.46.0.windows.1
From 11231662c7519c30e3e5c7debf42e7e0c6d7d7ca Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:38:10 +0200 Subject: [PATCH 5/6] CI: QuicTLS (weekly): limit run on forks only to manual dispatch --- .github/workflows/quictls.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/quictls.yml b/.github/workflows/quictls.yml index 9926b0a9e..76b6d3bcd 100644 --- a/.github/workflows/quictls.yml +++ b/.github/workflows/quictls.yml @@ -15,6 +15,7 @@ permissions: jobs: test: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: Install VTest -- 2.46.0.windows.1
From 2829869a2d4478d73e3d10090d82a49f76e7c48f Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin <chipits...@gmail.com> Date: Tue, 13 May 2025 20:38:45 +0200 Subject: [PATCH 6/6] CI: WolfSSL: enable unit tests Run the new make unit-tests on the CI. --- .github/workflows/wolfssl.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wolfssl.yml b/.github/workflows/wolfssl.yml index d040cf017..0f79f7fe3 100644 --- a/.github/workflows/wolfssl.yml +++ b/.github/workflows/wolfssl.yml @@ -11,6 +11,7 @@ permissions: jobs: test: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: Install VTest @@ -19,7 +20,7 @@ jobs: - name: Install apt dependencies run: | sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none - sudo apt-get --no-install-recommends -y install socat gdb + sudo apt-get --no-install-recommends -y install socat gdb jose - name: Install WolfSSL run: env WOLFSSL_VERSION=git-master WOLFSSL_DEBUG=1 scripts/build-ssl.sh - name: Compile HAProxy @@ -27,7 +28,7 @@ jobs: make -j$(nproc) ERR=1 CC=gcc TARGET=linux-glibc \ USE_OPENSSL_WOLFSSL=1 USE_QUIC=1 \ SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \ - DEBUG="-DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \ ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" \ ARCH_FLAGS="-ggdb3 -fsanitize=address" sudo make install @@ -48,6 +49,10 @@ jobs: # 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 + run: | + make unit-tests - name: Show VTest results if: ${{ failure() && steps.vtest.outcome == 'failure' }} run: | @@ -72,3 +77,13 @@ jobs: if [ "$failed" = true ]; then exit 1; fi + - 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 + -- 2.46.0.windows.1