Cloudflare Pages / Build and verify the site (push) Successful in 3m29s
Use the verified dependency lock across native hosts and bundled apps. Preserve saved styles, local app reactivation, and offline packages while integrating the latest practice, Habits, Lumi, and figure preview updates.
34 lines
1.4 KiB
Bash
34 lines
1.4 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
ziran=${1:-"$root/build/packages/ziran/build/bin/ziran"}
|
|
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
|
|
work=$(mktemp -d /tmp/inbe-storage-delegate-build.XXXXXX)
|
|
trap 'rm -rf "$work"' EXIT HUP INT TERM
|
|
mkdir -p "$work/generated"
|
|
cd "$root"
|
|
"$ziran" build --project --offline ${PACKAGE_FLAGS:-} --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
|
|
--entry storage_delegate_behavior:Check \
|
|
-o "$work/generated" "$root/tests/storage_delegate_behavior.zi" \
|
|
"$root/tests/sync_test_host.zi"
|
|
cat > "$work/generated/main.c" <<'C'
|
|
#include "storage_delegate_behavior.h"
|
|
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
int result = Check();
|
|
if (result != 0) fprintf(stderr, "delegate storage check failed: %d\n", result);
|
|
return result == 0 ? 0 : 1;
|
|
}
|
|
C
|
|
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
|
|
-I"$root/build/packages/ziran/include" -I"$work/generated" \
|
|
-I"$root/vendor-builds/sqlite" \
|
|
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
|
|
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" \
|
|
"$root/build/packages/monocypher/src/monocypher.c" "$liboqs" \
|
|
-Wl,--gc-sections -ldl -lpthread -lz -lm -o "$work/test"
|
|
APP_DATA_ROOT=/tmp/inbe-storage-delegate-zi-test/data \
|
|
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
|
|
YUE_DESKTOP_RECOVERY=0 "$work/test"
|