From 73cbec9e9258704bbd17a3ddc45aad290b8aa480 Mon Sep 17 00:00:00 2001 From: est31 Date: Sun, 10 Sep 2023 16:56:07 +0200 Subject: [PATCH] Enable botan CI on windows (#125) In #118, windows CI was added but the botan specific tests were disabled as the build for rust doesn't work. With the help of upstream, we can now enable botan in CI as well. --- Co-authored-by: Daniel McCarney --- .github/workflows/ci.yml | 8 ++++++++ Cargo.toml | 5 +---- tests/botan.rs | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 140a2397..2e9b3514 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,18 @@ jobs: build-windows: runs-on: windows-latest + env: + # botan doesn't build on windows if the source is + # on a different drive than the artifacts + # https://github.com/randombit/botan-rs/issues/82 + BOTAN_CONFIGURE_LINK_METHOD: copy steps: - uses: actions/checkout@v4 with: persist-credentials: false + - uses: egor-tensin/vs-shell@v2 + with: + arch: amd64 - name: Install Rust uses: dtolnay/rust-toolchain@master with: diff --git a/Cargo.toml b/Cargo.toml index 52b80769..ed628ecc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,13 +36,10 @@ features = ["x509-parser"] openssl = "0.10" x509-parser = { version = "0.15", features = ["verify"] } rustls-webpki = { version = "0.101.0", features = ["std"] } +botan = { version = "0.10", features = ["vendored"] } rand = "0.8" rsa = "0.9" -[target.'cfg(not(windows))'.dev-dependencies] -botan = { version = "0.10", features = ["vendored"] } - - # This greatly speeds up rsa key generation times # (only applies to the dev-dependency because cargo # ignores profile overrides for non leaf packages) diff --git a/tests/botan.rs b/tests/botan.rs index 1ea09e14..99d2a8ed 100644 --- a/tests/botan.rs +++ b/tests/botan.rs @@ -1,4 +1,4 @@ -#![cfg(all(feature = "x509-parser", not(windows)))] +#![cfg(feature = "x509-parser")] use rcgen::DnValue; use rcgen::{BasicConstraints, Certificate, CertificateParams, DnType, IsCa};