-
Notifications
You must be signed in to change notification settings - Fork 1
170 lines (143 loc) · 4.54 KB
/
test-compat.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: compatibility tests
on:
push:
branches:
- main
paths-ignore:
- '*.md'
pull_request:
branches:
- '*'
paths-ignore:
- '*.md'
defaults:
run:
shell: bash
jobs:
compat:
name: resty-cli compat ${{ matrix.resty-cli }} / ${{ matrix.openresty }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- openresty: 1.19.9.1
resty-cli: v0.28
openssl: 1.1.1n
openresty-opts: >
--with-compat
--with-pcre-jit
--with-stream
--with-threads
--with-http_ssl_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
- openresty: 1.21.4.3
resty-cli: v0.29
openssl: 1.1.1n
openresty-opts: >
--with-compat
--with-pcre-jit
--with-stream
--with-threads
--with-http_ssl_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
- openresty: 1.25.3.2
resty-cli: v0.30
openssl: 1.1.1n
openresty-opts: >
--with-compat
--with-pcre-jit
--with-stream
--with-threads
--with-http_ssl_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
steps:
- name: install gdb
run: |
sudo apt-get update -y
sudo apt-get install -y gdb
gdb --version
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
build: true
- name: set resty-cli compat env var
run: echo "RESTY_CLI_COMPAT_VERSION=${{ matrix.resty-cli }}" >> $GITHUB_ENV
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: sanity
run: ./target/debug/rusty-cli --help
- name: set OpenResty prefix
run: |
echo OPENRESTY_PREFIX=${GITHUB_WORKSPACE}/openresty/${{ matrix.openresty }} >> $GITHUB_ENV
echo PERL5LIB=${GITHUB_WORKSPACE}/work/lib/cpanm/lib/perl5 >> $GITHUB_ENV
- name: Store OpenResty build opts
run: |
echo '${{ matrix.openresty-opts }}' > .resty-opts
- name: cache OpenResty
uses: actions/cache@v4
id: cache-openresty
with:
path: |
${{ env.OPENRESTY_PREFIX }}
work/
key: v2::${{ runner.os }}-openresty-${{ matrix.openresty }}-${{ hashFiles('.resty-opts') }}
- name: setup OpenResty
if: ${{ steps.cache-openresty.outputs.cache-hit != 'true' }}
id: setup-openresty
uses: thibaultcha/setup-openresty@main
with:
version: ${{ matrix.openresty }}
openssl-version: ${{ matrix.openssl }}
test-nginx: true
debug: true
opt: ${{ matrix.openresty-opts }}
- name: Cleanup OpenResty build artifacts
if: ${{ steps.cache-openresty.outputs.cache-hit != 'true' }}
run: |
rm -rf \
./work/OpenResty \
./work/OpenSSL/test \
./work/OpenSSL/doc \
./work/OpenSSL/test \
./work/OpenSSL/demos \
./work/OpenSSL/fuzz \
./work/downloads \
|| true
- name: add OpenResty bin dirs to PATH
run: |
echo ${OPENRESTY_PREFIX}/bin >> $GITHUB_PATH
echo ${OPENRESTY_PREFIX}/luajit/bin >> $GITHUB_PATH
echo ${OPENRESTY_PREFIX}/nginx/sbin >> $GITHUB_PATH
- name: checkout resty-cli repo
uses: actions/checkout@v4
with:
repository: openresty/resty-cli
ref: ${{ matrix.resty-cli }}
path: resty-cli
- name: copy & patch files
run: ./tests/setup-resty-cli.sh
- name: sanity 2
run: |
./target/debug/rusty-cli --help
./target/debug/rusty-cli \
--gdb-opts="--nx -batch -ex 'b main' -ex run -ex bt -ex 'b lj_cf_io_method_write' -ex c -ex bt" \
-e 'io.stderr:write("hello world!~~\n")'
- name: nginx info
run: nginx -V
- name: prove
run: prove -r t/
- name: runner opts
run: ./tests/runners.sh
- name: nginx.conf generation
run: ./tests/conf-generation.sh
- name: lua script argv translation
run: ./tests/lua-arg.sh
- name: signal-handling
run: ./tests/sigwinch.sh
- name: nginx binary location
run: ./tests/nginx-bin-search.sh