Skip to content

Commit

Permalink
Add an rpc client to interface with block engine http server
Browse files Browse the repository at this point in the history
  • Loading branch information
ebin-mathews committed Jan 11, 2024
0 parents commit 549aa25
Show file tree
Hide file tree
Showing 15 changed files with 5,043 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/actions/setup-rust/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Setup Rust
description: Installs rust in a bare metal fashion
inputs:
caller-workflow-name:
description: 'Name of workflow used for creating a cache key in ASCII format.'
required: true
default: ''

runs:
using: composite
steps:
- name: Generate cache key
id: cache-key-generator
run: echo "cache-key=$(echo ${{inputs.caller-workflow-name}} | tr ' ' '_')" >> $GITHUB_OUTPUT
shell: bash

- name: Check cache key
run: "echo Cache key: ${{ steps.cache-key-generator.outputs.cache-key }}"
shell: bash

- name: cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ steps.cache-key-generator.outputs.cache-key }}-${{ hashFiles('**/Cargo.lock') }}

- name: cache rust files
uses: actions/cache@v3
with:
path: |
target/
key: ${{ runner.os }}-cargo-${{ steps.cache-key-generator.outputs.cache-key }}-${{ hashFiles('**/*.rs') }}

- name: Check rust version
run: |
rustc --version || true;
cargo --version || true;
cargo clippy --version || true;
cargo fmt --version || true;
shell: bash
38 changes: 38 additions & 0 deletions .github/workflows/lint_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build

on:
pull_request:

jobs:
lint_build_test:
runs-on: ubuntu-20.04-16c-64g
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Sanity Check
run: |
cat /proc/cpuinfo
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
caller-workflow-name: test

- name: Setup Rust tools
run: |
cargo install cargo-sort
- name: Workspace sort
run: cargo sort --workspace --check

- name: Fmt
run: cargo fmt --all --check

- name: Clippy check
run: cargo clippy --all-features --all-targets --tests -- -D warnings

- name: Run tests
run: cargo test --all-features --locked
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
/target
Loading

0 comments on commit 549aa25

Please sign in to comment.