Skip to content

fix(network): stabilize subscription handling and gateway routing #2421

fix(network): stabilize subscription handling and gateway routing

fix(network): stabilize subscription handling and gateway routing #2421

Workflow file for this run

name: Build and Cross-Compile
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches: [main]
tags: ['v*']
jobs:
build-x86_64:
name: Build for x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# with:
# submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install cross
run: cargo install cross
- name: Compile for x86_64-unknown-linux-gnu
run: cargo build --release
- name: Upload freenet binary
uses: actions/upload-artifact@v5
with:
name: binaries-x86_64-freenet
path: target/release/freenet
- name: Upload fdev binary
uses: actions/upload-artifact@v5
with:
name: binaries-x86_64-fdev
path: target/release/fdev
build-arm64:
name: Build for aarch64-unknown-linux-gnu
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v5
# with:
# submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Compile for aarch64-unknown-linux-gnu
run: cargo build --release
- name: Upload freenet binary
uses: actions/upload-artifact@v5
with:
name: binaries-arm64-freenet
path: target/release/freenet
- name: Upload fdev binary
uses: actions/upload-artifact@v5
with:
name: binaries-arm64-fdev
path: target/release/fdev
attach-to-release:
name: Attach binaries to GitHub release
runs-on: ubuntu-latest
needs: [build-x86_64, build-arm64]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download x86_64 freenet binary
uses: actions/download-artifact@v6
with:
name: binaries-x86_64-freenet
path: artifacts/x86_64-freenet
- name: Download x86_64 fdev binary
uses: actions/download-artifact@v6
with:
name: binaries-x86_64-fdev
path: artifacts/x86_64-fdev
- name: Download ARM64 freenet binary
uses: actions/download-artifact@v6
with:
name: binaries-arm64-freenet
path: artifacts/arm64-freenet
- name: Download ARM64 fdev binary
uses: actions/download-artifact@v6
with:
name: binaries-arm64-fdev
path: artifacts/arm64-fdev
- name: Prepare release assets
run: |
# Create zip files for each binary with appropriate naming
cd artifacts/x86_64-freenet && zip ../../freenet-x86_64-linux.zip freenet && cd ../..
cd artifacts/x86_64-fdev && zip ../../fdev-x86_64-linux.zip fdev && cd ../..
cd artifacts/arm64-freenet && zip ../../freenet-aarch64-linux.zip freenet && cd ../..
cd artifacts/arm64-fdev && zip ../../fdev-aarch64-linux.zip fdev && cd ../..
# Display the created files
ls -lh *.zip
- name: Upload binaries to release
env:
GH_TOKEN: ${{ github.token }}
run: |
# Extract the tag name (e.g., v0.1.30)
TAG_NAME="${GITHUB_REF#refs/tags/}"
# Upload all zip files to the release
gh release upload "$TAG_NAME" \
freenet-x86_64-linux.zip \
fdev-x86_64-linux.zip \
freenet-aarch64-linux.zip \
fdev-aarch64-linux.zip \
--repo ${{ github.repository }} \
--clobber