Skip to content

Commit 73cbec9

Browse files
est31cpu
andauthored
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 <daniel@binaryparadox.net>
1 parent 163b8d4 commit 73cbec9

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,18 @@ jobs:
4343

4444
build-windows:
4545
runs-on: windows-latest
46+
env:
47+
# botan doesn't build on windows if the source is
48+
# on a different drive than the artifacts
49+
# https://github.com/randombit/botan-rs/issues/82
50+
BOTAN_CONFIGURE_LINK_METHOD: copy
4651
steps:
4752
- uses: actions/checkout@v4
4853
with:
4954
persist-credentials: false
55+
- uses: egor-tensin/vs-shell@v2
56+
with:
57+
arch: amd64
5058
- name: Install Rust
5159
uses: dtolnay/rust-toolchain@master
5260
with:

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@ features = ["x509-parser"]
3636
openssl = "0.10"
3737
x509-parser = { version = "0.15", features = ["verify"] }
3838
rustls-webpki = { version = "0.101.0", features = ["std"] }
39+
botan = { version = "0.10", features = ["vendored"] }
3940
rand = "0.8"
4041
rsa = "0.9"
4142

42-
[target.'cfg(not(windows))'.dev-dependencies]
43-
botan = { version = "0.10", features = ["vendored"] }
44-
45-
4643
# This greatly speeds up rsa key generation times
4744
# (only applies to the dev-dependency because cargo
4845
# ignores profile overrides for non leaf packages)

tests/botan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(all(feature = "x509-parser", not(windows)))]
1+
#![cfg(feature = "x509-parser")]
22

33
use rcgen::DnValue;
44
use rcgen::{BasicConstraints, Certificate, CertificateParams, DnType, IsCa};

0 commit comments

Comments
 (0)