Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-14 Thread Илья Шипицин
That's why Travis badge in README.md makes sense

On Mon, Jun 14, 2021, 5:16 PM Willy Tarreau  wrote:

> On Mon, Jun 14, 2021 at 02:33:20PM +0200, William Lallemand wrote:
> > On Mon, Jun 14, 2021 at 12:01:11PM +0200, Tim Düsterhus wrote:
> > > We only run Travis once weekly, because of the limited credits we
> have.
> > > Thus only the newest commit at time of running will have a Travis CI
> > > Status integrated into GitHub.
> > >
> > > The most recent one is this:
> > >
> https://github.com/haproxy/haproxy/commit/1b095cac9468d0c3eeb157e9b1a2947487bd3c83
> >
> >
> > I thought it disappeared completely from the interface, good to know!
>
> Yes, it's still useful to know whether a week ago arm64, ppc64 and s390x
> were working or not. So once a week is better than nothing at all.
>
> Willy
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-14 Thread Willy Tarreau
On Mon, Jun 14, 2021 at 02:33:20PM +0200, William Lallemand wrote:
> On Mon, Jun 14, 2021 at 12:01:11PM +0200, Tim Düsterhus wrote:
> > We only run Travis once weekly, because of the limited credits we have. 
> > Thus only the newest commit at time of running will have a Travis CI 
> > Status integrated into GitHub.
> > 
> > The most recent one is this: 
> > https://github.com/haproxy/haproxy/commit/1b095cac9468d0c3eeb157e9b1a2947487bd3c83
> 
> 
> I thought it disappeared completely from the interface, good to know!

Yes, it's still useful to know whether a week ago arm64, ppc64 and s390x
were working or not. So once a week is better than nothing at all.

Willy



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-14 Thread William Lallemand
On Mon, Jun 14, 2021 at 12:01:11PM +0200, Tim Düsterhus wrote:
> We only run Travis once weekly, because of the limited credits we have. 
> Thus only the newest commit at time of running will have a Travis CI 
> Status integrated into GitHub.
> 
> The most recent one is this: 
> https://github.com/haproxy/haproxy/commit/1b095cac9468d0c3eeb157e9b1a2947487bd3c83


I thought it disappeared completely from the interface, good to know!

Thanks

-- 
William Lallemand



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-14 Thread Tim Düsterhus

William,

On 6/14/21 11:54 AM, William Lallemand wrote:

I just remembered that we had travis-ci to achieve that in the past, but
it looks like it's not integrated in the github interface, I don't
remember why. https://travis-ci.com/github/haproxy/haproxy It looks like
it's still running though.



We only run Travis once weekly, because of the limited credits we have. 
Thus only the newest commit at time of running will have a Travis CI 
Status integrated into GitHub.


The most recent one is this: 
https://github.com/haproxy/haproxy/commit/1b095cac9468d0c3eeb157e9b1a2947487bd3c83


Best regards
Tim Düsterhus



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-14 Thread William Lallemand
On Sat, Jun 12, 2021 at 03:47:46PM +0500, Илья Шипицин wrote:
>
> final apline/musl patch attached
> 

Thanks Ilya, I thought it will be more hackish but it's clean and
simple!

Also it looks like we can build/test several architectures by combining
the same technique  with the qemu docker image (
https://github.com/docker/setup-qemu-action )

I just remembered that we had travis-ci to achieve that in the past, but
it looks like it's not integrated in the github interface, I don't
remember why. https://travis-ci.com/github/haproxy/haproxy It looks like
it's still running though.

According to their documentation they are running the CI
on the actual CPU not a emulated one, so still beter than qemu.

-- 
William Lallemand



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-12 Thread Willy Tarreau
On Sat, Jun 12, 2021 at 03:47:46PM +0500,  ??? wrote:
> final apline/musl patch attached

Applied, thank you Ilya!
Willy



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-12 Thread Илья Шипицин
final apline/musl patch attached

пт, 11 июн. 2021 г. в 23:02, Илья Шипицин :

> it works :)
>
> oops · chipitsine/haproxy@2ce9681 (github.com)
> 
>
> I'll polish it a bit and will send final patch tomorrow
>
> пт, 11 июн. 2021 г. в 20:42, Илья Шипицин :
>
>>
>>
>> пт, 11 июн. 2021 г. в 20:34, William Lallemand :
>>
>>> On Fri, Jun 11, 2021 at 08:14:49PM +0500, Илья Шипицин wrote:
>>> > I've found ubuntu musl package, so we can just link to it in CI, for
>>> > example (I'll try)
>>> >
>>>
>>>
>>> Well, that won't give you the same environnement as a docker image,
>>> with the same versions. I'll honestly prefer if we could do it with the
>>> alpine image.
>>>
>>
>> there's always gap between "what is tested" and "what is packaged".
>> package maintainers add untested selinux patches and link against
>> various libs.
>>
>> I agree with you that we should prefer to test on alpine natively.
>>
>>
>>>
>>> I you want to build with the musl-gcc wrapper you will need to link the
>>> linux headers in the musl headers directory otherwise it won't work the
>>> way their package is done.
>>>
>>
>>
>>
>>
>>
>>>
>>> --
>>> William Lallemand
>>>
>>
From 5b0db964a9328279d1c301b4c582a20983f7c329 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin 
Date: Sat, 12 Jun 2021 15:46:29 +0500
Subject: [PATCH] CI: github actions: enable alpine/musl builds

on push builds are added. based on cirrus-ci patch sent by William Lallemand
---
 .github/workflows/musl.yml | 38 ++
 1 file changed, 38 insertions(+)
 create mode 100644 .github/workflows/musl.yml

diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml
new file mode 100644
index 0..9f6b0f52a
--- /dev/null
+++ b/.github/workflows/musl.yml
@@ -0,0 +1,38 @@
+name: alpine/musl
+
+on: [push]
+
+jobs:
+  musl:
+  name: gcc
+  runs-on: ubuntu-latest
+  container:
+image: alpine:latest
+  steps:
+- uses: actions/checkout@master
+- name: Install dependencies
+  run: apk add gcc make tar git python3 libc-dev linux-headers 
pcre-dev pcre2-dev openssl-dev lua5.3-dev grep socat curl
+- name: Install VTest
+  run: scripts/build-vtest.sh
+- name: Build
+  run: make -j$(nproc) CC=cc V=1 TARGET=linux-musl 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
+  run: ldd haproxy
+- 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
+  id: vtest
+  run: make reg-tests VTEST_PROGRAM=../vtest/vtest 
REGTESTS_TYPES=default,bug,devel
+- name: Show results
+  if: ${{ failure() }}
+  run: |
+for folder in /tmp/haregtests-*/vtc.*; do
+  printf "::group::"
+  cat $folder/INFO
+  cat $folder/LOG
+  echo "::endgroup::"
+done
+shopt -s nullglob
-- 
2.29.2.windows.2



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
it works :)

oops · chipitsine/haproxy@2ce9681 (github.com)


I'll polish it a bit and will send final patch tomorrow

пт, 11 июн. 2021 г. в 20:42, Илья Шипицин :

>
>
> пт, 11 июн. 2021 г. в 20:34, William Lallemand :
>
>> On Fri, Jun 11, 2021 at 08:14:49PM +0500, Илья Шипицин wrote:
>> > I've found ubuntu musl package, so we can just link to it in CI, for
>> > example (I'll try)
>> >
>>
>>
>> Well, that won't give you the same environnement as a docker image,
>> with the same versions. I'll honestly prefer if we could do it with the
>> alpine image.
>>
>
> there's always gap between "what is tested" and "what is packaged".
> package maintainers add untested selinux patches and link against
> various libs.
>
> I agree with you that we should prefer to test on alpine natively.
>
>
>>
>> I you want to build with the musl-gcc wrapper you will need to link the
>> linux headers in the musl headers directory otherwise it won't work the
>> way their package is done.
>>
>
>
>
>
>
>>
>> --
>> William Lallemand
>>
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
пт, 11 июн. 2021 г. в 20:34, William Lallemand :

> On Fri, Jun 11, 2021 at 08:14:49PM +0500, Илья Шипицин wrote:
> > I've found ubuntu musl package, so we can just link to it in CI, for
> > example (I'll try)
> >
>
>
> Well, that won't give you the same environnement as a docker image,
> with the same versions. I'll honestly prefer if we could do it with the
> alpine image.
>

there's always gap between "what is tested" and "what is packaged".
package maintainers add untested selinux patches and link against
various libs.

I agree with you that we should prefer to test on alpine natively.


>
> I you want to build with the musl-gcc wrapper you will need to link the
> linux headers in the musl headers directory otherwise it won't work the
> way their package is done.
>





>
> --
> William Lallemand
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread William Lallemand
On Fri, Jun 11, 2021 at 08:14:49PM +0500, Илья Шипицин wrote:
> I've found ubuntu musl package, so we can just link to it in CI, for
> example (I'll try)
> 


Well, that won't give you the same environnement as a docker image,
with the same versions. I'll honestly prefer if we could do it with the
alpine image.

I you want to build with the musl-gcc wrapper you will need to link the
linux headers in the musl headers directory otherwise it won't work the
way their package is done.

-- 
William Lallemand



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
пт, 11 июн. 2021 г. в 20:18, Willy Tarreau :

> On Fri, Jun 11, 2021 at 08:14:49PM +0500,  ??? wrote:
> > @Willy Tarreau  , do you think it is good idea to display libc
> > variant in "haproxy -vv" ?
>
> If needed we can (for those that are detectable), but I'm not convinced
> of the benefits. If it's in order to exclude some tests, I'd rather
> merge this into new config predicates and use Tim's "-cc" instead. This
> will give us way more flexibility over the long term.
>


same as we display openssl variant in "haproxy -vv".
visibility only



>
> Cheers,
> Willy
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Willy Tarreau
On Fri, Jun 11, 2021 at 08:14:49PM +0500,  ??? wrote:
> @Willy Tarreau  , do you think it is good idea to display libc
> variant in "haproxy -vv" ?

If needed we can (for those that are detectable), but I'm not convinced
of the benefits. If it's in order to exclude some tests, I'd rather
merge this into new config predicates and use Tim's "-cc" instead. This
will give us way more flexibility over the long term.

Cheers,
Willy



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
@Willy Tarreau  , do you think it is good idea to display libc
variant in "haproxy -vv" ?
(not sure actually whether musl represent itself in recognizable way)

I've found ubuntu musl package, so we can just link to it in CI, for
example (I'll try)


пт, 11 июн. 2021 г. в 20:03, Илья Шипицин :

>
>
> пт, 11 июн. 2021 г. в 19:43, William Lallemand :
>
>> On Fri, Jun 11, 2021 at 07:09:14PM +0500, Илья Шипицин wrote:
>> > I'm against expanding cirrus matrix. cirrus is overloaded already, I'm
>> > afraid they will not stay for long time.
>> > using custom images in github actions is straightforward, have a look
>> >
>> > centos 6 · chipitsine/haproxy@20fabcd (github.com)
>> > <
>> https://github.com/chipitsine/haproxy/commit/20fabcd005dc9e3bac54a84bf44631f177fa79c2
>> >
>> >
>> >
>> > the same way you can specify either alpine or even special prepared
>> image.
>> > as I recall last time, we decided not to add alpine because "it is
>> tested
>> > anyway when docker images are created"
>> >
>>
>> As far as I know, it is only built, not tested. We encountered a few
>> problems that could have been caught before being built by Docker.
>> And that will prevent us to release a version that doesn't work
>> correctly with docker before they are built on the docker hub.
>>
>>
>> > also, there's small caveat, github actions runs agent inside docker
>> > container, it might have issues with older libc (or musl).
>> > but it worth a try
>> >
>>
>> Let's hope it works in this case.
>>
>
> ok, you made my weekend :)
> I will try tomorrow.
>
> also, I can contact github, no idea why they do not link they agents
> statically.
>
>
>>
>>
>> --
>> William Lallemand
>>
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
пт, 11 июн. 2021 г. в 19:43, William Lallemand :

> On Fri, Jun 11, 2021 at 07:09:14PM +0500, Илья Шипицин wrote:
> > I'm against expanding cirrus matrix. cirrus is overloaded already, I'm
> > afraid they will not stay for long time.
> > using custom images in github actions is straightforward, have a look
> >
> > centos 6 · chipitsine/haproxy@20fabcd (github.com)
> > <
> https://github.com/chipitsine/haproxy/commit/20fabcd005dc9e3bac54a84bf44631f177fa79c2
> >
> >
> >
> > the same way you can specify either alpine or even special prepared
> image.
> > as I recall last time, we decided not to add alpine because "it is tested
> > anyway when docker images are created"
> >
>
> As far as I know, it is only built, not tested. We encountered a few
> problems that could have been caught before being built by Docker.
> And that will prevent us to release a version that doesn't work
> correctly with docker before they are built on the docker hub.
>
>
> > also, there's small caveat, github actions runs agent inside docker
> > container, it might have issues with older libc (or musl).
> > but it worth a try
> >
>
> Let's hope it works in this case.
>

ok, you made my weekend :)
I will try tomorrow.

also, I can contact github, no idea why they do not link they agents
statically.


>
>
> --
> William Lallemand
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread William Lallemand
On Fri, Jun 11, 2021 at 07:09:14PM +0500, Илья Шипицин wrote:
> I'm against expanding cirrus matrix. cirrus is overloaded already, I'm
> afraid they will not stay for long time.
> using custom images in github actions is straightforward, have a look
> 
> centos 6 · chipitsine/haproxy@20fabcd (github.com)
> 
> 
> 
> the same way you can specify either alpine or even special prepared image.
> as I recall last time, we decided not to add alpine because "it is tested
> anyway when docker images are created"
>

As far as I know, it is only built, not tested. We encountered a few
problems that could have been caught before being built by Docker.
And that will prevent us to release a version that doesn't work
correctly with docker before they are built on the docker hub. 


> also, there's small caveat, github actions runs agent inside docker
> container, it might have issues with older libc (or musl).
> but it worth a try
> 

Let's hope it works in this case.


-- 
William Lallemand



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread William Lallemand
On Fri, Jun 11, 2021 at 07:19:51PM +0500, Илья Шипицин wrote:
> William, if you do not have a time, I can try to create github action based
> on your cirrus patch ... tomorrow ?
> 

I tried quickly but like Tim I couldn't make it work.

I can't spend much time on this, if you are able to make this work I
prefer to run it from github actions, otherwise we'll go with cirrus.

Thanks,

-- 
William Lallemand



Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
William, if you do not have a time, I can try to create github action based
on your cirrus patch ... tomorrow ?

пт, 11 июн. 2021 г. в 19:09, Илья Шипицин :

> I'm against expanding cirrus matrix. cirrus is overloaded already, I'm
> afraid they will not stay for long time.
> using custom images in github actions is straightforward, have a look
>
> centos 6 · chipitsine/haproxy@20fabcd (github.com)
> 
>
>
> the same way you can specify either alpine or even special prepared image.
> as I recall last time, we decided not to add alpine because "it is tested
> anyway when docker images are created"
>
> also, there's small caveat, github actions runs agent inside docker
> container, it might have issues with older libc (or musl).
> but it worth a try
>
>
> пт, 11 июн. 2021 г. в 19:02, William Lallemand :
>
>> This commit adds a CI job to cirrus-ci which builds HAProxy on Alpine
>> Linux, allowing to build and test HAProxy with musl.
>>
>> OpenSSL, PCRE2, Lua 5.3 as well as the prometheus exporter are enabled.
>>
>> GNU grep was purposely installed to run the reg-test script.
>> ---
>>  .cirrus.yml | 13 +
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/.cirrus.yml b/.cirrus.yml
>> index 9b83e6169..392a3abc5 100644
>> --- a/.cirrus.yml
>> +++ b/.cirrus.yml
>> @@ -11,3 +11,16 @@ FreeBSD_task:
>>  - ./haproxy -vv
>>  - ldd haproxy
>>  - env VTEST_PROGRAM=../vtest/vtest gmake reg-tests
>> REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do
>> cat $folder/INFO $folder/LOG; done && exit 1)
>> +
>> +alpine_task:
>> +  container:
>> +image: alpine:latest
>> +  only_if: $CIRRUS_BRANCH =~ 'master|next'
>> +  script:
>> +- apk add gcc make tar git python3 libc-dev linux-headers pcre-dev
>> pcre2-dev openssl-dev lua5.3-dev grep socat curl
>> +- git clone https://github.com/VTest/VTest.git ../vtest
>> +- make -C ../vtest FLAGS="-O2 -s -Wall"
>> +- make CC=cc V=1 TARGET=linux-musl 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
>> +- ./haproxy -vv
>> +- ldd haproxy
>> +- env VTEST_PROGRAM=../vtest/vtest make reg-tests
>> REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do
>> cat $folder/INFO $folder/LOG; done && exit 1)
>> --
>> 2.17.1
>>
>>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Илья Шипицин
I'm against expanding cirrus matrix. cirrus is overloaded already, I'm
afraid they will not stay for long time.
using custom images in github actions is straightforward, have a look

centos 6 · chipitsine/haproxy@20fabcd (github.com)



the same way you can specify either alpine or even special prepared image.
as I recall last time, we decided not to add alpine because "it is tested
anyway when docker images are created"

also, there's small caveat, github actions runs agent inside docker
container, it might have issues with older libc (or musl).
but it worth a try


пт, 11 июн. 2021 г. в 19:02, William Lallemand :

> This commit adds a CI job to cirrus-ci which builds HAProxy on Alpine
> Linux, allowing to build and test HAProxy with musl.
>
> OpenSSL, PCRE2, Lua 5.3 as well as the prometheus exporter are enabled.
>
> GNU grep was purposely installed to run the reg-test script.
> ---
>  .cirrus.yml | 13 +
>  1 file changed, 13 insertions(+)
>
> diff --git a/.cirrus.yml b/.cirrus.yml
> index 9b83e6169..392a3abc5 100644
> --- a/.cirrus.yml
> +++ b/.cirrus.yml
> @@ -11,3 +11,16 @@ FreeBSD_task:
>  - ./haproxy -vv
>  - ldd haproxy
>  - env VTEST_PROGRAM=../vtest/vtest gmake reg-tests
> REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do
> cat $folder/INFO $folder/LOG; done && exit 1)
> +
> +alpine_task:
> +  container:
> +image: alpine:latest
> +  only_if: $CIRRUS_BRANCH =~ 'master|next'
> +  script:
> +- apk add gcc make tar git python3 libc-dev linux-headers pcre-dev
> pcre2-dev openssl-dev lua5.3-dev grep socat curl
> +- git clone https://github.com/VTest/VTest.git ../vtest
> +- make -C ../vtest FLAGS="-O2 -s -Wall"
> +- make CC=cc V=1 TARGET=linux-musl 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
> +- ./haproxy -vv
> +- ldd haproxy
> +- env VTEST_PROGRAM=../vtest/vtest make reg-tests
> REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do
> cat $folder/INFO $folder/LOG; done && exit 1)
> --
> 2.17.1
>
>


Re: [PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread Tim Düsterhus

William,

On 6/11/21 4:01 PM, William Lallemand wrote:

This commit adds a CI job to cirrus-ci which builds HAProxy on Alpine
Linux, allowing to build and test HAProxy with musl.

OpenSSL, PCRE2, Lua 5.3 as well as the prometheus exporter are enabled.

GNU grep was purposely installed to run the reg-test script.


LGTM

Best regards
Tim Düsterhus



[PATCH] CI: cirrus: add alpine linux to the jobs

2021-06-11 Thread William Lallemand
This commit adds a CI job to cirrus-ci which builds HAProxy on Alpine
Linux, allowing to build and test HAProxy with musl.

OpenSSL, PCRE2, Lua 5.3 as well as the prometheus exporter are enabled.

GNU grep was purposely installed to run the reg-test script.
---
 .cirrus.yml | 13 +
 1 file changed, 13 insertions(+)

diff --git a/.cirrus.yml b/.cirrus.yml
index 9b83e6169..392a3abc5 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -11,3 +11,16 @@ FreeBSD_task:
 - ./haproxy -vv
 - ldd haproxy
 - env VTEST_PROGRAM=../vtest/vtest gmake reg-tests 
REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do cat 
$folder/INFO $folder/LOG; done && exit 1)
+
+alpine_task:
+  container:
+image: alpine:latest
+  only_if: $CIRRUS_BRANCH =~ 'master|next'
+  script:
+- apk add gcc make tar git python3 libc-dev linux-headers pcre-dev 
pcre2-dev openssl-dev lua5.3-dev grep socat curl
+- git clone https://github.com/VTest/VTest.git ../vtest
+- make -C ../vtest FLAGS="-O2 -s -Wall"
+- make CC=cc V=1 TARGET=linux-musl 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
+- ./haproxy -vv
+- ldd haproxy
+- env VTEST_PROGRAM=../vtest/vtest make reg-tests 
REGTESTS_TYPES=default,bug,devel || (for folder in /tmp/*regtest*/vtc.*; do cat 
$folder/INFO $folder/LOG; done && exit 1)
-- 
2.17.1