42
42
--with-openssl=objs/lib/openssl
43
43
--with-openssl-opt="no-asm no-module no-tests -D_WIN32_WINNT=0x0601"
44
44
45
+ NGX_CONFIGURE_DYNAMIC_MODULES : >-
46
+ --add-dynamic-module=${{ github.workspace }}/examples
47
+ NGX_CONFIGURE_STATIC_MODULES : >-
48
+ --add-module=${{ github.workspace }}/examples
49
+
50
+ NGX_TEST_FILES : examples/t
51
+ NGX_TEST_GLOBALS_DYNAMIC : >-
52
+ load_module ${{ github.workspace }}/nginx/objs/ngx_http_async_module.so;
53
+ load_module ${{ github.workspace }}/nginx/objs/ngx_http_awssigv4_module.so;
54
+ load_module ${{ github.workspace }}/nginx/objs/ngx_http_curl_module.so;
55
+ load_module ${{ github.workspace }}/nginx/objs/ngx_http_upstream_custom_module.so;
56
+
45
57
OPENSSL_VERSION : ' 3.0.16'
46
58
PCRE2_VERSION : ' 10.45'
47
59
ZLIB_VERSION : ' 1.3.1'
86
98
~/.cargo/registry/index/
87
99
~/.cargo/registry/cache/
88
100
~/.cargo/git/db/
89
- nginx/objs/ngx_rust_examples
90
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
91
- restore-keys : ${{ runner.os }}-cargo-
101
+ nginx/objs/**/CACHEDIR.TAG
102
+ nginx/objs/**/ngx-debug
103
+ nginx/objs/**/ngx-release
104
+ key : ${{ runner.os }}-nginx-${{ hashFiles('**/Cargo.lock') }}
105
+ restore-keys : ${{ runner.os }}-nginx-
92
106
93
107
- name : Update configure arguments
94
108
if : matrix.nginx-ref != 'stable-1.24'
@@ -102,22 +116,16 @@ jobs:
102
116
run : |
103
117
${NGX_CONFIGURE_CMD} \
104
118
${NGX_CONFIGURE_UNIX} \
105
- --add-module=${{ github.workspace }}/examples
119
+ ${NGX_CONFIGURE_STATIC_MODULES}
106
120
107
121
- name : Configure nginx with dynamic modules
108
122
if : matrix.module != 'static'
109
123
working-directory : nginx
110
- env :
111
- TEST_NGINX_GLOBALS : >-
112
- load_module ${{ github.workspace }}/nginx/objs/ngx_http_async_module.so;
113
- load_module ${{ github.workspace }}/nginx/objs/ngx_http_awssigv4_module.so;
114
- load_module ${{ github.workspace }}/nginx/objs/ngx_http_curl_module.so;
115
- load_module ${{ github.workspace }}/nginx/objs/ngx_http_upstream_custom_module.so;
116
124
run : |
117
125
${NGX_CONFIGURE_CMD} \
118
126
${NGX_CONFIGURE_UNIX} \
119
- --add-dynamic-module=${{ github.workspace }}/examples
120
- echo " TEST_NGINX_GLOBALS=$TEST_NGINX_GLOBALS " >> $GITHUB_ENV
127
+ ${NGX_CONFIGURE_DYNAMIC_MODULES}
128
+ echo TEST_NGINX_GLOBALS="$NGX_TEST_GLOBALS_DYNAMIC " >> " $GITHUB_ENV"
121
129
122
130
- name : Build nginx
123
131
working-directory : nginx
@@ -130,7 +138,7 @@ jobs:
130
138
TEST_NGINX_MODULES : ${{ github.workspace }}/nginx/objs
131
139
TEST_NGINX_VERBOSE : 1
132
140
run : |
133
- prove -j$(nproc) --state=save examples/t || prove -v --state=failed
141
+ prove -j$(nproc) --state=save ${NGX_TEST_FILES} || prove -v --state=failed
134
142
135
143
windows :
136
144
runs-on : windows-2022
@@ -171,19 +179,21 @@ jobs:
171
179
~/.cargo/registry/index/
172
180
~/.cargo/registry/cache/
173
181
~/.cargo/git/db/
174
- nginx/objs/ngx_rust_examples
175
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
176
- restore-keys : ${{ runner.os }}-cargo-
182
+ nginx/objs/**/CACHEDIR.TAG
183
+ nginx/objs/**/ngx-debug
184
+ nginx/objs/**/ngx-release
185
+ key : ${{ runner.os }}-nginx-${{ hashFiles('**/Cargo.lock') }}
186
+ restore-keys : ${{ runner.os }}-nginx-
177
187
178
188
- name : Prepare build environment
179
189
shell : bash
180
190
working-directory : nginx
181
191
run : |
182
192
# Disable dynamic lookup of WSAPoll(); it crashes if the symbol is already imported by
183
- # Rust stdib .
193
+ # Rust stdlib .
184
194
sed 's/\(_WIN32_WINNT\s*\) 0x0501/\1 0x0601/' -i src/os/win32/ngx_win32_config.h
185
195
186
- echo " VCVARSALL=$('C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" \
196
+ echo VCVARSALL=" $('C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" \
187
197
>> "$GITHUB_ENV"
188
198
189
199
mkdir -p $TEMP
@@ -208,7 +218,7 @@ jobs:
208
218
bash.exe ^
209
219
%NGX_CONFIGURE_CMD% ^
210
220
%NGX_CONFIGURE_WINDOWS% ^
211
- --add-module=${{ github.workspace }}/examples
221
+ %NGX_CONFIGURE_STATIC_MODULES%
212
222
nmake -f objs/Makefile
213
223
214
224
- name : Run tests
@@ -218,4 +228,4 @@ jobs:
218
228
TEST_NGINX_BINARY : " ${{ github.workspace }}\\ nginx\\ objs\\ nginx.exe"
219
229
TEST_NGINX_VERBOSE : 1
220
230
run : |
221
- prove --state=save examples/t || prove -v --state=failed
231
+ prove --state=save %NGX_TEST_FILES% || prove -v --state=failed
0 commit comments