From e8312959c3a5a441cd9f7e9f1c97b08a3e2377f2 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 6 Dec 2024 21:40:26 +0100 Subject: [PATCH] build(ci): allow disabling keyring features --- .github/workflows/ci.yml | 11 ++++++++++- Cargo.toml | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc887bd..121ccbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ on: [push, pull_request, create] jobs: build: + env: + CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: true + CARGO_PROFILE_dev_OPT_LEVEL: 0 + RUSTFLAGS: "" runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -11,7 +15,12 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo test + - run: cargo test --no-default-features + - name: Install libdbus on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libdbus-1-dev - run: cargo build --release - uses: actions/upload-artifact@v4 with: diff --git a/Cargo.toml b/Cargo.toml index d061408..4db9c06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ colog = "1.3" colored = "2.1" rustyline = { git = "https://github.com/xeruf/rustyline", rev = "465b14d" } # OS-Specific Abstractions -keyring = { version = "3", features = ["apple-native", "windows-native", "linux-native-sync-persistent", "crypto-rust"] } +keyring = "3" directories = "5.0" whoami = "1.5" # slint = "1.8" @@ -38,3 +38,7 @@ nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "e82bc787bdd849 tokio = { version = "1.41", features = ["rt", "rt-multi-thread", "macros", "io-std"] } chrono-english = "0.1" linefeed = "0.6" + +[features] +default = ["persistence"] +persistence = ["keyring/apple-native", "keyring/windows-native", "keyring/linux-native-sync-persistent", "keyring/crypto-rust"]