fix workflow to fetch libsecp256k1.so
Some checks failed
Go / build-and-release (push) Has been cancelled

This commit is contained in:
2025-11-25 06:03:22 +00:00
parent 7fe1154391
commit 2e865c9616
12 changed files with 109 additions and 52 deletions

View File

@@ -33,10 +33,11 @@ if [[ ! -x "$BENCHMARK_BIN" ]]; then
echo "Building benchmark binary (pure Go + purego)..."
cd "$REPO_ROOT/cmd/benchmark"
CGO_ENABLED=0 go build -o "$BENCHMARK_BIN" .
# Copy libsecp256k1.so if available (runtime optional)
if [[ -f "$REPO_ROOT/pkg/crypto/p8k/libsecp256k1.so" ]]; then
cp "$REPO_ROOT/pkg/crypto/p8k/libsecp256k1.so" "$(dirname "$BENCHMARK_BIN")/"
fi
# Download libsecp256k1.so from nostr repository (runtime optional)
wget -q https://git.mleku.dev/mleku/nostr/raw/branch/main/crypto/p8k/libsecp256k1.so \
-O "$(dirname "$BENCHMARK_BIN")/libsecp256k1.so" 2>/dev/null || \
echo "Warning: Failed to download libsecp256k1.so (optional for performance)"
chmod +x "$(dirname "$BENCHMARK_BIN")/libsecp256k1.so" 2>/dev/null || true
cd "$REPO_ROOT"
fi