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.6 KiB
Bash
34 lines
1.6 KiB
Bash
#!/bin/sh
|
|
set -eu
|
|
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
compiler=${1:-"$root/build/packages/ziran/build/bin/ziran"}
|
|
liboqs=${2:-"$root/vendor-builds/linux/x86_64/inbe-liboqs/lib/liboqs.a"}
|
|
work="$root/build/lumi-updates-test"
|
|
mkdir -p "$work"
|
|
exec 9>"$work.lock"
|
|
flock 9
|
|
unset DISPLAY WAYLAND_DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
|
|
export YUE_DESKTOP_RECOVERY=0
|
|
mkdir -p "$work/generated"
|
|
"$compiler" build --project ${PACKAGE_FLAGS:---offline} --target=c --define PLATFORM_DESKTOP --root "$root/tests" \
|
|
--entry lumi_updates_behavior:Check -o "$work/generated" \
|
|
"$root/tests/lumi_updates_behavior.zi" "$root/tests/sync_test_host.zi"
|
|
cat > "$work/generated/main.c" <<'C'
|
|
#include "lumi_updates_behavior.h"
|
|
int main(void) { return Check() == 0 ? 0 : 1; }
|
|
C
|
|
monocypher="$root/build/packages/monocypher/src"
|
|
"${CC:-cc}" -std=c11 -O0 -ffunction-sections -fdata-sections \
|
|
-I"$root/build/packages/ziran/include" -iquote "$work/generated" \
|
|
-I"$root/vendor-builds/sqlite" \
|
|
-I"$root/vendor-builds/linux/x86_64/inbe-liboqs/include" \
|
|
-I"$monocypher" -I"$monocypher/optional" \
|
|
"$work/generated"/*.c "$root/vendor-builds/sqlite/sqlite3.c" \
|
|
"$monocypher/monocypher.c" "$monocypher/optional/monocypher-ed25519.c" \
|
|
"$liboqs" -Wl,--gc-sections -ldl -lpthread -lz -lm -o "$work/test"
|
|
mkdir -p /tmp/inbe-lumi-updates-test
|
|
test_root=$(mktemp -d /tmp/inbe-lumi-updates-test/fixture.XXXXXX)
|
|
trap 'rm -rf "$test_root"' EXIT HUP INT TERM
|
|
APP_DATA_ROOT="$test_root" "$work/test"
|
|
printf '%s\n' 'Lumi changelog messages: storage, restart, deletion, accounts, retries and size limits passed'
|