Skip to content

Commit d3f4131

Browse files
committed
Tests: Build njs with QuickJS support.
1 parent f633d36 commit d3f4131

File tree

1 file changed

+59
-4
lines changed

1 file changed

+59
-4
lines changed

.github/workflows/ci-functional-perl.yml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,63 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
build-njs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
repository: nginx/nginx
15+
ref: release-1.27.4
16+
path: nginx
17+
- uses: actions/checkout@v4
18+
with:
19+
repository: bellard/quickjs
20+
path: quickjs
21+
- uses: actions/checkout@v4
22+
with:
23+
repository: nginx/njs
24+
path: njs
25+
26+
- name: Install dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y build-essential \
30+
libpcre3-dev zlib1g-dev libssl-dev \
31+
libxml2-dev libxslt-dev
32+
33+
- name: Build QuickJS
34+
working-directory: quickjs
35+
run: |
36+
CFLAGS='-fPIC' make libquickjs.a
37+
38+
- name: Build NJS module
39+
working-directory: nginx
40+
run: |
41+
./auto/configure \
42+
--add-dynamic-module=../njs/nginx \
43+
--with-cc-opt="-I../quickjs" \
44+
--with-ld-opt="-L../quickjs" \
45+
--with-compat
46+
make -j$(nproc) modules
47+
48+
- name: Upload build artifacts
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: njs-build
52+
path: nginx/objs/ngx_http_js_module.so
53+
954
test-njs-saml:
1055
runs-on: ubuntu-latest
56+
needs: build-njs
1157
steps:
1258
- name: Checkout repository
13-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
1460

1561
- name: Install prerequisites
1662
run: |
1763
sudo apt-get update
1864
sudo apt-get install -y apt-transport-https lsb-release apt-utils ubuntu-keyring gnupg2 \
19-
ca-certificates wget mercurial
65+
ca-certificates wget
2066
2167
- name: Prepare keys and certificates
2268
run: |
@@ -58,9 +104,18 @@ jobs:
58104
run: |
59105
git clone https://github.com/nginx/nginx-tests.git
60106
107+
- name: Download build artifacts
108+
uses: actions/download-artifact@v4
109+
with:
110+
name: njs-build
111+
path: ${{ runner.temp }}
112+
61113
- name: Run tests
62114
working-directory: t
63115
run: |
64-
PERL5LIB=../nginx-tests/lib TEST_NGINX_BINARY=/usr/sbin/nginx TEST_NGINX_VERBOSE=1 \
65-
TEST_NGINX_GLOBALS="load_module /etc/nginx/modules/ngx_http_js_module-debug.so; mgmt {license_token $RUNNER_TEMP/lic;}" \
116+
PERL5LIB=../nginx-tests/lib \
117+
TEST_NGINX_BINARY=/usr/sbin/nginx \
118+
TEST_NGINX_VERBOSE=1 \
119+
TEST_NGINX_GLOBALS="load_module $RUNNER_TEMP/ngx_http_js_module.so; mgmt {license_token $RUNNER_TEMP/lic;}" \
120+
TEST_NGINX_GLOBALS_HTTP="js_engine njs;" \
66121
prove -v .

0 commit comments

Comments
 (0)