mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-07 15:53:10 +00:00
Share prebuilt nomos binaries between smoke jobs
This commit is contained in:
parent
f336ad8141
commit
90d568d93a
92
.github/workflows/lint.yml
vendored
92
.github/workflows/lint.yml
vendored
@ -13,6 +13,60 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
nomos_binaries:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
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 system dependencies
|
||||||
|
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"
|
||||||
|
- 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 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
||||||
|
git checkout 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
||||||
|
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 .
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nomos-binaries-linux-amd64
|
||||||
|
path: nomos-binaries.tar.gz
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -124,6 +178,7 @@ jobs:
|
|||||||
- run: cargo machete
|
- run: cargo machete
|
||||||
|
|
||||||
local_smoke:
|
local_smoke:
|
||||||
|
needs: nomos_binaries
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
POL_PROOF_DEV_MODE: true
|
POL_PROOF_DEV_MODE: true
|
||||||
@ -164,31 +219,24 @@ jobs:
|
|||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo-
|
restore-keys: ${{ runner.os }}-cargo-
|
||||||
- name: Build local binaries (nomos-node/executor)
|
- name: Download prebuilt nomos binaries
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nomos-binaries-linux-amd64
|
||||||
|
path: ${TMPDIR}/nomos-binaries
|
||||||
|
- name: Install nomos binaries
|
||||||
run: |
|
run: |
|
||||||
SRC_DIR="${TMPDIR:-/tmp}/nomos-node-src"
|
tar -xzf "${TMPDIR}/nomos-binaries/nomos-binaries.tar.gz" -C "${TMPDIR}/nomos-binaries"
|
||||||
mkdir -p "$SRC_DIR"
|
sudo cp "${TMPDIR}/nomos-binaries/nomos-node" /usr/local/bin/
|
||||||
if [ ! -d "$SRC_DIR/.git" ]; then
|
sudo cp "${TMPDIR}/nomos-binaries/nomos-executor" /usr/local/bin/
|
||||||
git clone https://github.com/logos-co/nomos-node.git "$SRC_DIR"
|
sudo cp "${TMPDIR}/nomos-binaries/nomos-cli" /usr/local/bin/
|
||||||
else
|
sudo chmod +x /usr/local/bin/nomos-node /usr/local/bin/nomos-executor /usr/local/bin/nomos-cli
|
||||||
cd "$SRC_DIR"
|
|
||||||
git fetch --depth 1 origin 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
|
||||||
git checkout 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
|
||||||
git reset --hard
|
|
||||||
git clean -fdx
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
cd "$SRC_DIR"
|
|
||||||
git fetch --depth 1 origin 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
|
||||||
git checkout 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
|
||||||
git reset --hard
|
|
||||||
git clean -fdx
|
|
||||||
cargo +nightly-2025-09-14 build --all-features -p nomos-node -p nomos-executor
|
|
||||||
- name: Run local runner smoke (ignored test)
|
- name: Run local runner smoke (ignored test)
|
||||||
run: |
|
run: |
|
||||||
cargo +nightly-2025-09-14 test -p runner-examples --test local_runner_bin_smoke -- --ignored --nocapture
|
cargo +nightly-2025-09-14 test -p runner-examples --test local_runner_bin_smoke -- --ignored --nocapture
|
||||||
|
|
||||||
compose_smoke:
|
compose_smoke:
|
||||||
|
needs: nomos_binaries
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
TMPDIR: ${{ github.workspace }}/.tmp
|
TMPDIR: ${{ github.workspace }}/.tmp
|
||||||
@ -202,6 +250,12 @@ jobs:
|
|||||||
- name: Prepare workspace tmpdir
|
- name: Prepare workspace tmpdir
|
||||||
run: mkdir -p "$TMPDIR"
|
run: mkdir -p "$TMPDIR"
|
||||||
|
|
||||||
|
- name: Download prebuilt nomos binaries
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nomos-binaries-linux-amd64
|
||||||
|
path: testing-framework/assets/stack/bin
|
||||||
|
|
||||||
- name: Prune docker to free space
|
- name: Prune docker to free space
|
||||||
run: |
|
run: |
|
||||||
docker system prune -af --volumes || true
|
docker system prune -af --volumes || true
|
||||||
|
|||||||
@ -74,33 +74,18 @@ RUN mkdir -p /opt/circuits && \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ENV NOMOS_CIRCUITS=/opt/circuits
|
ENV NOMOS_CIRCUITS=/opt/circuits
|
||||||
ENV CARGO_TARGET_DIR=/tmp/target
|
|
||||||
ENV CARGO_INCREMENTAL=0
|
|
||||||
ENV CARGO_PROFILE_DEV_DEBUG=0
|
|
||||||
ENV RUSTFLAGS="-C debuginfo=0"
|
|
||||||
|
|
||||||
# Fetch the nomos-node sources pinned in Cargo.lock and build the runtime binaries.
|
# Copy prebuilt runtime binaries (provided by CI) into the build context.
|
||||||
RUN if [ ! -d /workspace/nomos-node ]; then \
|
RUN mkdir -p /workspace/artifacts
|
||||||
git clone https://github.com/logos-co/nomos-node.git /workspace/nomos-node; \
|
COPY testing-framework/assets/stack/bin/nomos-node /workspace/artifacts/nomos-node
|
||||||
fi && \
|
COPY testing-framework/assets/stack/bin/nomos-executor /workspace/artifacts/nomos-executor
|
||||||
cd /workspace/nomos-node && \
|
COPY testing-framework/assets/stack/bin/nomos-cli /workspace/artifacts/nomos-cli
|
||||||
git fetch --depth 1 origin 2f60a0372c228968c3526c341ebc7e58bbd178dd && \
|
|
||||||
git checkout 2f60a0372c228968c3526c341ebc7e58bbd178dd && \
|
|
||||||
git reset --hard && git clean -fdx && \
|
|
||||||
cargo build --all-features --bins && \
|
|
||||||
rm -rf ${CARGO_TARGET_DIR}/debug/incremental
|
|
||||||
|
|
||||||
# Build cfgsync binaries from this workspace.
|
# Build cfgsync binaries from this workspace.
|
||||||
RUN cargo build --all-features --manifest-path /workspace/testing-framework/tools/cfgsync/Cargo.toml --bins
|
RUN cargo build --all-features --manifest-path /workspace/testing-framework/tools/cfgsync/Cargo.toml --bins
|
||||||
|
RUN cp /workspace/target/debug/cfgsync-server /workspace/artifacts/cfgsync-server && \
|
||||||
# Collect only the binaries and drop the build directory to keep layers small.
|
cp /workspace/target/debug/cfgsync-client /workspace/artifacts/cfgsync-client && \
|
||||||
RUN mkdir -p /workspace/artifacts && \
|
rm -rf /workspace/target/debug/incremental
|
||||||
cp ${CARGO_TARGET_DIR}/debug/nomos-node /workspace/artifacts/ && \
|
|
||||||
cp ${CARGO_TARGET_DIR}/debug/nomos-executor /workspace/artifacts/ && \
|
|
||||||
cp ${CARGO_TARGET_DIR}/debug/nomos-cli /workspace/artifacts/ && \
|
|
||||||
cp ${CARGO_TARGET_DIR}/debug/cfgsync-server /workspace/artifacts/ && \
|
|
||||||
cp ${CARGO_TARGET_DIR}/debug/cfgsync-client /workspace/artifacts/ && \
|
|
||||||
rm -rf ${CARGO_TARGET_DIR}
|
|
||||||
|
|
||||||
# ===========================
|
# ===========================
|
||||||
# NODE IMAGE
|
# NODE IMAGE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user