Viewing is open to everyone. Downloading and starring need a GitHub sign-in. Sign in with GitHub

test-native.sh

v0.1.0-build.85 Latest Commit ede38f5

Size
761 B
Lines
15
Language
shellscript
SHA-256
7d55a110d2ca…
View on GitHub

Sign in with GitHub to download. Each download is recorded with your GitHub username.

1#!/usr/bin/env bash
2# Compiles the Web SDK bridge natively (system C++ compiler, no Emscripten)
3# with the same core sources as the wasm build and runs test/native/bridge_test.cpp.
4set -euo pipefail
5here="$(cd "$(dirname "$0")/.." && pwd)"
6root="$(cd "$here/../.." && pwd)"
7out="${TMPDIR:-/tmp}/ckey-web-native"
8mkdir -p "$out"
9CXX="${CXX:-c++}"
10"$CXX" -std=c++20 -O2 -Wall -Wextra -Wno-unused-function ${CXXFLAGS:-} \
11 -I"$root/include" -I"$root/src" \
12 "$root/src/ckey_codec.cpp" "$root/src/ckey_scan.cpp" "$root/src/ckey_render.cpp" $( [ -f "$root/src/ckey_certify.cpp" ] && echo "$root/src/ckey_certify.cpp" ) "$root/src/telemetry.cpp" \
13 "$here/src/ckey_web.cpp" "$here/test/native/bridge_test.cpp" \
14 -pthread -o "$out/bridge_test"
15"$out/bridge_test"