@@ -240,9 +240,15 @@ jobs:
240240 matrix :
241241 os :
242242 - ubuntu-22.04
243+ - windows-2022
243244 arch :
244245 - x86_64
245246 node-version : [20.x]
247+ is-release :
248+ - ${{ startsWith(github.ref, 'refs/tags/v') }}
249+ exclude :
250+ - os : windows-2022
251+ is-release : false
246252 steps :
247253 - name : Checkout
248254 uses : actions/checkout@v4
@@ -260,24 +266,51 @@ jobs:
260266 manylinux : " false"
261267 skip_cache : ${{ steps.config-step.outputs.SKIP_CACHE }}
262268
269+ - run : echo "${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}" >> $env:GITHUB_PATH
270+ if : ${{ runner.os == 'Windows' }}
271+
263272 - name : Rust Build
264273 run : pnpm run build
274+ if : ${{ !contains(matrix.os, 'windows') }}
265275 env :
266276 PACKAGE : " perspective-rs"
267277 PSP_ROOT_DIR : ${{ github.workspace }}
268278
279+ - name : Python Build (Windows)
280+ run : |
281+ New-Item -ItemType Directory -Path $env:CARGO_TARGET_DIR -Force
282+ pnpm run build
283+ if : ${{ contains(matrix.os, 'windows') }}
284+ env :
285+ CARGO_TARGET_DIR : D:\psp-rust
286+ PSP_ROOT_DIR : ${{ github.workspace }}
287+ VCPKG_ROOT : ${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}
288+ PACKAGE : " perspective-rs"
289+
269290 - name : Rust Test
291+ if : ${{ !contains(matrix.os, 'windows') }}
270292 run : pnpm run test
271293 env :
272294 PACKAGE : " perspective-rs"
273295 PSP_ROOT_DIR : ${{ github.workspace }}
274296
297+ - name : Rust Test (Windows)
298+ run : |
299+ New-Item -ItemType Directory -Path $env:CARGO_TARGET_DIR -Force
300+ pnpm run test
301+ if : ${{ contains(matrix.os, 'windows') }}
302+ env :
303+ CARGO_TARGET_DIR : D:\psp-rust
304+ PSP_ROOT_DIR : ${{ github.workspace }}
305+ VCPKG_ROOT : ${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}
306+ PACKAGE : " perspective-rs"
307+
275308 - name : Package
276- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
309+ if : ${{ startsWith(github.ref, 'refs/tags/v') && !contains(matrix.os, 'windows') }}
277310 run : cargo package --allow-dirty -p perspective -p perspective-viewer -p perspective-js -p perspective-client -p perspective-server -p perspective-python
278311
279312 - uses : actions/upload-artifact@v4
280- if : ${{ startsWith(github.ref, 'refs/tags/v') }}
313+ if : ${{ startsWith(github.ref, 'refs/tags/v') && !contains(matrix.os, 'windows') }}
281314 with :
282315 name : perspective-rust
283316 path : rust/target/package/*.crate
0 commit comments