datahaven/.github/workflows/actions/setup-env/action.yml
Tim B 6ac58c532f
test: New CLI functions (#84)
## Changes

- New option: `--kurtosis-enclave-name` to allow you to specify a new
ethereum network with a different enclave name. Neccesary step for
setting up local testing with multiple enclaves running at once
- Refactor: all single dash options (e.g. `-i`) have been renamed to
have double dashes `--` for consistency others
- sad times: CLI now must be invoked `bun cli launch` since we have
multiple fns now
- Package Update
- New Function: `stop` which allows you to kill all components (eth, dh,
relayers) or only a single part
- Gonza's mac target build fix
- Misc fixes to ci like caching and rate limits

## Additional Comment 

The CLI needs multiple commands and this PR adds the first new one
`stop`.

This syntax is faily extensible so @ffarall 's k8 command can follow
suite.

Originally we were going to have an `exec` command to expose internal
fns to be callable by command line, i.e. generate beacon checkpoint -
however the need for it has since been superceded by the deploy to k8
command that's going to be added. I've left the code in place though so
when another usecase comes up we can just plug that in.

---------

Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
2025-05-22 20:02:12 +00:00

61 lines
1.8 KiB
YAML

name: "Setup Rust Environment"
description: "Creates a Rust environment with the specified toolchain, cache, and dependencies"
inputs:
cache-key:
description: "Cache key used to retrieve built data. Usually matches the profile of the build"
required: false
default: "cache"
cache-targets:
description: "Whether to cache targets"
required: false
default: "true"
runs:
using: "composite"
steps:
- name: Set Rust version
shell: bash
run: |
echo "BUILD_RUST_VERSION=$(rustc --version)" >> $GITHUB_ENV
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Set Rust caching env vars
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
shell: bash
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
sccache --show-stats
- name: Cache cargo + target + sccache2
uses: Swatinem/rust-cache@v2
with:
cache-targets: true
cache-all-crates: true
shared-key: ${{ runner.os }}-${{inputs.cache-key}}-${{ hashFiles('operator/rust-toolchain.toml') }}-${{ hashFiles('operator/Cargo.lock') }}
workspaces: |
operator -> target
cache-on-failure: true
cache-bin: true
cache-directories: |
~/.cache/sccache
~/.cargo/registry
~/.cargo/git
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: rui314/setup-mold@v1
- name: Install libpq-dev
shell: bash
run: sudo apt-get update && sudo apt-get install -y libpq-dev libclang-dev
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ github.token }}