-
Notifications
You must be signed in to change notification settings - Fork 28
75 lines (71 loc) · 2.42 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Mainline
- nginx: 1.23.2
dynamic_module: true
- nginx: 1.23.2
dynamic_module: false
# Stable
- nginx: 1.22.1
dynamic_module: true
- nginx: 1.22.1
dynamic_module: false
# Past stable versions
- nginx: 1.20.2
dynamic_module: true
- nginx: 1.20.2
dynamic_module: false
- nginx: 1.18.0
dynamic_module: true
- nginx: 1.18.0
dynamic_module: false
- nginx: 1.16.1
dynamic_module: true
- nginx: 1.16.1
dynamic_module: false
- nginx: 1.14.2
dynamic_module: false
steps:
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
sudo apt install -y git wget gcc cmake
sudo apt install -y libpcre3-dev libssl-dev zlib1g-dev
- name: Build
env:
_NGINX_VERSION: ${{ matrix.nginx }}
SHIB_DYNAMIC_MODULE: ${{ matrix.dynamic_module }}
run: |
wget -O - "https://nginx.org/download/nginx-$_NGINX_VERSION.tar.gz" | tar -xzf -
cd "nginx-$_NGINX_VERSION"
git clone https://github.com/openresty/headers-more-nginx-module.git -b v0.34
if [ "$SHIB_DYNAMIC_MODULE" = true ]; then
./configure --with-debug --add-dynamic-module=.. --add-dynamic-module=./headers-more-nginx-module
else
./configure --with-debug --add-module=.. --add-module=./headers-more-nginx-module
fi
make
echo "$(pwd)/objs" >> $GITHUB_PATH
if [ "$SHIB_DYNAMIC_MODULE" = true ]; then
echo "SHIB_MODULE_PATH=$(pwd)/objs" >> $GITHUB_ENV
fi
- name: Test
env:
SHIB_DYNAMIC_MODULE: ${{ matrix.dynamic_module }}
SHIB_MODULE_PATH: ${{ env.SHIB_MODULE_PATH }}
run: |
sudo apt install -y cpanminus
cpanm --notest --local-lib=$HOME/perl5 Test::Nginx
PERL5LIB=$HOME/perl5/lib/perl5 TEST_NGINX_VERBOSE=true prove -v
- name: Output debugging info on failure
if: ${{ failure() }}
run: |
cat t/servroot/conf/nginx.conf
cat t/servroot/access.log
cat t/servroot/error.log