Skip to content

build(deps): bump pyasn1 from 0.6.1 to 0.6.2 #170

build(deps): bump pyasn1 from 0.6.1 to 0.6.2

build(deps): bump pyasn1 from 0.6.1 to 0.6.2 #170

name: 🚀 Binary Build
on:
push:
tags: ["v*"]
pull_request:
branches: [main, develop]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
env:
JAM_LOG_LEVEL: "critical"
PVM_MODE: "interpreter"
CFLAGS: "-O3 -march=native"
LDFLAGS: "-O3"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
strategy:
fail-fast: false
matrix:
include:
- os: darwin
arch: arm64
runner: macos-14
- os: linux
arch: x64
runner: ubuntu-24.04
timeout-minutes: 15
- os: darwin
arch: x64
runner: macos-15
steps:
- name: 📥 Checkout code with submodules
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full clone for better submodule handling
token: ${{ secrets.PRIVATE_REPO_TOKEN }}
submodules: 'recursive' # Checkout all submodules recursively
# Remove submodules-depth to allow full history for recursive submodules
- name: � Verify submodules are present
run: |
echo "🔍 Verifying critical submodules are present..."
REQUIRED_SUBMODULES=(
"deps/tsrkit-pvm"
"deps/py-ark-vrf"
"deps/rockstore"
"deps/tsrkit-asm"
"deps/tsrkit-types"
)
MISSING_SUBMODULES=()
for submod in "${REQUIRED_SUBMODULES[@]}"; do
if [ ! -d "$submod" ] || [ -z "$(ls -A $submod)" ]; then
MISSING_SUBMODULES+=("$submod")
else
echo "✅ $submod: present"
fi
done
if [ ${#MISSING_SUBMODULES[@]} -ne 0 ]; then
echo "❌ Missing required submodules:"
printf ' %s\n' "${MISSING_SUBMODULES[@]}"
echo ""
echo "🔧 Attempting manual submodule update..."
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
git submodule sync --recursive
git submodule update --init --recursive --force
# Verify again
STILL_MISSING=()
for submod in "${MISSING_SUBMODULES[@]}"; do
if [ ! -d "$submod" ] || [ -z "$(ls -A $submod)" ]; then
STILL_MISSING+=("$submod")
else
echo "✅ Recovered: $submod"
fi
done
if [ ${#STILL_MISSING[@]} -ne 0 ]; then
echo "❌ Critical error: Still missing after recovery:"
printf ' %s\n' "${STILL_MISSING[@]}"
echo ""
echo "Debug info:"
echo "Git submodule status:"
git submodule status || true
echo ""
echo "Directory structure:"
ls -la deps/ || true
exit 1
fi
fi
echo "🎉 All required submodules are present!"
- name: 🧹 Free disk space (GitHub runner)
run: |
echo "Disk before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /opt/hostedtoolcache || true
echo "Disk after cleanup:"
df -h
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "latest" # or pin to a version like "0.4.26"
- name: Install system dependencies (Ubuntu)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
librocksdb-dev \
git \
curl \
pkg-config \
python3-dev \
python3-pip
- name: Install Rust toolchain (Linux)
if: matrix.os == 'linux'
shell: bash
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source "$HOME/.cargo/env" || true
rustc --version
cargo --version
- name: Install system dependencies (macOS)
if: matrix.os == 'darwin'
run: |
brew install rocksdb gmp mpfr libmpc
# Ensure Python development headers are available
# This is usually included with brew python but let's be explicit
echo "Python executable: $(which python3)"
python3 -c "import sysconfig; print('Python lib dir:', sysconfig.get_path('stdlib'))"
- name: Install Rust toolchain (macOS)
if: matrix.os == 'darwin'
shell: bash
run: |
brew install rustup-init || true
rustup-init -y --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source "$HOME/.cargo/env" || true
rustc --version
cargo --version
- name: Setup project
run: |
./scripts/setup.sh
- name: Install maturin for PyO3 builds
run: |
uv add maturin gmpy2
echo "[INFO] Maturin installed for PyO3 Rust-Python projects"
- name: Configure Cargo for low disk usage
run: |
echo "CARGO_BUILD_JOBS=1" >> $GITHUB_ENV
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
- name: Build binary
run: |
chmod +x build-binary.sh setup-rocksdb.sh
./build-binary.sh
- name: Fetch JAM test vectors
run: |
git clone --depth 1 https://github.com/w3f/jamtestvectors jamtestvectors
- name: 🧼 Aggressive cleanup before tests (pip/cargo/uv caches)
run: |
# clean pip cache
pip3 cache purge || true
rm -rf ~/.cache/pip ~/.cache/* || true
# remove uv caches
rm -rf ~/.uv || true
rm -rf $HOME/.local/share/uv || true
# remove cargo registry & git cache
rm -rf ~/.cargo/registry ~/.cargo/git || true
# if submodules include .git directories you don't need during tests, remove them
find . -name ".git" -type d -prune -exec rm -rf {} \; || true
# final check
df -h
echo "Top large files now:"
sudo du -ah /home/runner 2>/dev/null | sort -rh | head -n 40 || true
- name: 🧪 Import test (JAM vectors) for Storage
run: |
VEC_DIR="${{ github.workspace }}/jamtestvectors/traces/storage"
echo "Using vectors at: $VEC_DIR"
if [ ! -d "$VEC_DIR" ]; then
echo "❌ Missing test vectors path: $VEC_DIR" >&2
echo "Workspace: ${{ github.workspace }}"
echo "Listing jamtestvectors root (if present):" && ls -la "${{ github.workspace }}/jamtestvectors" || true
echo "Listing jamtestvectors/traces (if present):" && ls -la "${{ github.workspace }}/jamtestvectors/traces" || true
exit 1
fi
./dist/tessera-node --import "$VEC_DIR"
- name: 🧪 Import test (JAM vectors) for Safrole
run: |
VEC_DIR="${{ github.workspace }}/jamtestvectors/traces/safrole"
echo "Using vectors at: $VEC_DIR"
if [ ! -d "$VEC_DIR" ]; then
echo "❌ Missing test vectors path: $VEC_DIR" >&2
echo "Workspace: ${{ github.workspace }}"
echo "Listing jamtestvectors root (if present):" && ls -la "${{ github.workspace }}/jamtestvectors" || true
echo "Listing jamtestvectors/traces (if present):" && ls -la "${{ github.workspace }}/jamtestvectors/traces" || true
exit 1
fi
./dist/tessera-node --import "$VEC_DIR"
- name: Show results
run: |
echo "📏 Binary size: $(du -sh dist/tessera-node | cut -f1)"
ls -la dist/
- name: Get version from tag
id: version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
# Extract version from tag (remove 'v' prefix)
VERSION="${{ github.ref_name }}"
VERSION=${VERSION#v} # Remove 'v' prefix if present
elif [[ -f .version ]]; then
# Fallback to .version file for manual dispatch
VERSION=$(cat .version)
else
# Default version for manual dispatch without .version file
VERSION="dev-$(date +'%Y-%m-%d-%H-%M-%S')"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tessera-v${{ steps.version.outputs.version }}-${{ matrix.os }}-${{ matrix.arch }}
path: dist/tessera-node-*.tar.gz
retention-days: 30
release:
name: 🚀 Create Public Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🏷️ Get version from tag
id: version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
# Extract version from tag (remove 'v' prefix)
VERSION="${{ github.ref_name }}"
VERSION=${VERSION#v} # Remove 'v' prefix if present
elif [[ -f .version ]]; then
# Fallback to .version file for manual dispatch
VERSION=$(cat .version)
else
# Default version for manual dispatch without .version file
VERSION="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: 📦 Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: tessera-v${{ steps.version.outputs.version }}-*
merge-multiple: true
path: release-assets
- name: 📋 List release assets
run: |
echo "🎯 Release assets:"
ls -la release-assets/
echo ""
echo "📊 Asset sizes:"
du -sh release-assets/*
- name: 🚀 Create Release in Public Repo
uses: softprops/action-gh-release@v2
with:
repository: Chainscore/tessera-releases # Public releases repo
tag_name: v${{ steps.version.outputs.version }}
name: "Tessera Node v${{ steps.version.outputs.version }}"
body: |
## 🚀 Tessera Binary Release v${{ steps.version.outputs.version }}
### 📦 Downloads
Choose the appropriate binary for your platform:
- **Linux x86_64**: `tessera-node-Linux-x64.tar.gz`
- **macOS Apple Silicon (M-Series)**: `tessera-node-Darwin-arm64.tar.gz`
- **macOS Intel**: `tessera-node-Darwin-x64.tar.gz`
### 🚀 Quick Start
# Run node
```bash
./tessera-node --help
```
```bash
./tessera-node --env <environment>
```
# Run fuzzer target
```bash
./tessera-node --fuzzer --socket /tmp/jam_conformance.sock
```
### 🔍 Build Info
- **Python**: 3.12
- **PyInstaller**: Latest
- **Optimizations**: Cython + LTO + Native CPU
- **Version**: v${{ steps.version.outputs.version }}
- **Build Date**: $(date +'%Y-%m-%d %H:%M:%S UTC')
---
> **Note**: This is an automated release from the private Tessera repository.
> For support or issues, please contact prasad@chainscore.finance
files: release-assets/*
draft: false
prerelease: false
make_latest: true
token: ${{ secrets.PRIVATE_REPO_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_REPO_TOKEN }}