2025-12-05 18:45:27 +01:00

89 lines
3.4 KiB
YAML

name: Build Nomos Binaries
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
NOMOS_NODE_REV: 2f60a0372c228968c3526c341ebc7e58bbd178dd
NOMOS_BUNDLE_VERSION: v4
jobs:
build_nomos_binaries:
strategy:
matrix:
include:
- name: linux
runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
env:
NOMOS_CIRCUITS: ${{ github.workspace }}/.tmp/nomos-circuits
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
RUSTFLAGS: -C debuginfo=0 --cfg feature="pol-dev-mode"
CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y clang llvm-dev libclang-dev pkg-config cmake libssl-dev rsync libgmp10 libgmp-dev libgomp1 nasm
- name: Install nomos circuits
run: |
./scripts/setup-nomos-circuits.sh v0.3.1 "$NOMOS_CIRCUITS"
echo "NOMOS_CIRCUITS=$NOMOS_CIRCUITS" >> "$GITHUB_ENV"
- name: Add top-level KZG params file
run: |
curl -fsSL "https://raw.githubusercontent.com/logos-co/nomos-node/${NOMOS_NODE_REV}/tests/kzgrs/kzgrs_test_params" \
-o "${NOMOS_CIRCUITS}/kzgrs_test_params"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2025-09-14
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build nomos binaries
run: |
SRC_DIR="${GITHUB_WORKSPACE}/.tmp/nomos-node-src"
mkdir -p "$SRC_DIR"
if [ ! -d "$SRC_DIR/.git" ]; then
git clone https://github.com/logos-co/nomos-node.git "$SRC_DIR"
fi
cd "$SRC_DIR"
git fetch --depth 1 origin "${NOMOS_NODE_REV}"
git checkout "${NOMOS_NODE_REV}"
git reset --hard
git clean -fdx
# Work around flate2 1.1.6 ambiguity issues by pinning to a fixed release.
cargo +nightly-2025-09-14 update -p flate2 --precise 1.1.5
cargo +nightly-2025-09-14 build --all-features --bins
- name: Build local runner from workspace
run: |
cd "${GITHUB_WORKSPACE}"
cargo +nightly-2025-09-14 build --all-features -p runner-examples --bin local_runner
- name: Package binaries
run: |
mkdir -p artifacts
cp "${CARGO_TARGET_DIR}/debug/nomos-node" artifacts/
cp "${CARGO_TARGET_DIR}/debug/nomos-executor" artifacts/
cp "${CARGO_TARGET_DIR}/debug/nomos-cli" artifacts/
cp "${CARGO_TARGET_DIR}/debug/local_runner" artifacts/
mkdir -p artifacts/circuits
rsync -a "$NOMOS_CIRCUITS"/ artifacts/circuits/
tar -czf nomos-binaries.tar.gz -C artifacts .
- name: Save nomos binaries cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/nomos-binaries.tar.gz
key: ${{ runner.os }}-nomos-binaries-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: nomos-binaries-${{ runner.os }}-${{ env.NOMOS_NODE_REV }}-${{ env.NOMOS_BUNDLE_VERSION }}
path: nomos-binaries.tar.gz