Skip to content

Commit ffbd2af

Browse files
committed
ci: test all supported windows-sys versions
1 parent 0955c52 commit ffbd2af

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
build: [stable, msrv-linux, msrv-windows, beta, nightly, macos, windows]
17+
build: [stable, msrv-linux, msrv-windows, beta, nightly, macos, windows, windows-sys-0.60, windows-sys-0.61]
1818
include:
1919
- build: stable
2020
os: ubuntu-latest
@@ -25,6 +25,7 @@ jobs:
2525
- build: msrv-windows
2626
os: windows-latest
2727
rust: 1.70.0
28+
pin-windows-sys: '0.60.2'
2829
- build: beta
2930
os: ubuntu-latest
3031
rust: beta
@@ -37,11 +38,22 @@ jobs:
3738
- build: windows
3839
os: windows-latest
3940
rust: stable
41+
pin-windows-sys: '' # test latest compatible windows-sys version
42+
- build: windows-sys-0.61
43+
os: windows-latest
44+
rust: stable
45+
pin-windows-sys: '0.61.2'
46+
- build: windows-sys-0.60
47+
os: windows-latest
48+
rust: stable
49+
pin-windows-sys: '0.60.2'
4050
steps:
4151
- uses: actions/checkout@v4
4252
- uses: dtolnay/rust-toolchain@master
4353
with:
4454
toolchain: ${{ matrix.rust }}
55+
- if: ${{ matrix.pin-windows-sys != '' }}
56+
run: cargo update -p windows-sys --precise ${{ matrix.pin-windows-sys }}
4557
- uses: taiki-e/install-action@cargo-hack
4658
- name: Run tests
4759
run: cargo hack test --feature-powerset && cargo hack test --feature-powerset --release

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ features = ["all"]
5353
libc = "0.2.172"
5454

5555
[target.'cfg(windows)'.dependencies.windows-sys]
56+
# when changing this range, adjust the CI matrix so all supported versions are tested
5657
version = ">=0.60, <0.62"
5758
features = [
5859
"Win32_Foundation",

0 commit comments

Comments
 (0)