| 1 |
on: [push, pull_request] |
| 2 |
|
| 3 |
name: CI Windows |
| 4 |
|
| 5 |
|
| 6 |
permissions: |
| 7 |
contents: read |
| 8 |
|
| 9 |
jobs: |
| 10 |
test-default-windows: |
| 11 |
name: Windows vcpkg (default) |
| 12 |
runs-on: windows-latest |
| 13 |
env: |
| 14 |
VCPKGRS_DYNAMIC: 1 |
| 15 |
VCPKG_DEFAULT_TRIPLET: x64-windows |
| 16 |
VCPKG_ROOT: C:\vcpkg |
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v6 |
| 19 |
- name: Setup vcpkg libxml2 Cache |
| 20 |
uses: actions/cache@v4 |
| 21 |
id: vcpkg-cache |
| 22 |
with: |
| 23 |
path: C:\vcpkg |
| 24 |
key: vcpkg-libxml2 |
| 25 |
- name: Install libxml2 with vcpkg |
| 26 |
run: | |
| 27 |
vcpkg install libxml2:x64-windows |
| 28 |
vcpkg integrate install |
| 29 |
- name: run tests |
| 30 |
run: cargo test |
| 31 |
|
| 32 |
test-mingw64-windows: |
| 33 |
name: Windows (mingw64) |
| 34 |
runs-on: windows-latest |
| 35 |
defaults: |
| 36 |
run: |
| 37 |
shell: msys2 {0} |
| 38 |
steps: |
| 39 |
- uses: actions/checkout@v6 |
| 40 |
- uses: msys2/setup-msys2@v2 |
| 41 |
with: |
| 42 |
path-type: minimal |
| 43 |
release: false |
| 44 |
update: false |
| 45 |
msystem: MINGW64 |
| 46 |
install: >- |
| 47 |
mingw64/mingw-w64-x86_64-pkg-config |
| 48 |
mingw64/mingw-w64-x86_64-libxml2 |
| 49 |
- name: Install stable windows-gnu Rust toolchain |
| 50 |
uses: dtolnay/rust-toolchain@master |
| 51 |
with: |
| 52 |
toolchain: stable-x86_64-pc-windows-gnu |
| 53 |
targets: x86_64-pc-windows-gnu |
| 54 |
- name: Ensure mingw64 pkg-config is in path |
| 55 |
run: echo "C:\msys64\mingw64\bin" >> "$GITHUB_PATH" |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
- name: run tests |
| 63 |
shell: pwsh |
| 64 |
run: cargo test |