67 lines
2.2 KiB
YAML

name: Build Nomos Binaries
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
NOMOS_NODE_REV: 2f60a0372c228968c3526c341ebc7e58bbd178dd
jobs:
build_nomos_binaries:
runs-on:
- self-hosted
- macOS
- X64
env:
NOMOS_CIRCUITS: ${{ github.workspace }}/.tmp/nomos-circuits
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
RUSTFLAGS: -C debuginfo=0
CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target
steps:
- uses: actions/checkout@v4
- name: Install nomos circuits
run: |
./scripts/setup-nomos-circuits.sh v0.3.1 "$NOMOS_CIRCUITS"
echo "NOMOS_CIRCUITS=$NOMOS_CIRCUITS" >> "$GITHUB_ENV"
- 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
cargo +nightly-2025-09-14 build --all-features -p nomos-node -p nomos-executor -p nomos-cli
- 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/
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 }}
- uses: actions/upload-artifact@v4
with:
name: nomos-binaries-${{ runner.os }}-${{ env.NOMOS_NODE_REV }}
path: nomos-binaries.tar.gz