Build nomos binaries inline when running local/compose smoke under act

This commit is contained in:
andrussal 2025-12-02 11:45:11 +01:00
parent a3c1635da2
commit 0b4d538dfd

View File

@ -221,6 +221,25 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build nomos binaries (act fallback)
if: env.ACT == 'true'
run: |
SRC_DIR="${RUNNER_TEMP}/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
mkdir -p "${RUNNER_TEMP}/nomos-binaries"
cp "${CARGO_TARGET_DIR:-${RUNNER_TEMP}/target-local}/debug/nomos-node" "${RUNNER_TEMP}/nomos-binaries/"
cp "${CARGO_TARGET_DIR:-${RUNNER_TEMP}/target-local}/debug/nomos-executor" "${RUNNER_TEMP}/nomos-binaries/"
cp "${CARGO_TARGET_DIR:-${RUNNER_TEMP}/target-local}/debug/nomos-cli" "${RUNNER_TEMP}/nomos-binaries/"
tar -czf "${RUNNER_TEMP}/nomos-binaries.tar.gz" -C "${RUNNER_TEMP}/nomos-binaries" .
- name: Download prebuilt nomos binaries
if: env.ACT != 'true'
uses: actions/download-artifact@v4
@ -231,7 +250,7 @@ jobs:
if: env.ACT == 'true'
run: |
mkdir -p "${RUNNER_TEMP}/nomos-binaries"
tar -xzf "${GITHUB_WORKSPACE}/nomos-binaries.tar.gz" -C "${RUNNER_TEMP}/nomos-binaries"
tar -xzf "${RUNNER_TEMP}/nomos-binaries.tar.gz" -C "${RUNNER_TEMP}/nomos-binaries"
- name: Install nomos binaries
run: |
BIN_DIR="${RUNNER_TEMP}/nomos-binaries"
@ -276,7 +295,7 @@ jobs:
if: env.ACT == 'true'
run: |
mkdir -p "${RUNNER_TEMP}/nomos-binaries"
tar -xzf "${GITHUB_WORKSPACE}/nomos-binaries.tar.gz" -C "${RUNNER_TEMP}/nomos-binaries"
tar -xzf "${RUNNER_TEMP}/nomos-binaries.tar.gz" -C "${RUNNER_TEMP}/nomos-binaries"
- name: Stage nomos binaries into build context
run: |
BIN_DIR="${RUNNER_TEMP}/nomos-binaries"