microsoft / windows-rs

Rust for Windows
https://kennykerr.ca/rust-getting-started/
Apache License 2.0
10.36k stars 486 forks source link

Switch to `windows-2022` hosted runners #3056

Closed kennykerr closed 4 months ago

kennykerr commented 4 months ago

In an attempt to fix #3054 build issues, I'm testing whether we can switch to the latest GitHub runners so that we can build with VS 2022 rather than 2019.

I expect action.yml will also need to be "fixed" as it has some hardcoded paths.

kennykerr commented 4 months ago

@riverar lib.yml uses vswhere - I assume we can do the same in action.yml to avoid these hardcoded paths?

https://github.com/microsoft/windows-rs/blob/40d35fabf553a63c577969e70b4e0ff70e4e11c6/.github/workflows/lib.yml#L63

riverar commented 4 months ago

We could, yup. I'm not really a fan of vswhere honestly but that's me.

kennykerr commented 4 months ago

I don't really care - just noticed that's what lib.yml does - I don't have it installed locally for some reason so I assume it doens't even come with Visual Studio.

kennykerr commented 4 months ago

It would just be nice not to have to hardcode these paths.

ChrisDenton commented 4 months ago

vswhere should always be installed with visual studio. And always in the same path: %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe source: https://github.com/Microsoft/vswhere?tab=readme-ov-file#visual-studio-locator

riverar commented 4 months ago

Thanks!