mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-07 15:53:10 +00:00
Cache nomos binary tarball per node rev
This commit is contained in:
parent
0173a351c2
commit
8ca28898d6
19
.github/workflows/lint.yml
vendored
19
.github/workflows/lint.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
NOMOS_NODE_REV: 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: lint-${{ github.ref }}
|
group: lint-${{ github.ref }}
|
||||||
@ -26,6 +27,12 @@ jobs:
|
|||||||
CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target
|
CARGO_TARGET_DIR: ${{ github.workspace }}/.tmp/nomos-target
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Restore cached nomos binaries
|
||||||
|
id: restore-nomos-bins
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/nomos-binaries.tar.gz
|
||||||
|
key: ${{ runner.os }}-nomos-binaries-${{ env.NOMOS_NODE_REV }}
|
||||||
- name: Install system dependencies (Linux)
|
- name: Install system dependencies (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
@ -47,6 +54,7 @@ jobs:
|
|||||||
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 nomos binaries
|
- name: Build nomos binaries
|
||||||
|
if: steps.restore-nomos-bins.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
SRC_DIR="${GITHUB_WORKSPACE}/.tmp/nomos-node-src"
|
SRC_DIR="${GITHUB_WORKSPACE}/.tmp/nomos-node-src"
|
||||||
mkdir -p "$SRC_DIR"
|
mkdir -p "$SRC_DIR"
|
||||||
@ -54,18 +62,25 @@ jobs:
|
|||||||
git clone https://github.com/logos-co/nomos-node.git "$SRC_DIR"
|
git clone https://github.com/logos-co/nomos-node.git "$SRC_DIR"
|
||||||
fi
|
fi
|
||||||
cd "$SRC_DIR"
|
cd "$SRC_DIR"
|
||||||
git fetch --depth 1 origin 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
git fetch --depth 1 origin "${NOMOS_NODE_REV}"
|
||||||
git checkout 2f60a0372c228968c3526c341ebc7e58bbd178dd
|
git checkout "${NOMOS_NODE_REV}"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git clean -fdx
|
git clean -fdx
|
||||||
cargo +nightly-2025-09-14 build --all-features -p nomos-node -p nomos-executor -p nomos-cli
|
cargo +nightly-2025-09-14 build --all-features -p nomos-node -p nomos-executor -p nomos-cli
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
|
if: steps.restore-nomos-bins.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cp "${CARGO_TARGET_DIR}/debug/nomos-node" artifacts/
|
cp "${CARGO_TARGET_DIR}/debug/nomos-node" artifacts/
|
||||||
cp "${CARGO_TARGET_DIR}/debug/nomos-executor" artifacts/
|
cp "${CARGO_TARGET_DIR}/debug/nomos-executor" artifacts/
|
||||||
cp "${CARGO_TARGET_DIR}/debug/nomos-cli" artifacts/
|
cp "${CARGO_TARGET_DIR}/debug/nomos-cli" artifacts/
|
||||||
tar -czf nomos-binaries.tar.gz -C artifacts .
|
tar -czf nomos-binaries.tar.gz -C artifacts .
|
||||||
|
- name: Save nomos binaries cache
|
||||||
|
if: steps.restore-nomos-bins.outputs.cache-hit != 'true'
|
||||||
|
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
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: nomos-binaries-linux-amd64
|
name: nomos-binaries-linux-amd64
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user