details: https://github.com/nginx/njs/commit/e257fba89a1627c121d9886aeabd3bc822371dda branches: master commit: e257fba89a1627c121d9886aeabd3bc822371dda user: Dmitry Volyntsev <xei...@nginx.com> date: Wed, 22 Jan 2025 18:03:55 -0800 description: CI: added test with QuickJS-NG in check-pr job.
--- .github/workflows/check-pr.yml | 81 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 0c7d7f3e..7cff7937 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -48,6 +48,14 @@ jobs: cd quickjs CFLAGS=$CC_OPT LDFLAGS=$LD_OPT $MAKE_UTILITY -j$(nproc) libquickjs.a + - name: Check out and build quickjs-ng + run: | + git clone https://github.com/quickjs-ng/quickjs quickjs-ng + cd quickjs-ng + git checkout v0.8.0 + CFLAGS="$CC_OPT -fPIC" LDFLAGS=$LD_OPT cmake -B build + cmake --build build --target qjs -j $(nproc) + - name: Configure and make njs run: | ./configure \ @@ -88,6 +96,20 @@ jobs: $MAKE_UTILITY test $MAKE_UTILITY clean + - name: Configure and make njs with quickjs-ng + run: | + ./configure \ + --with-quickjs \ + --cc-opt="$CC_OPT -Iquickjs-ng" \ + --ld-opt="$LD_OPT -Lquickjs-ng/build" \ + || cat build/autoconf.err + $MAKE_UTILITY -j$(nproc) + + - name: Test njs with quickjs-ng + run: | + $MAKE_UTILITY test + $MAKE_UTILITY clean + - name: Configure and build nginx and njs modules run: | cd nginx-source @@ -168,3 +190,62 @@ jobs: TEST_NGINX_VERBOSE: 1 ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0" LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" + + - name: Configure and build nginx and njs modules with quickjs-ng, asan, static modules + run: | + cd nginx-source + $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 + $MAKE_UTILITY -j$(nproc) + + - name: Test njs modules, quickjs-ng, static modules + run: | + ulimit -c unlimited + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed + env: + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" + TEST_NGINX_VERBOSE: 1 + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0" + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" + + - name: Test njs modules (js_engine qjs), quickjs-ng, static modules + run: | + ulimit -c unlimited + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed + env: + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" + TEST_NGINX_GLOBALS_HTTP: "js_engine qjs;" + TEST_NGINX_GLOBALS_STREAM: "js_engine qjs;" + TEST_NGINX_VERBOSE: 1 + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0" + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" + + - name: Configure and build nginx and njs modules with quickjs-ng, asan, dynamic modules + run: | + cd nginx-source + $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 + $MAKE_UTILITY -j$(nproc) modules + $MAKE_UTILITY -j$(nproc) + + - name: Test njs modules, quickjs-ng, dynamic modules + run: | + ulimit -c unlimited + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed + env: + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" + 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;" + TEST_NGINX_VERBOSE: 1 + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0" + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" + + - name: Test njs modules (js_engine qjs), quickjs-ng, dynamic modules + run: | + ulimit -c unlimited + prove -v -j$(nproc) -Inginx-tests/lib --state=save nginx/t . || prove -v -Inginx-tests/lib --state=failed + env: + TEST_NGINX_BINARY: "${{ github.workspace }}/nginx-source/objs/nginx" + 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;" + TEST_NGINX_GLOBALS_HTTP: "js_engine qjs;" + TEST_NGINX_GLOBALS_STREAM: "js_engine qjs;" + TEST_NGINX_VERBOSE: 1 + ASAN_OPTIONS: "detect_odr_violation=0:report_globals=0:fast_unwind_on_malloc=0" + LSAN_OPTIONS: "suppressions=${{ github.workspace }}/lsan_suppressions.txt" _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel