Skip to content

Commit

Permalink
test build against upstreaming 16x repo
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Dec 9, 2024
1 parent d214b3f commit 562e6fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .buildconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PG_VERSION=16.4
PG_VERSION=git
SDK_VERSION=3.1.72.3bi
WASI_SDK_VERSION=24.0.5
SDKROOT=/opt/python-wasm-sdk
43 changes: 9 additions & 34 deletions cibuild/pg-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ if [ -f postgresql/postgresql-${PG_VERSION}.patched ]
then
echo version already selected and patch stage already done
else
git clone --no-tags --depth 1 --single-branch --branch master https://github.com/postgres/postgres postgresql-${PG_VERSION}
git clone --no-tags --depth 1 --single-branch --branch REL_16_STABLE https://github.com/electric-sql/postgres-pglite postgresql-${PG_VERSION}

if pushd postgresql-${PG_VERSION}
then
echo
> ./src/template/emscripten
> ./src/template/wasi
> ./src/include/port/wasi.h
> ./src/makefiles/Makefile.wasi
> ./src/include/port/emscripten.h
> ./src/makefiles/Makefile.emscripten
for patchdir in \
postgresql-debug postgresql-wasi \
postgresql-wasm postgresql-wasm-${PG_VERSION} \
postgresql-pglite postgresql-pglite-${PG_VERSION}
postgresql-debug \
postgresql-emscripten \
postgresql-pglite \
do
if [ -d ../patches/$patchdir ]
then
cat ../patches/$patchdir/*.diff | patch -p1 || exit 24
cat ../patches/$patchdir/*.diff | patch -p1 || exit 20
fi
done
touch postgresql-${PG_VERSION}.patched
Expand All @@ -41,32 +40,8 @@ then
else
if $WASI
then

CNF="${PGSRC}/configure --prefix=${PGROOT} \
--disable-spinlocks --disable-atomics \
--without-zlib --disable-largefile --without-llvm \
--without-pam --disable-largefile --without-zlib --with-openssl=no \
--without-readline --without-icu \
${PGDEBUG}"

# --cache-file=${PGROOT}/config.cache.wasi
if \
ZIC=/usr/sbin/zic \
CC=wasi-c \
CXX=wasi-c++ \
CONFIG_SITE=${PGDATA}/config.site \
$CNF \
--host=$(arch) --target=wasm32-unknown-wasi --with-template=wasi
then
echo configure ok
make -j 1
else
echo configure failed
exit 57
fi

read

#
echo "see pglite-build CI"
else
echo "Building $ARCHIVE (patched) from $PGSRC"
. cibuild/pgbuild.sh
Expand Down

0 comments on commit 562e6fd

Please sign in to comment.