Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 67 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ on:
- v*

jobs:
test:
name: Test on Rust ${{ matrix.rust }} (with GAT enabled)
no-gat:
name: Test on Rust ${{ matrix.rust }} (without GAT)
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"

Expand All @@ -29,7 +29,70 @@ jobs:
- stable
- beta
- nightly
- 1.65.0 # MSRV
- 1.61.0 # MSRV

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- name: Check Format
uses: actions-rs/cargo@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: fmt
args: --all -- --check

- name: Lint
uses: actions-rs/cargo@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: clippy
args: --all --features array-vec,stream,serde,parallel

- name: Build
uses: actions-rs/cargo@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: build
args: --features array-vec,stream,serde,parallel

- name: Test
uses: actions-rs/cargo@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: test
args: --lib --features array-vec,stream,serde,parallel

- name: Test for no-std
uses: actions-rs/cargo@v1
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: test
args: --lib --features array-vec,stream,serde --no-default-features

gat:
name: Test on Rust ${{ matrix.rust }} (with GAT enabled)
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"

strategy:
matrix:
rust:
- beta
- nightly

steps:
- name: Checkout
Expand Down Expand Up @@ -81,4 +144,4 @@ jobs:
if: ${{ !contains(github.event.head_commit.message, 'skip test') }}
with:
command: test
args: --lib --features array-vec,stream,serde,async --no-default-features
args: --lib --features array-vec,stream,serde,async,gat --no-default-features
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "indicator"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
authors = ["Nouzan <[email protected]>"]
license = "MIT"
description = "Abstractions for stream aggregation, we call them `Indicator` s."
repository = "https://github.com/Nouzan/indicator"
keywords = ["stream", "no_std", "stream-processing", "aggregation"]
rust-version = "1.65.0"
rust-version = "1.61.0"

[package.metadata.docs.rs]
all-features = true
Expand All @@ -21,6 +21,7 @@ alloc = ["futures?/alloc", "time/alloc"]
array-vec = ["arrayvec"]
stream = ["futures", "pin-project-lite"]
serde = ["dep:serde", "time/serde-human-readable", "time/serde-well-known", "humantime"]
gat = ["tinyvec"]
async = ["futures", "pin-project-lite"]
reactive = [
"alloc",
Expand Down Expand Up @@ -48,6 +49,7 @@ default-features = false
[dependencies.tinyvec]
version = "1.6.0"
features = ["alloc", "rustc_1_55"]
optional = true

[dependencies.time]
version = "0.3"
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub mod ticked;
pub mod iter;

/// Operator using GAT.
#[cfg(feature = "gat")]
pub mod gat;

#[cfg(feature = "stream")]
Expand All @@ -97,6 +98,7 @@ pub mod reactive;

/// Prelude.
pub mod prelude {
#[cfg(feature = "gat")]
pub use crate::gat::*;
pub use crate::operator::{BoxOperator, LocalBoxOperator, Operator, OperatorExt};
pub use crate::window::{Period, Tick, TickValue, TumblingWindow};
Expand Down