summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorIlya Shipitsin <chipitsine@gmail.com>2022-05-20 23:02:38 +0500
committerWilly Tarreau <w@1wt.eu>2022-05-20 23:26:48 +0200
commit7b893c2c6b68be5cd133c4cf39e61d89f341d810 (patch)
treee940f56c9f2d326e2f9b03501b6d21ed69971bce /.github
parent842e4a6617984e094d9aea565b0b78deab40bcfc (diff)
downloadhaproxy-7b893c2c6b68be5cd133c4cf39e61d89f341d810.tar.gz
CI: determine actual OpenSSL version dynamically
this change introduce "OPENSSL_VERSION=latest" semantic, which scans https://api.github.com/repos/openssl/openssl/tags and detects latest release.
Diffstat (limited to '.github')
-rwxr-xr-x.github/matrix.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/.github/matrix.py b/.github/matrix.py
index 5f7ea3c41..27f25ff7a 100755
--- a/.github/matrix.py
+++ b/.github/matrix.py
@@ -33,6 +33,17 @@ def clean_os(os):
def clean_ssl(ssl):
return ssl.replace("_VERSION", "").lower()
+def determine_latest_openssl(ssl):
+ openssl_tags = urllib.request.urlopen("https://api.github.com/repos/openssl/openssl/tags")
+ tags = json.loads(openssl_tags.read().decode('utf-8'))
+ latest_tag = ''
+ for tag in tags:
+ name = tag['name']
+ if "openssl-" in name:
+ if name > latest_tag:
+ latest_tag = name
+ return "OPENSSL={}".format(latest_tag[8:])
+
def determine_latest_libressl(ssl):
libressl_download_list = urllib.request.urlopen("http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/")
for line in libressl_download_list.readlines():
@@ -119,7 +130,7 @@ for CC in ["gcc", "clang"]:
for ssl in [
"stock",
"OPENSSL_VERSION=1.0.2u",
- "OPENSSL_VERSION=3.0.2",
+ "OPENSSL_VERSION=latest",
"LIBRESSL_VERSION=latest",
"QUICTLS=yes",
# "BORINGSSL=yes",
@@ -132,6 +143,9 @@ for CC in ["gcc", "clang"]:
flags.append("SSL_INC=${HOME}/opt/include")
if "LIBRESSL" in ssl and "latest" in ssl:
ssl = determine_latest_libressl(ssl)
+ if "OPENSSL" in ssl and "latest" in ssl:
+ ssl = determine_latest_openssl(ssl)
+
matrix.append(
{
"name": "{}, {}, ssl={}".format(clean_os(os), CC, clean_ssl(ssl)),