I am attaching another patch, i.e. using "ubuntu-latest" and "macos-latest"
for development branches and fixed images for stable branches.

пн, 12 дек. 2022 г. в 19:57, William Lallemand <[email protected]>:

> On Mon, Dec 12, 2022 at 07:27:59PM +0500, Илья Шипицин wrote:
> > I attached a patch.
> >
>
> Thanks!
>
> > btw, we only build for the latest LibreSSL. are we ok to skip LibreSSL
> for
> > stable branches ?
> >
>
> In <= 2.5 we are still building with 3.5.3,
>
> http://git.haproxy.org/?p=haproxy-2.5.git;a=blob;f=.github/matrix.py;hb=HEAD#l132
>
> Ideally it would be better to still build libreSSL in stable.
>
> In my opinion there should be at least one version + the latest for this
> method to work, but if the latest is equal to an already built version
> that doesn't make sens to build it again.
>
> --
> William Lallemand
>
From 2d2679d3b18cd0d2c6e9f21cf38e9f15d1ba5cec Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Wed, 14 Dec 2022 18:18:20 +0500
Subject: [PATCH 1/2] CI: github: remove redundant ASAN loop

it was there because we only ran ASAN for clang, now no need to separate loop
---
 .github/matrix.py | 67 ++++++++++++++++++++++-------------------------
 1 file changed, 32 insertions(+), 35 deletions(-)

diff --git a/.github/matrix.py b/.github/matrix.py
index fd9491aee..93ecd3c80 100755
--- a/.github/matrix.py
+++ b/.github/matrix.py
@@ -112,6 +112,38 @@ for CC in ["gcc", "clang"]:
         }
     )
 
+# ASAN
+
+    matrix.append(
+        {
+            "name": "{}, {}, ASAN, all features".format(clean_os(os), CC),
+            "os": os,
+            "TARGET": TARGET,
+            "CC": CC,
+            "FLAGS": get_asan_flags(CC)
+            + [
+                "USE_ZLIB=1",
+                "USE_OT=1",
+                "OT_INC=${HOME}/opt-ot/include",
+                "OT_LIB=${HOME}/opt-ot/lib",
+                "OT_RUNPATH=1",
+                "USE_PCRE=1",
+                "USE_PCRE_JIT=1",
+                "USE_LUA=1",
+                "USE_OPENSSL=1",
+                "USE_SYSTEMD=1",
+                "USE_WURFL=1",
+                "WURFL_INC=addons/wurfl/dummy",
+                "WURFL_LIB=addons/wurfl/dummy",
+                "USE_DEVICEATLAS=1",
+                "DEVICEATLAS_SRC=addons/deviceatlas/dummy",
+                "USE_PROMEX=1",
+                "USE_51DEGREES=1",
+                "51DEGREES_SRC=addons/51degrees/dummy/pattern",
+            ],
+        }
+    )
+
     for compression in ["USE_ZLIB=1"]:
         matrix.append(
             {
@@ -154,41 +186,6 @@ for CC in ["gcc", "clang"]:
             }
         )
 
-# ASAN
-
-os = "ubuntu-latest"
-TARGET = "linux-glibc"
-for CC in ["gcc","clang"]:
-    matrix.append(
-        {
-            "name": "{}, {}, ASAN, all features".format(clean_os(os), CC),
-            "os": os,
-            "TARGET": TARGET,
-            "CC": CC,
-            "FLAGS": get_asan_flags(CC)
-            + [
-                "USE_ZLIB=1",
-                "USE_OT=1",
-                "OT_INC=${HOME}/opt-ot/include",
-                "OT_LIB=${HOME}/opt-ot/lib",
-                "OT_RUNPATH=1",
-                "USE_PCRE=1",
-                "USE_PCRE_JIT=1",
-                "USE_LUA=1",
-                "USE_OPENSSL=1",
-                "USE_SYSTEMD=1",
-                "USE_WURFL=1",
-                "WURFL_INC=addons/wurfl/dummy",
-                "WURFL_LIB=addons/wurfl/dummy",
-                "USE_DEVICEATLAS=1",
-                "DEVICEATLAS_SRC=addons/deviceatlas/dummy",
-                "USE_PROMEX=1",
-                "USE_51DEGREES=1",
-                "51DEGREES_SRC=addons/51degrees/dummy/pattern",
-            ],
-        }
-    )
-
 # macOS
 
 os = "macos-latest"
-- 
2.38.1

From e45cc5e13cc8559695d02ca7de7c93e85456e925 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Wed, 14 Dec 2022 18:23:24 +0500
Subject: [PATCH 2/2] CI: github: split matrix for development and stable
 branches

ML ref: https://www.mail-archive.com/[email protected]/msg42934.html

we agreed to use "latest" images for development branches and fixed
images for stable branches
---
 .github/matrix.py | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/.github/matrix.py b/.github/matrix.py
index 93ecd3c80..ffc3414b9 100755
--- a/.github/matrix.py
+++ b/.github/matrix.py
@@ -22,15 +22,6 @@ else:
 
 print("Generating matrix for type '{}'.".format(ref_name))
 
-
-def clean_os(os):
-    if os == "ubuntu-latest":
-        return "Ubuntu"
-    elif os == "macos-latest":
-        return "macOS"
-    return os.replace("-latest", "")
-
-
 def clean_ssl(ssl):
     return ssl.replace("_VERSION", "").lower()
 
@@ -70,12 +61,12 @@ matrix = []
 
 # Ubuntu
 
-os = "ubuntu-latest"
+os = "ubuntu-latest" if "haproxy-" not in ref_name else "ubuntu-22.04"
 TARGET = "linux-glibc"
 for CC in ["gcc", "clang"]:
     matrix.append(
         {
-            "name": "{}, {}, no features".format(clean_os(os), CC),
+            "name": "{}, {}, no features".format(os, CC),
             "os": os,
             "TARGET": TARGET,
             "CC": CC,
@@ -85,7 +76,7 @@ for CC in ["gcc", "clang"]:
 
     matrix.append(
         {
-            "name": "{}, {}, all features".format(clean_os(os), CC),
+            "name": "{}, {}, all features".format(os, CC),
             "os": os,
             "TARGET": TARGET,
             "CC": CC,
@@ -116,7 +107,7 @@ for CC in ["gcc", "clang"]:
 
     matrix.append(
         {
-            "name": "{}, {}, ASAN, all features".format(clean_os(os), CC),
+            "name": "{}, {}, ASAN, all features".format(os, CC),
             "os": os,
             "TARGET": TARGET,
             "CC": CC,
@@ -148,7 +139,7 @@ for CC in ["gcc", "clang"]:
         matrix.append(
             {
                 "name": "{}, {}, gz={}".format(
-                    clean_os(os), CC, clean_compression(compression)
+                    os, CC, clean_compression(compression)
                 ),
                 "os": os,
                 "TARGET": TARGET,
@@ -177,7 +168,7 @@ for CC in ["gcc", "clang"]:
 
         matrix.append(
             {
-                "name": "{}, {}, ssl={}".format(clean_os(os), CC, clean_ssl(ssl)),
+                "name": "{}, {}, ssl={}".format(os, CC, clean_ssl(ssl)),
                 "os": os,
                 "TARGET": TARGET,
                 "CC": CC,
@@ -188,12 +179,12 @@ for CC in ["gcc", "clang"]:
 
 # macOS
 
-os = "macos-latest"
+os = "macos-latest" if "haproxy-" not in ref_name else "macos-12"
 TARGET = "osx"
 for CC in ["clang"]:
     matrix.append(
         {
-            "name": "{}, {}, no features".format(clean_os(os), CC),
+            "name": "{}, {}, no features".format(os, CC),
             "os": os,
             "TARGET": TARGET,
             "CC": CC,
-- 
2.38.1

Reply via email to