From 8122fc394e05507c514425b1f96637668dcefe65 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Mon, 15 Apr 2024 09:28:32 +0800 Subject: CI: (OpenBSD) Detect latest Autoconf & Automake versions Signed-off-by: Kang-Che Sung --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 923e841d..1b20581d 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -279,12 +279,24 @@ jobs: release: '7.4' usesh: true prepare: | - pkg_add gmake autoconf-2.71 automake-1.16.5 git + pkg_add gmake git git config --global --add safe.directory /home/runner/work/htop/htop run: | set -e - export AUTOCONF_VERSION=2.71 - export AUTOMAKE_VERSION=1.16 + autoconf_version_full=$(pkg_info -Q autoconf | + LC_ALL=C sed 's/^autoconf-\([0-9]*\.[0-9]*\)\(p[.0-9]*\)\{0,1\}$/\1\2/p; d' | + LC_ALL=C sort -n -r -t . -k 1,1 -k 2,2 | + sed '1 q') + automake_version_full=$(pkg_info -Q automake | + LC_ALL=C sed 's/^automake-\([0-9]*\.[0-9]*\)\(\.[0-9]*\)\{0,1\}\(p[0-9]*\)\{0,1\}$/\1\2\3/p; d' | + LC_ALL=C sort -n -r -t . -k 1,1 -k 2,2 -k 3,3 | + sed '1 q') + pkg_add -v autoconf-${autoconf_version_full} automake-${automake_version_full} + export AUTOCONF_VERSION=$(echo ${autoconf_version_full} | + LC_ALL=C sed 's/^\([0-9]*\.[0-9]*\).*$/\1/') + # Must not include the third version field in $AUTOMAKE_VERSION + export AUTOMAKE_VERSION=$(echo ${automake_version_full} | + LC_ALL=C sed 's/^\([0-9]*\.[0-9]*\).*$/\1/') ./autogen.sh ./configure --enable-unicode --enable-werror gmake -k -- cgit v1.2.3