From ad3297755889a5eb14745e2908a8185eedef6b3e Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Sat, 23 Jul 2022 13:02:35 +0200 Subject: [PATCH] Don't compile daemon and cli binaries on Windows --- .github/workflows/main.yml | 8 ++++++-- Cargo.toml | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd7afd26..bec2d57c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,5 +36,9 @@ jobs: toolchain: ${{ matrix.toolchain }} override: true profile: minimal - - name: Test on Rust ${{ matrix.toolchain }} - run: cargo test --verbose + - name: Test on Rust ${{ matrix.toolchain }} (only Windows) + if: matrix.os == 'windows-latest' + run: cargo test --verbose --no-default-features + - name: Test on Rust ${{ matrix.toolchain }} (non Windows) + if: matrix.os != 'windows-latest' + run: cargo test --verbose --color always -- --nocapture diff --git a/Cargo.toml b/Cargo.toml index c888e168..8cddec3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,16 @@ exclude = [".github/", ".cirrus.yml", "tests/", "test_data/", "contrib/", "pypr [[bin]] name = "minisafed" path = "src/bin/daemon.rs" +required-features = ["jsonrpc_server"] [[bin]] name = "minisafe-cli" path = "src/bin/cli.rs" +required-features = ["jsonrpc_server"] + +[features] +default = ["jsonrpc_server"] +jsonrpc_server = [] [dependencies] # For managing transactions (it re-exports the bitcoin crate)