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.
This commit is contained in:
@@ -162,8 +162,13 @@ else
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}8. Testing build capability...${NC}"
|
||||
if go build -o "$temp_dir/test-orly" . >/dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Project builds successfully${NC}"
|
||||
if CGO_ENABLED=0 go build -o "$temp_dir/test-orly" . >/dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Project builds successfully (pure Go + purego)${NC}"
|
||||
# Copy libsecp256k1.so if available (runtime optional)
|
||||
if [[ -f "pkg/crypto/p8k/libsecp256k1.so" ]]; then
|
||||
cp pkg/crypto/p8k/libsecp256k1.so "$temp_dir/"
|
||||
echo -e "${GREEN}✓ libsecp256k1.so copied (runtime optional)${NC}"
|
||||
fi
|
||||
if [[ -x "$temp_dir/test-orly" ]]; then
|
||||
echo -e "${GREEN}✓ Binary is executable${NC}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user