Skip to content

Commit

Permalink
Enable botan CI on windows (#125)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
est31 and cpu authored Sep 10, 2023
1 parent 163b8d4 commit 73cbec9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/botan.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down

0 comments on commit 73cbec9

Please sign in to comment.