-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support WindowsServer (windows 10) environments #105
Conversation
Might this also be used to support Windows11 in the same way for #106? |
@sake92 I'm happy to add to your commit if I can get access to your branch. Seems like the addition of |
@jvanzyl yeah, I suppose. I pushed a commit for win11. To be honest I didn't test the whole build, but it should work. |
I've downloaded Windows10 and 11 so I'll try it here. I'm surprised there aren't Windows10/11 host options available in GitHub Actions given it runs on Azure. |
Windows Servers 2016..2022 are actually Windows10 based, as far as I can see in their docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were some minor issues with this PR I commented below.
Since there was some concurrent work done that includes a fix for this bug, this means that we can't merge this PR. However I want you to thank for looking into this!
@@ -311,7 +311,13 @@ private List<LibraryCandidate> initLibraryCandidates(List<Throwable> suppressedT | |||
} | |||
|
|||
private static String architectureAndOS() { | |||
return System.getProperty("os.arch") + "-" + System.getProperty("os.name").replaceAll(" ", ""); | |||
String osName = System.getProperty("os.name").replaceAll(" ", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this would crash if os.name
is null.
@@ -311,7 +311,13 @@ private List<LibraryCandidate> initLibraryCandidates(List<Throwable> suppressedT | |||
} | |||
|
|||
private static String architectureAndOS() { | |||
return System.getProperty("os.arch") + "-" + System.getProperty("os.name").replaceAll(" ", ""); | |||
String osName = System.getProperty("os.name").replaceAll(" ", ""); | |||
if (osName.toLowerCase().contains("windows") && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using toLowerCase
we should specify the locale (please be sure to test with mvn clean install -Pstrict
which should catch this)
return System.getProperty("os.arch") + "-" + System.getProperty("os.name").replaceAll(" ", ""); | ||
String osName = System.getProperty("os.name").replaceAll(" ", ""); | ||
if (osName.toLowerCase().contains("windows") && | ||
(osName.contains("2016") || osName.contains("2019") || osName.contains("2022"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd have to update this code whenever a newer version comes out, which I think we can do better.
Fixes #104