mirror of
https://github.com/Quad4-Software/Reticulum-Go
synced 2026-08-29 23:48:44 -04:00
27 lines
574 B
Bash
27 lines
574 B
Bash
|
|
#!/bin/sh
|
||
|
|
# SPDX-License-Identifier: Apache-2.0
|
||
|
|
# Copyright (c) 2024-2026 Quad4.io
|
||
|
|
#
|
||
|
|
# Build librns and run Python ctypes bindings tests plus examples.
|
||
|
|
|
||
|
|
set -eu
|
||
|
|
|
||
|
|
ROOT="$(CDPATH='' cd -- "$(dirname "$0")/../.." && pwd)"
|
||
|
|
cd "$ROOT"
|
||
|
|
|
||
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
||
|
|
echo "python3 not found on PATH" >&2
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
if command -v task >/dev/null 2>&1; then
|
||
|
|
task build-librns
|
||
|
|
else
|
||
|
|
mkdir -p bin
|
||
|
|
CGO_ENABLED=1 go build -buildmode=c-shared -o bin/librns.so ./cmd/librns
|
||
|
|
cp include/rns.h bin/rns.h
|
||
|
|
fi
|
||
|
|
|
||
|
|
make -C bindings/python test
|
||
|
|
make -C bindings/python examples
|