Skip to content

Commit

Permalink
Merge pull request #64 from vertexclique/fix-ci-builds
Browse files Browse the repository at this point in the history
Fix CI build
  • Loading branch information
vertexclique authored Apr 13, 2022
2 parents e9f4406 + e5621ef commit 0015aa5
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,26 @@ jobs:
timeout-minutes: 40
with:
command: test
args: --all -- --test-threads 1 --nocapture
args: --all --features sink_elastic -- --test-threads 1 --nocapture

- name: Check build
uses: actions-rs/cargo@v1
timeout-minutes: 40
with:
command: build

- name: Build Docs
uses: actions-rs/cargo@v1
check_docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions-rs/toolchain@v1
with:
command: doc
args: --features docs
profile: minimal
toolchain: nightly
override: true
components: rustfmt

- name: Docs
run: cargo doc --features docs
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ exclude = [
[features]
default = ["epoll", "asyncexec"]
docs = [
"store-rocksdb",
"sink-elastic"
"store_rocksdb",
"sink_elastic"
]
# IO systems
iouring = ["nuclei/iouring"]
Expand All @@ -47,9 +47,9 @@ tokio = ["nuclei/tokio"]
tokio03 = ["nuclei/tokio03"]
tokio02 = ["nuclei/tokio02"]
# Storage systems
store-rocksdb = ["rocksdb"]
store_rocksdb = ["rocksdb"]
# Sinks
sink-elastic = [
sink_elastic = [
"tokio",
"elasticsearch"
]
Expand All @@ -61,7 +61,7 @@ lightproc = "0.3.5"
lever = "0.1.3"
thiserror = "1.0"
async-trait = "0.1"
futures = "0.3"
futures = { version = "0.3", default-features = false, features = ["std", "async-await"] }
futures-timer = "3.0"
crossbeam-channel = "0.5"
rdkafka = { version = "0.28.0", default-features = false, features = ["libz"]}
Expand Down
4 changes: 2 additions & 2 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ pub enum CallystoError {
#[error("UTF-8 Conversion error: {0}")]
UTF8ConversionError(#[from] Utf8Error),

#[cfg(feature = "store-rocksdb")]
#[cfg(feature = "store_rocksdb")]
#[error("RocksDB Error")]
RocksDBError(#[from] rocksdb::Error),

#[cfg(feature = "sink-elastic")]
#[cfg(feature = "sink_elastic")]
#[error("ElasticSearch Error")]
ElasticSearchError(#[from] elasticsearch::Error),
}
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ mod stores;
pub use futures;
/// Reexport of http_types
pub use http_types;
/// Reexport of rdkafka
pub use rdkafka;
/// Reexport of nuclei
pub use nuclei;
/// Reexport of rdkafka
pub use rdkafka;

/// Callysto prelude
pub mod prelude {
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "sink-elastic")]
#[cfg(feature = "sink_elastic")]
#[cfg_attr(feature = "docs", doc(cfg(sink_elastic)))]
/// ElasticSearch Sink for CStream
pub mod elasticsearch;
3 changes: 2 additions & 1 deletion src/stores/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub(crate) mod inmemory;
#[cfg(feature = "store-rocksdb")]
#[cfg(feature = "store_rocksdb")]
#[cfg_attr(feature = "docs", doc(cfg(store_rocksdb)))]
pub(crate) mod rocksdb;
pub(crate) mod store;
4 changes: 2 additions & 2 deletions src/stores/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ where
todo!()
}

fn into_service(self) -> Arc<dyn Service<State>> {
Arc::new(self)
fn into_service(&self) -> &dyn Service<State> {
self
}
}
4 changes: 2 additions & 2 deletions src/types/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ where
Ok(Arc::new(db))
}
"rocksdb" | "rocks" => {
#[cfg(feature = "store-rocksdb")]
#[cfg(feature = "store_rocksdb")]
{
use crate::stores::rocksdb::RocksDbStore;
let rdb = RocksDbStore::new(app_name, storage_url, table_name);
return Ok(Arc::new(rdb));
}

Err(CallystoError::GeneralError(
"RocksDB feature is not enabled. `store-rocksdb` is the feature name.".into(),
"RocksDB feature is not enabled. `store_rocksdb` is the feature name.".into(),
))
}
"aerospikedb" | "aerospike" => todo!(),
Expand Down

0 comments on commit 0015aa5

Please sign in to comment.