Skip to content

Commit 1ecc552

Browse files
committed
CI: using meson and pkg-config for QuickJS-NG.
1 parent 9b8797c commit 1ecc552

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/check-pr.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sudo apt-get install \
3030
libssl-dev zlib1g-dev libpcre2-dev libxslt1-dev libgeoip-dev \
3131
libgd-dev libxml2-dev libedit-dev libperl-dev libtest-harness-perl \
32-
libgd-perl libgeoip-dev expect
32+
libgd-perl libgeoip-dev expect meson ninja-build
3333
3434
- name: Install x86 build dependencies
3535
run: |
@@ -56,8 +56,10 @@ jobs:
5656
git clone https://github.com/quickjs-ng/quickjs quickjs-ng
5757
cd quickjs-ng
5858
git checkout v0.11.0
59-
CFLAGS="$CC_OPT -fPIC" LDFLAGS=$LD_OPT cmake -B build
60-
cmake --build build --target qjs -j $(nproc)
59+
CFLAGS="$CC_OPT -fPIC" LDFLAGS=$LD_OPT meson setup build --prefix=$HOME/.local --libdir=lib
60+
meson compile -C build
61+
meson install -C build
62+
echo "PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
6163
6264
- name: Configure and make njs
6365
run: |
@@ -103,8 +105,8 @@ jobs:
103105
run: |
104106
./configure \
105107
--with-quickjs \
106-
--cc-opt="$CC_OPT -Iquickjs-ng" \
107-
--ld-opt="$LD_OPT -Lquickjs-ng/build" \
108+
--cc-opt="$CC_OPT" \
109+
--ld-opt="$LD_OPT" \
108110
|| cat build/autoconf.err
109111
$MAKE_UTILITY -j$(nproc)
110112
@@ -214,7 +216,7 @@ jobs:
214216
- name: Configure and build nginx and njs modules with quickjs-ng, asan, static modules
215217
run: |
216218
cd nginx-source
217-
$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
219+
$NGINX_CONFIGURE_CMD --with-cc-opt="$CC_OPT -fsanitize=address -DNJS_DEBUG_MEMORY -DNGX_DEBUG_PALLOC -DNGX_DEBUG_MALLOC" --with-ld-opt="$LD_OPT -fsanitize=address" --add-module=../nginx || cat objs/autoconf.err
218220
$MAKE_UTILITY -j$(nproc)
219221
220222
- name: Test njs modules, quickjs-ng, static modules
@@ -242,7 +244,7 @@ jobs:
242244
- name: Configure and build nginx and njs modules with quickjs-ng, asan, dynamic modules
243245
run: |
244246
cd nginx-source
245-
$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
247+
$NGINX_CONFIGURE_CMD --with-debug --with-cc-opt="$CC_OPT -fsanitize=address -DNJS_DEBUG_MEMORY -DNGX_DEBUG_PALLOC -DNGX_DEBUG_MALLOC" --with-ld-opt="$LD_OPT -fsanitize=address" --add-dynamic-module=../nginx || cat objs/autoconf.err
246248
$MAKE_UTILITY -j$(nproc) modules
247249
$MAKE_UTILITY -j$(nproc)
248250

0 commit comments

Comments
 (0)