Files
next.orly.dev/scripts/test-workflow-local.sh
mleku 202d3171f9 Implement multi-platform build system with pure Go support
- Introduced a comprehensive build system that supports multiple platforms (Linux, macOS, Windows, Android) using pure Go builds (`CGO_ENABLED=0`).
- Updated all build and test scripts to ensure compatibility with the new purego approach, allowing for dynamic loading of `libsecp256k1` at runtime.
- Added detailed documentation on the build process, platform detection, and deployment options.
- Enhanced CI/CD workflows to automate builds for all supported platforms and include necessary libraries in releases.
- Updated `.gitignore` to exclude build output files.
- Created new documentation files for deployment and multi-platform build summaries.
2025-11-04 20:29:19 +00:00

34 lines
884 B
Bash
Executable File

#!/usr/bin/env bash
# Manual test script for .github/workflows/go.yml
# This replicates the build job steps locally
set -e
echo "=== Testing GitHub Actions Workflow Locally ==="
echo ""
# Check Go version
echo "Checking Go version..."
go version
echo ""
# Setup library path (runtime optional)
if [ -f "pkg/crypto/p8k/libsecp256k1.so" ]; then
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$(pwd)/pkg/crypto/p8k"
echo "Library path set for libsecp256k1.so (runtime optional)"
fi
echo ""
# Build with pure Go + purego (no CGO needed)
echo "Building with pure Go + purego..."
CGO_ENABLED=0 go build -v ./...
echo ""
# Test with pure Go + purego
echo "Testing with pure Go + purego..."
CGO_ENABLED=0 go test -v $(go list ./... | xargs -n1 sh -c 'ls $0/*_test.go 1>/dev/null 2>&1 && echo $0' | grep .)
echo ""
echo "=== Build job completed successfully ==="