Skip to content

Commit

Permalink
[JIT-1016] Add metrics to unbounded queues + misc fixes (solana-labs#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
esemeniuc authored Apr 11, 2023
1 parent db63eff commit a61d46a
Show file tree
Hide file tree
Showing 35 changed files with 2,705 additions and 1,828 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
.dockerignore
.git/
.github/
.gitignore
.idea/
README.md
b
Dockerfile
docker-compose.yaml
docker-output/
f
p
secondary/
target/
65 changes: 65 additions & 0 deletions .github/actions/setup-rust/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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: Install Protobuf
run: |
export PROTOC_VERSION=21.12 && \
export PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip && \
curl -Ss -OL https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP \
&& sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& sudo unzip -o $PROTOC_ZIP -d /usr/local include/* \
&& rm -f $PROTOC_ZIP
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 before
run: |
rustc --version || true;
cargo --version || true;
cargo clippy --version || true;
cargo fmt --version || true;
shell: bash

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy, rustfmt

- name: Check rust version after
run: |
rustc --version;
cargo --version;
cargo clippy --version;
cargo fmt --version;
shell: bash
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: jpribyl/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Build containers
run: docker compose build --progress=plain
env:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/clean_code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
override: true
components: clippy
caller-workflow-name: clippy_and_udeps_check

- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GHUB_TOKEN }}
args: --all-features

- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-udeps --locked
- name: cargo udeps

- name: Run cargo udeps
uses: actions-rs/cargo@v1
with:
command: udeps
2 changes: 1 addition & 1 deletion .github/workflows/push_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ORG: jitolabs
TAG: ${{ inputs.TAG }}
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PWD }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
caller-workflow-name: test

- name: Run tests
run: RUST_LOG=info cargo test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
.idea/

.env
docker-output/
Loading

0 comments on commit a61d46a

Please sign in to comment.