Skip to content

Commit bde2985

Browse files
committed
action archs: dynamic nginx version numbers; use ubuntu_latest
Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 0770af0 commit bde2985

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

.github/workflows/archs.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ on:
99
jobs:
1010
build:
1111

12-
runs-on: ubuntu-latest
13-
name: ${{ matrix.arch }}-nginx-${{ matrix.nginx_version }}
12+
runs-on: ubuntu-22.04
13+
name: ${{ matrix.arch }}
1414

1515
strategy:
16+
fail-fast: false
1617
matrix:
1718
include:
18-
# passing literal NULL as a function input paramter does not seem to work on armv7; need compile flag??
19+
# - arch: armv6
20+
# distro: bookworm
21+
# # alpine_latest
1922
# - arch: armv7
2023
# distro: ubuntu_latest
21-
# nginx_version: 1.24.0
2224
- arch: aarch64
2325
distro: ubuntu_latest
24-
nginx_version: 1.24.0
25-
- arch: ppc64le
26+
- arch: riscv64
2627
distro: ubuntu_latest
27-
nginx_version: 1.24.0
2828
- arch: s390x
2929
distro: ubuntu_latest
30-
nginx_version: 1.24.0
30+
- arch: ppc64le
31+
distro: ubuntu_latest
3132

3233
steps:
3334
- uses: actions/checkout@v4
@@ -43,10 +44,25 @@ jobs:
4344
apt-get install -y libjansson-dev libcurl4-openssl-dev libhiredis-dev libmemcached-dev redis-server memcached libpcre2-dev libpcre2-8-0 libjq-dev
4445
apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libxml2 libxml2-dev uuid-dev
4546
cd /tmp
46-
wget --no-check-certificate https://nginx.org/download/nginx-${{ matrix.nginx_version }}.tar.gz
47-
tar zxvf nginx-${{ matrix.nginx_version }}.tar.gz
48-
ln -s nginx-${{ matrix.nginx_version }} nginx
49-
cd /tmp/nginx && ./configure --with-debug
47+
apt-get install -y nginx
48+
49+
nginx -V 2>&1 | grep -m1 version | cut -d: -f2 | cut -d/ -f2 | cut -d" " -f1 > /tmp/nginx-version
50+
nginx -V 2>&1 | grep configure | cut -d: -f2- > /tmp/nginx-args
51+
apt-get remove -y nginx && apt-get autoremove -y
52+
sed -i s/--add-dynamic-module=[^[:space:]]*//g /tmp/nginx-args
53+
sed -i s/--with-http_xslt_module=[^[:space:]]*//g /tmp/nginx-args
54+
sed -i s/--with-http_geoip_module=[^[:space:]]*//g /tmp/nginx-args
55+
sed -i s/--with-stream_geoip_module=[^[:space:]]*//g /tmp/nginx-args
56+
sed -i s/--with-http_image_filter_module=[^[:space:]]*//g /tmp/nginx-args
57+
58+
wget --progress=bar:force:noscroll --no-check-certificate https://nginx.org/download/nginx-$(cat /tmp/nginx-version).tar.gz
59+
tar zxf nginx-$(cat /tmp/nginx-version).tar.gz
60+
cd nginx-$(cat /tmp/nginx-version)
61+
echo "Configuring NGINX-$(cat /tmp/nginx-version): ./configure $(cat /tmp/nginx-args)"
62+
cat /tmp/nginx-args | xargs ./configure
63+
cd ..
64+
ln -s nginx-$(cat /tmp/nginx-version) nginx
65+
5066
run: |
5167
./autogen.sh
5268
./configure --with-nginx=/tmp/nginx --with-jq=/usr

0 commit comments

Comments
 (0)