Skip to content

Commit

Permalink
CI: added test with QuickJS-NG in check-pr job.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeioex committed Jan 23, 2025
1 parent f9a5add commit 4e0db2a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ 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 LDFLAGS=$LD_OPT $MAKE_UTILITY -j$(nproc) build/qjs
- name: Configure and make njs
run: |
./configure \
Expand Down Expand Up @@ -88,6 +95,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
Expand Down Expand Up @@ -168,3 +189,21 @@ 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/debug -fsanitize=address" --add-module=../nginx || cat objs/autoconf.err
$MAKE_UTILITY -j$(nproc)
- name: Test njs modules (js_engine qjs), 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"

0 comments on commit 4e0db2a

Please sign in to comment.