|
48 | 48 | cd quickjs
|
49 | 49 | CFLAGS=$CC_OPT LDFLAGS=$LD_OPT $MAKE_UTILITY -j$(nproc) libquickjs.a
|
50 | 50 |
|
| 51 | + - name: Check out and build quickjs-ng |
| 52 | + run: | |
| 53 | + git clone https://github.com/quickjs-ng/quickjs quickjs-ng |
| 54 | + cd quickjs-ng |
| 55 | + git checkout v0.8.0 |
| 56 | + CFLAGS="$CC_OPT -fPIC" LDFLAGS=$LD_OPT cmake -B build |
| 57 | + cmake --build build --target qjs -j $(nproc) |
| 58 | +
|
51 | 59 | - name: Configure and make njs
|
52 | 60 | run: |
|
53 | 61 | ./configure \
|
|
88 | 96 | $MAKE_UTILITY test
|
89 | 97 | $MAKE_UTILITY clean
|
90 | 98 |
|
| 99 | + - name: Configure and make njs with quickjs-ng |
| 100 | + run: | |
| 101 | + ./configure \ |
| 102 | + --with-quickjs \ |
| 103 | + --cc-opt="$CC_OPT -Iquickjs-ng" \ |
| 104 | + --ld-opt="$LD_OPT -Lquickjs-ng/build" \ |
| 105 | + || cat build/autoconf.err |
| 106 | + $MAKE_UTILITY -j$(nproc) |
| 107 | +
|
| 108 | + - name: Test njs with quickjs-ng |
| 109 | + run: | |
| 110 | + $MAKE_UTILITY test |
| 111 | + $MAKE_UTILITY clean |
| 112 | +
|
91 | 113 | - name: Configure and build nginx and njs modules
|
92 | 114 | run: |
|
93 | 115 | cd nginx-source
|
@@ -168,3 +190,62 @@ jobs:
|
168 | 190 | TEST_NGINX_VERBOSE: 1
|
169 | 191 | ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0"
|
170 | 192 | LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt"
|
| 193 | + |
| 194 | + - name: Configure and build nginx and njs modules with quickjs-ng, asan, static modules |
| 195 | + run: | |
| 196 | + cd nginx-source |
| 197 | + $NGINX_CONFIGURE_CMD --with-cc-opt="$CC_OPT -I${{ github.workspace }}/quickjs-ng -fsanitize=address -DNJS_DEBUG_MEMORY -DNGX_DEBUG_PALLOC -DNGX_DEBUG_MALLOC" --with-ld-opt="$LD_OPT -L${{ github.workspace }}/quickjs-ng/build -fsanitize=address" --add-module=../nginx || cat objs/autoconf.err |
| 198 | + $MAKE_UTILITY -j$(nproc) |
| 199 | +
|
| 200 | + - name: Test njs modules, quickjs-ng, static modules |
| 201 | + run: | |
| 202 | + ulimit -c unlimited |
| 203 | + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed |
| 204 | + env: |
| 205 | + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" |
| 206 | + TEST_NGINX_VERBOSE: 1 |
| 207 | + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0" |
| 208 | + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" |
| 209 | + |
| 210 | + - name: Test njs modules (js_engine qjs), quickjs-ng, static modules |
| 211 | + run: | |
| 212 | + ulimit -c unlimited |
| 213 | + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed |
| 214 | + env: |
| 215 | + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" |
| 216 | + TEST_NGINX_GLOBALS_HTTP: "js_engine qjs;" |
| 217 | + TEST_NGINX_GLOBALS_STREAM: "js_engine qjs;" |
| 218 | + TEST_NGINX_VERBOSE: 1 |
| 219 | + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0" |
| 220 | + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" |
| 221 | + |
| 222 | + - name: Configure and build nginx and njs modules with quickjs-ng, asan, dynamic modules |
| 223 | + run: | |
| 224 | + cd nginx-source |
| 225 | + $NGINX_CONFIGURE_CMD --with-debug --with-cc-opt="$CC_OPT -I${{ github.workspace }}/quickjs-ng -fsanitize=address -DNJS_DEBUG_MEMORY -DNGX_DEBUG_PALLOC -DNGX_DEBUG_MALLOC" --with-ld-opt="$LD_OPT -L${{ github.workspace }}/quickjs-ng/build -fsanitize=address" --add-dynamic-module=../nginx || cat objs/autoconf.err |
| 226 | + $MAKE_UTILITY -j$(nproc) modules |
| 227 | + $MAKE_UTILITY -j$(nproc) |
| 228 | +
|
| 229 | + - name: Test njs modules, quickjs-ng, dynamic modules |
| 230 | + run: | |
| 231 | + ulimit -c unlimited |
| 232 | + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed |
| 233 | + env: |
| 234 | + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" |
| 235 | + TEST_NGINX_GLOBALS: "load_module ${{ github.workspace }}/nginx-source/objs/ngx_stream_js_module.so; load_module ${{ github.workspace }}/nginx-source/objs/ngx_http_js_module.so;" |
| 236 | + TEST_NGINX_VERBOSE: 1 |
| 237 | + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0" |
| 238 | + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" |
| 239 | + |
| 240 | + - name: Test njs modules (js_engine qjs), quickjs-ng, dynamic modules |
| 241 | + run: | |
| 242 | + ulimit -c unlimited |
| 243 | + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed |
| 244 | + env: |
| 245 | + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" |
| 246 | + TEST_NGINX_GLOBALS: "load_module ${{ github.workspace }}/nginx-source/objs/ngx_stream_js_module.so; load_module ${{ github.workspace }}/nginx-source/objs/ngx_http_js_module.so;" |
| 247 | + TEST_NGINX_GLOBALS_HTTP: "js_engine qjs;" |
| 248 | + TEST_NGINX_GLOBALS_STREAM: "js_engine qjs;" |
| 249 | + TEST_NGINX_VERBOSE: 1 |
| 250 | + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0" |
| 251 | + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" |
0 commit comments