iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.54k stars 565 forks source link

Add PowerShell Windows CI #15560

Open bjacob opened 9 months ago

bjacob commented 9 months ago

In #15552, we just reverted #15462 because it broke a downstream Windows build using PowerShell.

This was only caught in the downstream 3 days after it was merged in IREE, so I assume that IREE's own Windows CI, including postsubmit, is /not/ using PowerShell.

Since we care about not breaking PowerShell, maybe we should exercise it in IREE's own Windows CI.

Maybe we don't need to test both --- with Bash already well tested by other platforms, maybe we don't need Windows CI with anything else than PowerShell.

EDIT: I guess I can see why we're running Bash --- all our scripts are written in Bash. So maybe do in fact create a separate PowerShell CI job.

@ScottTodd @pzread @RoboTux @benvanik

ScottTodd commented 9 months ago

Windows CI jobs currently use bash instead of the default pwsh: https://github.com/openxla/iree/blob/41aeb02dcb406329ee76f0593f9559ed7566c54a/.github/workflows/ci.yml#L112-L118

I personally prefer bash in almost all scenarios, and using the same shell as on other platforms makes maintenance easier (no need to create separate entry points to the same script or entirely parallel versions, developers rarely need to test on the full set of platforms). We do have a few uses of powershell in https://github.com/openxla/iree/blob/main/.github/workflows/build_package.yml though.

Looks like the main thing we want coverage for is CMake configure -> CMake build... ideally for the full project including the compiler.

I'm not sure if it's a great example to follow, but Emscripten has foo/foo.bat/foo.py files for each tool.