-
Notifications
You must be signed in to change notification settings - Fork 63
96 lines (85 loc) · 2.59 KB
/
nginx.yaml
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
name: NGINX
on:
push:
branches:
- master
pull_request:
env:
CARGO_TERM_COLOR: 'always'
RUST_BACKTRACE: '1'
NGX_CONFIGURE: |
auto/configure
--with-compat
--with-debug
--with-http_realip_module
--with-http_ssl_module
--with-http_v2_module
--with-http_v3_module
--with-stream
--with-stream_realip_module
--with-stream_ssl_module
--with-threads
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- static
- dynamic
nginx-ref:
# master
- stable-1.26
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: ${{ matrix.nginx-ref }}
repository: 'nginx/nginx'
path: 'nginx'
- uses: actions/checkout@v4
with:
repository: 'nginx/nginx-tests'
path: 'nginx/tests'
sparse-checkout: |
lib
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
nginx/objs/ngx_rust_examples
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Configure nginx with static modules
if: matrix.module == 'static'
working-directory: nginx
run: |
${NGX_CONFIGURE} \
--add-module=${{ github.workspace }}/examples
- name: Configure nginx with dynamic modules
if: matrix.module != 'static'
working-directory: nginx
env:
TEST_NGINX_GLOBALS: >-
load_module ${{ github.workspace }}/nginx/objs/ngx_http_awssigv4_module.so;
load_module ${{ github.workspace }}/nginx/objs/ngx_http_curl_module.so;
load_module ${{ github.workspace }}/nginx/objs/ngx_http_upstream_custom_module.so;
run: |
${NGX_CONFIGURE} \
--add-dynamic-module=${{ github.workspace }}/examples
echo "TEST_NGINX_GLOBALS=$TEST_NGINX_GLOBALS" >> $GITHUB_ENV
- name: Build nginx
working-directory: nginx
run: make -j$(nproc)
- name: Run tests
env:
TEST_NGINX_BINARY: ${{ github.workspace }}/nginx/objs/nginx
TEST_NGINX_MODULES: ${{ github.workspace }}/nginx/objs
run: |
prove -v -j$(nproc) -Inginx/tests/lib --state=save examples/t \
|| prove -v -Inginx/tests/lib --state=failed