Skip to content

Commit

Permalink
Contrib folder auto builder (#129)
Browse files Browse the repository at this point in the history
* contrib folder auto builder

* handle cache

* cache test

* fix cibuild logic

* remove xml2 until sdk fixes libicu missing

* bump sdk for icu

* bump sdk ( icu )

* still sdk icu problem

* +ext: xml2 (pgxml)

* force install prefix xml2-config (host xml2 includes icu )

* more ext

* rebuild pg with ossp-uuid support

* sdk still does not provide ossp uid correctly
  • Loading branch information
pmp-p authored Aug 1, 2024
1 parent ed66a04 commit 971eee3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pglite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-22.04
env:
PGVERSION: 16.3
SDK_VERSION: 3.1.65.3bi
SDK_VERSION: 3.1.65.5bi
SDK_ARCHIVE: python3.12-wasm-sdk-Ubuntu-22.04.tar.lz4
SDKROOT: /opt/python-wasm-sdk
SYS_PYTHON: /usr/bin/python3
Expand Down
22 changes: 13 additions & 9 deletions cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ fi

# setup compiler+node. emsdk provides node (18), recent enough for bun.
# TODO: but may need to adjust $PATH with stock emsdk.

if ${WASI:-false}
then
echo "Wasi build (experimental)"
Expand Down Expand Up @@ -177,11 +178,13 @@ export PATH=${WORKSPACE}/build/postgres/bin:${PGROOT}/bin:$PATH

if echo " $*"|grep -q " contrib"
then

# TEMP FIX for SDK
SSL_INCDIR=$EMSDK/upstream/emscripten/cache/sysroot/include/openssl
[ -f $SSL_INCDIR/evp.h ] || ln -s $PREFIX/include/openssl $SSL_INCDIR
SKIP="\
[\
sslinfo bool_plperl hstore_plperl hstore_plpython jsonb_plperl jsonb_plpython\
ltree_plpython pgcrypto sepgsql bool_plperl start-scripts uuid-ossp xml2\
ltree_plpython sepgsql bool_plperl start-scripts uuid-ossp\
]"

for extdir in postgresql/contrib/*
Expand All @@ -198,27 +201,28 @@ then
Building contrib extension : $ext : begin
"
pushd build/postgres/contrib/$ext
if emmake make install
if PATH=$PREFIX/bin:$PATH emmake make install
then
popd
python3 cibuild/pack_extension.py

echo "
Building contrib extension : $ext : end
"
else
popd
echo "
Extension $ext from $extdir failed to build
"
exit 208
exit 216
fi
popd
python3 cibuild/pack_extension.py

fi
fi
done
fi



if echo " $*"|grep -q " vector"
then
echo "====================== vector : $(pwd) ================="
Expand Down
4 changes: 3 additions & 1 deletion cibuild/pgbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CC_PGLITE=$CC_PGLITE
fi


# TODO: fix sdk to support --with-uuid=ossp

CNF="${PGSRC}/configure --prefix=${PGROOT} \
--disable-spinlocks --disable-atomics \
--without-zlib --disable-largefile --without-llvm \
Expand Down Expand Up @@ -52,7 +54,7 @@ CC_PGLITE=$CC_PGLITE

# crash clang CFLAGS=-Wno-error=implicit-function-declaration

if CONFIG_SITE==${PGDATA}/config.site emconfigure $CNF --with-template=emscripten --cache-file=${PGROOT}/config.cache.emsdk
if EM_PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig CONFIG_SITE==${PGDATA}/config.site emconfigure $CNF --with-template=emscripten --cache-file=${PGROOT}/config.cache.emsdk
then
echo configure ok
else
Expand Down

0 comments on commit 971eee3

Please sign in to comment.