Skip to content

Commit

Permalink
Fix compile errs, ci test with more feature combinations
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <[email protected]>
  • Loading branch information
Patrik-Stas committed Jul 3, 2023
1 parent 287f495 commit 2d09bb2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,12 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
features: ["ledger_vdrtools,anoncreds_vdrtools", "ledger_indyvdr,anoncreds_credx"]
features: [
"ledger_vdrtools,anoncreds_vdrtools",
"ledger_vdrtools,anoncreds_credx",
"ledger_indyvdr,anoncreds_vdrtools",
"ledger_indyvdr,anoncreds_credx"
]
steps:
- name: "Git checkout"
uses: actions/checkout@v3
Expand Down
7 changes: 6 additions & 1 deletion libvcx_core/src/api_vcx/api_global/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ use aries_vcx::aries_vcx_core::wallet::base_wallet::BaseWallet;
#[cfg(feature = "ledger_indyvdr")]
use aries_vcx::core::profile::modular_libs_profile::{indyvdr_build_ledger_read, indyvdr_build_ledger_write};
use aries_vcx::core::profile::profile::Profile;
use aries_vcx::errors::error::VcxResult;
use aries_vcx::errors::error::{AriesVcxError, VcxResult};
use std::sync::Arc;
use std::sync::RwLock;
use aries_vcx::aries_vcx_core::errors::error::AriesVcxCoreError;

lazy_static! {
static ref POOL_HANDLE: RwLock<Option<i32>> = RwLock::new(None);
Expand Down Expand Up @@ -111,6 +112,10 @@ async fn build_components_ledger(
let indy_write: Arc<dyn IndyLedgerWrite> = ledger_write.clone();
return Ok((anoncreds_read, anoncreds_write, indy_read, indy_write));
}
#[cfg(not(any(feature = "ledger_indyvdr", feature = "ledger_vdrtools")))]
{
panic!("No ledger implementation has been selected by feature flag upon build");
}
}

pub fn reset_ledger_components() -> LibvcxResult<()> {
Expand Down
4 changes: 4 additions & 0 deletions libvcx_core/src/api_vcx/api_global/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ fn build_component_anoncreds(base_wallet: Arc<dyn BaseWallet>) -> Arc<dyn BaseAn
{
return Arc::new(IndyCredxAnonCreds::new(Arc::clone(&base_wallet)));
}
#[cfg(not(any(feature = "anoncreds_vdrtools", feature = "anoncreds_credx")))]
{
panic!("No anoncreds implementation enabled by feature flag upon build");
}
}

fn setup_global_wallet(wallet_handle: WalletHandle) -> LibvcxResult<()> {
Expand Down

0 comments on commit 2d09bb2

Please sign in to comment.