-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 793a6df
Showing
23 changed files
with
6,816 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
permissions: | ||
contents: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/release.yml' | ||
push: | ||
branches: | ||
- 'master' | ||
- 'v1.18' | ||
- 'v2.0' | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04] | ||
runs-on: ["${{ matrix.os }}"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./target | ||
key: ${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-v001 | ||
restore-keys: | | ||
${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }} | ||
- name: Set rust version | ||
run: | | ||
RUST_VERSION="$(grep -oP 'channel = "\K\d\.\d+\.\d+(?=")' rust-toolchain.toml)" | ||
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV" | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
components: clippy | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libsasl2-dev protobuf-compiler | ||
- name: Build release | ||
run: cargo build --release --bin grpc-kafka | ||
|
||
- name: Rename binaries for ubuntu20 release | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: | | ||
mv target/release/grpc-kafka target/release/grpc-kafka-20.04 | ||
- name: Rename binaries for ubuntu22 release | ||
if: matrix.os == 'ubuntu-22.04' | ||
run: | | ||
mv target/release/grpc-kafka target/release/grpc-kafka-22.04 | ||
- name: Deleteing directories to avoid upload conflict | ||
run: | | ||
rm -rf \ | ||
target/release/grpc-kafka.d | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: yellowstone-grpc-kafka-${{ github.sha }}-${{ matrix.os }} | ||
path: | | ||
target/release/grpc-kafka-* | ||
- name: Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
target/release/grpc-kafka-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'v1.18' | ||
- 'v2.0' | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04] | ||
runs-on: ["${{ matrix.os }}"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
./target | ||
key: ${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}-v001 | ||
restore-keys: | | ||
${{ matrix.os }}-cargo-${{ hashFiles('rust-toolchain.toml') }} | ||
- name: Set rust version | ||
run: | | ||
RUST_VERSION="$(grep -oP 'channel = "\K\d\.\d+\.\d+(?=")' rust-toolchain.toml)" | ||
echo "RUST_VERSION=$RUST_VERSION" >> "$GITHUB_ENV" | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
components: clippy | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libsasl2-dev protobuf-compiler | ||
- name: cargo tree | ||
run: | | ||
cargo tree | ||
git checkout Cargo.lock | ||
cargo tree --frozen | ||
- name: cargo fmt | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: cargo deny check advisories | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check advisories | ||
|
||
- name: cargo clippy | ||
run: cargo clippy --workspace --all-targets #-- --deny=warnings | ||
|
||
- name: check | ||
run: cargo check --all-targets | ||
- name: check without default features | ||
run: cargo check --all-targets --no-default-features | ||
- name: check only with `metrics` feature | ||
run: cargo check --all-targets --no-default-features --features="metrics" | ||
- name: check only with `kafka` feature | ||
run: cargo check --all-targets --no-default-features --features="kafka" | ||
|
||
- name: Run tests | ||
run: cargo test --all-targets --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/.idea | ||
/.vscode | ||
/__pycache__ | ||
/target | ||
/test-ledger | ||
/venv | ||
|
||
config-test.json | ||
dump.rdb | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
**Note:** Version 0 of Semantic Versioning is handled differently from version 1 and above. | ||
The minor version will be incremented upon a breaking change and the patch version will be incremented for features. | ||
|
||
## [Unreleased] | ||
|
||
### Fixes | ||
|
||
### Features | ||
|
||
### Breaking | ||
|
||
## [1.0.0] - 2024-10-03 | ||
|
||
- Init. Moved from https://github.com/rpcpool/yellowstone-grpc. |
Oops, something went wrong.