From 3218ed9200fdac590b7e1c7fa3a571d3a0958e6c Mon Sep 17 00:00:00 2001 From: Krystie Date: Wed, 1 Apr 2026 04:03:31 -0700 Subject: [PATCH] Add automated ARM64 builds via GitHub Actions - Auto-builds on new triangles_v5 releases - Manual trigger with version input - Creates GitHub releases with pre-built binaries - Uses ARM64 Docker container for native builds - Includes BerkeleyDB 4.8 compilation - Generates release notes automatically --- .github/workflows/build-arm64.yml | 170 +++++++++++++++++++++++++ README.md | 199 ++++++------------------------ 2 files changed, 210 insertions(+), 159 deletions(-) create mode 100644 .github/workflows/build-arm64.yml diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml new file mode 100644 index 0000000..fca8f78 --- /dev/null +++ b/.github/workflows/build-arm64.yml @@ -0,0 +1,170 @@ +name: Build TRI-PI ARM64 + +on: + # Trigger on new tags in upstream triangles_v5 repo + repository_dispatch: + types: [new-release] + + # Manual trigger + workflow_dispatch: + inputs: + version: + description: 'Triangles version to build (e.g. v5.4.5)' + required: true + type: string + +jobs: + build-arm64: + name: Build ARM64 Package + runs-on: ubuntu-latest + + steps: + - name: Checkout TRI-PI repo + uses: actions/checkout@v4 + + - name: Set up QEMU for ARM64 emulation + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + - name: Build in ARM64 container + run: | + docker run --rm --platform linux/arm64 \ + -v $PWD:/workspace \ + -w /workspace \ + ubuntu:24.04 bash -c ' + set -e + + # Install dependencies + apt-get update + apt-get install -y git build-essential libtool autotools-dev automake \ + pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev \ + libminiupnpc-dev libzmq3-dev tor curl wget ca-certificates + + # Determine version + VERSION="${{ github.event.inputs.version || 'v5.4.4' }}" + echo "Building Triangles $VERSION for ARM64" + + # Build BerkeleyDB 4.8 + echo "=== Building BerkeleyDB 4.8 ===" + cd /tmp + wget -q http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz + tar xzf db-4.8.30.NC.tar.gz + cd db-4.8.30.NC/build_unix + + # Update config for ARM64 + wget -q -O ../dist/config.guess \ + "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" + wget -q -O ../dist/config.sub \ + "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" + chmod +x ../dist/config.guess ../dist/config.sub + + ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/usr/local + make -j$(nproc) > /dev/null 2>&1 + make install + ldconfig + + # Clone and build trianglesd + echo "=== Building trianglesd $VERSION ===" + cd /tmp + git clone https://github.com/SamiAhmed7777/triangles_v5.git + cd triangles_v5 + git checkout $VERSION || git checkout main + + cd src + make -f makefile.unix -j$(nproc) USE_UPNP=1 + + # Package for release + echo "=== Creating release package ===" + cd /workspace + mkdir -p bin + strip /tmp/triangles_v5/src/trianglesd + cp /tmp/triangles_v5/src/trianglesd bin/ + + # Update version in README + CLEAN_VERSION=$(echo $VERSION | sed "s/^v//") + sed -i "s/v5\.4\.4/$VERSION/g" README.md + sed -i "s/tri-pi-v.*-arm64/tri-pi-$VERSION-arm64/g" README.md + + # Create release tarball + cd /workspace/.. + tar czf tri-pi-$VERSION-arm64.tar.gz \ + tri-pi/bin/trianglesd \ + tri-pi/docs/ \ + tri-pi/install.sh \ + tri-pi/README.md + + mv tri-pi-$VERSION-arm64.tar.gz /workspace/releases/ + + echo "✅ Build complete: tri-pi-$VERSION-arm64.tar.gz" + ' + + - name: Generate release notes + id: release_notes + run: | + VERSION="${{ github.event.inputs.version || 'v5.4.4' }}" + + cat > release-notes.md << EOF + # TRI-PI $VERSION ARM64 Release + + **Built:** $(date -u +"%Y-%m-%d %H:%M UTC") + **Platform:** ARM64 (Raspberry Pi 4/5, ARM servers) + **Base:** Ubuntu 24.04 ARM64 + + ## What's Included + + - Native ARM64 \`trianglesd\` binary ($VERSION) + - Tor integration (embedded management) + - Updated onion seed nodes + - One-command installer + - Complete documentation + + ## Installation + + \`\`\`bash + wget https://github.com/SamiAhmed7777/tri-pi/releases/download/$VERSION/tri-pi-$VERSION-arm64.tar.gz + tar xzf tri-pi-$VERSION-arm64.tar.gz + cd tri-pi-$VERSION-arm64 + sudo ./install.sh + \`\`\` + + ## Usage + + \`\`\`bash + trianglesd # Start daemon + trianglesd getinfo # Check status + trianglesd help # List commands + \`\`\` + + --- + + **Auto-built by GitHub Actions** + EOF + + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ steps.release_notes.outputs.version }} + name: TRI-PI ${{ steps.release_notes.outputs.version }} ARM64 + body_path: release-notes.md + files: | + releases/tri-pi-${{ steps.release_notes.outputs.version }}-arm64.tar.gz + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update latest release link + run: | + VERSION="${{ steps.release_notes.outputs.version }}" + + # Update README with latest release badge + sed -i "1i ![Latest Release](https://img.shields.io/github/v/release/SamiAhmed7777/tri-pi?label=Latest%20Release)" README.md + + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add README.md + git commit -m "Update to $VERSION [skip ci]" || true + git push || true diff --git a/README.md b/README.md index 8381d8c..fbd5325 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,36 @@ # TRI-PI v5.4.4 - ARM64 Edition +[![Latest Release](https://img.shields.io/github/v/release/SamiAhmed7777/tri-pi?label=Latest%20Release)](https://github.com/SamiAhmed7777/tri-pi/releases/latest) +[![Build Status](https://img.shields.io/github/actions/workflow/status/SamiAhmed7777/tri-pi/build-arm64.yml?label=ARM64%20Build)](https://github.com/SamiAhmed7777/tri-pi/actions) +[![Platform](https://img.shields.io/badge/platform-ARM64-blue)](https://github.com/SamiAhmed7777/tri-pi) + Complete Triangles (TRI) cryptocurrency node package for Raspberry Pi 4/5 (64-bit) and ARM64 servers. +## Quick Start + +### Download Latest Release + +```bash +# Get latest version +wget https://github.com/SamiAhmed7777/tri-pi/releases/latest/download/tri-pi-v5.4.4-arm64.tar.gz +tar xzf tri-pi-v5.4.4-arm64.tar.gz +cd tri-pi-v5.4.4-arm64 + +# Install +sudo ./install.sh + +# Start node +trianglesd +``` + +### Or Clone and Build from Source + +```bash +git clone https://github.com/SamiAhmed7777/tri-pi.git +cd tri-pi +sudo ./install.sh +``` + ## What's Included - **trianglesd** v5.4.4 - Native ARM64 binary (85MB) @@ -18,16 +47,11 @@ Complete Triangles (TRI) cryptocurrency node package for Raspberry Pi 4/5 (64-bi - **Storage:** 10GB free space (blockchain grows over time) - **Network:** Internet connection (Tor supported) -## Quick Installation +## Automated Builds -```bash -# Extract the package -tar xzf tri-pi-v5.4.4-arm64.tar.gz -cd tri-pi-v5.4.4-arm64 +New releases are automatically built via GitHub Actions whenever upstream trianglesd is updated. -# Run installer (requires sudo) -sudo ./install.sh -``` +**Manual trigger:** Go to [Actions](https://github.com/SamiAhmed7777/tri-pi/actions) → "Build TRI-PI ARM64" → "Run workflow" ## Usage @@ -41,11 +65,6 @@ trianglesd trianglesd getinfo ``` -### Get help -```bash -trianglesd help -``` - ### Common commands ```bash trianglesd getblockcount # Current block height @@ -55,6 +74,12 @@ trianglesd getnewaddress # Generate new address trianglesd getbalance # Wallet balance ``` +## Documentation + +- **[Build Guide](docs/BUILD.md)** - Complete build instructions from source +- **[Installation](install.sh)** - Automated installer script +- **[Releases](https://github.com/SamiAhmed7777/tri-pi/releases)** - Download pre-built packages + ## Tor Integration trianglesd v5.4.4 includes built-in Tor management: @@ -64,159 +89,15 @@ trianglesd v5.4.4 includes built-in Tor management: - **SOCKS proxy** - Built-in at port 19099 - **Peer connectivity** - Connects to onion seed nodes -**To disable Tor:** -```bash -trianglesd -notor -``` - **Check your onion address:** ```bash trianglesd getinfo | grep onion ``` -## Configuration - -Configuration file: `~/.triangles/triangles.conf` - -The installer creates a default config. You can edit it for custom settings: - -```bash -nano ~/.triangles/triangles.conf -``` - -### Important config options: - -``` -server=1 # Enable RPC server -daemon=1 # Run as daemon -listen=1 # Accept incoming connections -txindex=1 # Full transaction index -maxconnections=125 # Max peer connections -rpcport=24113 # RPC port -``` - -## Building from Source - -### Prerequisites - -```bash -# Install build dependencies -sudo apt-get update -sudo apt-get install -y git build-essential libtool autotools-dev automake \ - pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev \ - libminiupnpc-dev libzmq3-dev tor curl wget -``` - -### Build BerkeleyDB 4.8 - -```bash -# Download and extract -wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz -tar xzf db-4.8.30.NC.tar.gz -cd db-4.8.30.NC/build_unix - -# Update config scripts for ARM64 -wget -O ../dist/config.guess \ - 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -wget -O ../dist/config.sub \ - 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -chmod +x ../dist/config.guess ../dist/config.sub - -# Configure and build -../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/usr/local -make -j$(nproc) -sudo make install -sudo ldconfig -``` - -### Build trianglesd - -```bash -# Clone source -git clone https://github.com/SamiAhmed7777/triangles_v5.git -cd triangles_v5 -git checkout v5.4.4 - -# Build daemon -cd src -make -f makefile.unix -j$(nproc) USE_UPNP=1 - -# Install -sudo strip trianglesd -sudo cp trianglesd /usr/local/bin/ -sudo chmod +x /usr/local/bin/trianglesd -``` - -### Verify build - -```bash -trianglesd --version -# Output: Triangles version v5.4.4 -``` - -## Seed Nodes (v5.4.4) - -The following onion seed nodes are hardcoded in v5.4.4: - -1. `gxvrhv3qitnc6kobrhsrse46bmcfitnybapor3or3oczzuxn6hfzxyid.onion` (DNS2) -2. `i6tk7soznftvoibtskwlezviskiererhjndpsmrff4kaxw7jnd5izfqd.onion` (DNS3) -3. `futmtrvh6j34t7s6yjdxfia6iwuyfzwh4k5eqfof5kfhoqk3xmi3qoqd.onion` (Original) -4. `uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion` (Seed-1) -5. `el5sirhhleecuctpeeprelzubpqmoqivvra3rzlwbjttinxa4fq3wnid.onion` (Seed-2) -6. `sj5dhybnlp3v4y5niyc5unrnd6s43lyx5ibup7rolyosjbi2u2hsbvyd.onion` (Seed-3) -7. `i3kr5meha7se4ns3wss3h7v46m6uksfzv4wrohdqxpj6n35wyo2bvlid.onion` (Seed-4) - -## Network Information - -- **Mainnet Port:** 17771 -- **RPC Port:** 24113 (configurable) -- **Tor SOCKS Port:** 19099 (internal) -- **Protocol Version:** 70206 -- **Consensus:** Hybrid PoW/PoS - -## Troubleshooting - -### Tor connection issues - -If Tor fails to start: -```bash -# Check Tor status -sudo systemctl status tor - -# Restart Tor -sudo systemctl restart tor - -# Check logs -trianglesd getinfo 2>&1 | grep -i tor -``` - -### Sync issues - -If blockchain won't sync: -```bash -# Check connections -trianglesd getpeerinfo - -# Add seed nodes manually -trianglesd addnode "uddaxjbo3lh2zskg7w6gwln4ty5cel7q4c5jbx7fdtv6zf2j47gdlyad.onion" "onetry" -``` - -### Port conflicts - -If port 24112 is already in use: -```bash -# Check what's using the port -sudo lsof -i :24112 - -# Edit config to use different port -nano ~/.triangles/triangles.conf -# Change: port=24113 -``` - ## Support -- **GitHub:** https://github.com/SamiAhmed7777/triangles_v5 -- **Issues:** https://github.com/SamiAhmed7777/triangles_v5/issues +- **GitHub Issues:** [Report bugs or request features](https://github.com/SamiAhmed7777/tri-pi/issues) +- **Upstream:** [triangles_v5](https://github.com/SamiAhmed7777/triangles_v5) ## License