Skip to content

Commit f871486

Browse files
committed
add appveyor CI for UWP targets
1 parent e050963 commit f871486

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ stdweb = { version = "0.4.18", optional = true }
3030

3131
[features]
3232
std = []
33+
# enables support for UWP targets, bumps MSRV to Rust 1.33
34+
uwp = []

appveyor.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ environment:
2222
matrix:
2323
- TARGET: x86_64-pc-windows-msvc
2424
- TARGET: i686-pc-windows-msvc
25+
- TARGET: x86_64-uwp-windows-gnu
26+
CHANNEL: nightly
27+
- TARGET: i686-uwp-windows-gnu
28+
CHANNEL: nightly
2529
install:
2630
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
27-
- rustup-init.exe -y --default-host %TARGET%
31+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %CHANNEL%
2832
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
2933
- rustc -V
3034
- cargo -V
3135

3236
build: false
3337

3438
test_script:
35-
- cargo test
36-
- cargo test --examples
39+
- cargo test --features=uwp
40+
- cargo test --examples --features=uwp

src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,7 @@ cfg_if! {
224224
#[path = "solaris_illumos.rs"] mod imp;
225225
} else if #[cfg(target_os = "wasi")] {
226226
#[path = "wasi.rs"] mod imp;
227-
} else if #[cfg(any(
228-
// target_vendor was stabilized only in Rust 1.33
229-
target = "i686-uwp-windows-gnu",
230-
target = "x86_64-uwp-windows-gnu",
231-
target = "aarch64-uwp-windows-msvc",
232-
target = "x86_64-uwp-windows-msvc",
233-
target = "i686-uwp-windows-msvc",
234-
))] {
227+
} else if #[cfg(all(feature = "uwp", target_vendor = "uwp"))] {
235228
#[path = "windows_uwp.rs"] mod imp;
236229
} else if #[cfg(windows)] {
237230
#[path = "windows.rs"] mod imp;

0 commit comments

Comments
 (0)