-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sreekanth <[email protected]>
- Loading branch information
Showing
24 changed files
with
3,738 additions
and
87 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 |
---|---|---|
@@ -1,54 +1,69 @@ | ||
name: Rust | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
- release-* | ||
pull_request: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Unit Tests | ||
name: Clippy and Unit Tests | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
cache-workspaces: | | ||
. -> target | ||
./examples/batchmap-cat -> target | ||
./examples/batchmap-flatmap -> target | ||
./examples/map-cat -> target | ||
./examples/map-tickgen-serde -> target | ||
./examples/mapt-event-time-filter -> target | ||
./examples/reduce-counter -> target | ||
./examples/sideinput -> target | ||
./examples/sideinput/udf -> target | ||
./examples/simple-source -> target | ||
./examples/sink-log -> target | ||
./examples/source-transformer-now -> target | ||
- name: Cache Cargo dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install protoc (for Protocol Buffers) | ||
- name: Configure sccache | ||
run: | | ||
set -eux -o pipefail | ||
PROTOC_VERSION=3.19.4 | ||
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip | ||
curl -OL https://github.com/protocolbuffers/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/*' | ||
sudo chmod +x /usr/local/bin/protoc | ||
sudo find /usr/local/include -type f | xargs sudo chmod a+r | ||
sudo find /usr/local/include -type d | xargs sudo chmod a+rx | ||
rm -f $PROTOC_ZIP | ||
- name: Build | ||
run: cargo build --verbose | ||
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y protobuf-compiler | ||
|
||
- name: Code Generation | ||
run: make codegen | ||
|
||
- name: Ensure generated code is checked in | ||
run: git diff --exit-code | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
run: make test | ||
|
||
- name: Documentation generation | ||
run: RUSTFLAGS="-D warnings" cargo doc | ||
|
||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
- name: Dry run Cargo Publish | ||
run: cargo publish --dry-run |
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,46 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Publish to crates.io | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 12 | ||
# run workflow only on numaproj/numaflow-rs repository | ||
if: ${{ github.repository }} == "numaproj/numaflow-rs" | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
cache: false | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y protobuf-compiler | ||
|
||
- name: Code Generation | ||
run: make codegen | ||
|
||
- name: Ensure generated code is checked in | ||
run: git diff --exit-code | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Documentation generation | ||
run: RUSTFLAGS="-D warnings" cargo doc | ||
|
||
- name: Dry run Cargo Publish | ||
run: CARGO_REGISTRY_TOKEN=${{ secrets.CARGO_PUBLISH }} cargo publish |
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
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
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
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
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
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
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
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
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
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,27 @@ | ||
#[path = "servers/batchmap.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod batchmap; | ||
|
||
#[path = "servers/map.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod map; | ||
|
||
#[path = "servers/reduce.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod reduce; | ||
|
||
#[path = "servers/sideinput.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod sideinput; | ||
|
||
#[path = "servers/sink.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod sink; | ||
|
||
#[path = "servers/source.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod source; | ||
|
||
#[path = "servers/sourcetransformer.v1.rs"] | ||
#[rustfmt::skip] | ||
pub mod sourcetransformer; |
Oops, something went wrong.