diff --git a/.buildconfig b/.buildconfig index d68cd709..a516eee3 100644 --- a/.buildconfig +++ b/.buildconfig @@ -1,4 +1,7 @@ -PG_VERSION=16.4 -SDK_VERSION=3.1.72.3bi -WASI_SDK_VERSION=24.0.4 +PG_VERSION=git +SDK_VERSION=3.1.74.2bi +WASI_SDK_VERSION=24.0.5 SDKROOT=/opt/python-wasm-sdk +PG_GIT_COMMIT=8e6af359aabdf0b687dfdb8e42b489fb7d27ce0a +COPTS="-Os -g0" + diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 25a4c0b9..ab5b3048 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -207,7 +207,7 @@ jobs: - name: Build demo site run: | - NO_SDK_CHECK=true SDKROOT=/opt/python-wasm-sdk bash ./cibuild.sh demo-site + bash ./cibuild/demo-site.sh - name: Build docs working-directory: ./docs diff --git a/.github/workflows/build_wasm_postgres.yml b/.github/workflows/build_wasm_postgres.yml index ee158819..c61e4b1a 100644 --- a/.github/workflows/build_wasm_postgres.yml +++ b/.github/workflows/build_wasm_postgres.yml @@ -19,13 +19,13 @@ jobs: SDKROOT: /opt/python-wasm-sdk SYS_PYTHON: /usr/bin/python3 PGROOT: /tmp/pglite - TOTAL_MEMORY: 128MB + TOTAL_MEMORY: 192MB CMA_MB: 16 - DEBUG: false OBJDUMP: true contrib: contrib extra: extra EXTRA_EXT: vector postgis + DEBUG: false steps: - uses: actions/checkout@v4 @@ -84,6 +84,11 @@ jobs: run: | bash ./cibuild.sh linkweb + - name: Build and Link postgres WASI for wasi/native + if: steps.cache-restore.outputs.cache-hit != 'true' + run: | + bash ./extra/native/wip.sh + - name: Copy release for PGlite build run: | bash ./cibuild.sh pglite-prep diff --git a/cibuild.sh b/cibuild.sh index aca25ef9..9dd27880 100755 --- a/cibuild.sh +++ b/cibuild.sh @@ -1,5 +1,8 @@ #!/bin/bash +#set -x; +#set -e; + # data transfer zone this is == (wire query size + result size ) + 2 # expressed in EMSDK MB export CMA_MB=${CMA_MB:-64} @@ -10,7 +13,7 @@ chmod +x ./extra/*.sh cibuild/*.sh . .buildconfig -export PG_VERSION SDK_VERSION WASI_SDK_VERSION SDKROOT +export PG_VERSION SDK_VERSION WASI_SDK_VERSION SDKROOT COPTS export PG_VERSION=${PG_VERSION:-16.4} export WORKSPACE=${GITHUB_WORKSPACE:-$(pwd)} @@ -30,10 +33,10 @@ EOE=false if ./cibuild/sdk.sh then - echo "sdk check passed (emscripten)" + echo "sdk check passed (emscripten+wasi)" else echo sdk failed - exit 44 + exit 39 fi @@ -231,9 +234,10 @@ END fi mkdir -p ${PGROOT}/include/postgresql/server - cp ${PG_DEBUG_HEADER} ${PGROOT}/include/ - cp ${PG_DEBUG_HEADER} ${PGROOT}/include/postgresql - cp ${PG_DEBUG_HEADER} ${PGROOT}/include/postgresql/server + for dest in ${PGROOT}/include ${PGROOT}/include/postgresql ${PGROOT}/include/postgresql/server + do + [ -f $dest/pg_debug.h ] || cp ${PG_DEBUG_HEADER} $dest/ + done # store all pg options that have impact on cmd line initdb/boot cat > ${PGROOT}/pgopts.sh <