-
Notifications
You must be signed in to change notification settings - Fork 193
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
CSharp - Update for conan V2 and build for 3.8.0 (+ add arm64) #5211
Conversation
…config Ubuntu: got “PCRE regex matching is not available in this SWIG build” ?
Gonna close this PR temporarily so I don't get the cppcheck/clangformat running for no reason on it |
…lt, sometimes conan-release?
Alright 3.8.0 packages, including the new osx-arm64 are available on this run: https://github.com/NREL/OpenStudio/actions/runs/9189117111/job/25275666930 @kbenne I hosted the windows (that contains both win32 and x64) on https://www.nuget.org/packages/OpenStudio/3.8.0 @MingboPeng FYI if you want to upload them to your nuget packages per platform. |
@@ -5,7 +5,7 @@ | |||
"websocketpp/0.8.2#842a0419153a8aa52f3ea3a1da557d38%1695972005.713", | |||
"tinygltf/2.5.0#65c28d0a4c3cbd4ef92b08b59df769da%1701621757.442", | |||
"termcap/1.3.1#1986f84bf21dd07ea774b027a3201fcb%1678542508.75", | |||
"swig/4.1.1#8f418438101ef7712d52a9fe739d32f9%1707838298.077707", | |||
"swig/4.1.1#2bb5c79321cbb05bcab525c690d9bf74%1716336914.081294", |
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.
Tweaked and built from jmarrec/conan-center-index@52e12ba
"with_ruby": True, | ||
"with_python": True, | ||
"with_csharp": False, |
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.
New options to allow disabling ruby (won't build on win32), and tweak the cmake vars as well.
// Ignore Json::Value return type (toJSON / fromJSON / valueAsJSON are globally ignored already) | ||
%ignore openstudio::measure::OSArgument::defaultValueAsJSON; | ||
%ignore openstudio::measure::OSArgument::domainAsJSON; | ||
%ignore openstudio::measure::OSRunner::getArgumentValues; | ||
%ignore openstudio::measure::OSRunner::getPastStepValuesForMeasure; | ||
%ignore openstudio::measure::OSRunner::getPastStepValuesForName; |
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.
Ignore new Json::Value returns
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.
New
<Message Text="DEBUGGING: OS=$(OS) TargetFramework=$(TargetFramework) Architecture=$(Architecture) Platform=$(Platform) RID=$(Rid)" /> | ||
<Message Text="DEBUGGING: is_osx1=$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX))) is_osx2=$([MSBuild]::IsOsPlatform('OSX'))" /> | ||
<Message Text="DEBUGGING: System.Runtime.InteropServices.RuntimeInformation: OSArchitecture=$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture), RuntimeIdentifier=$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier), OSDescription=$([System.Runtime.InteropServices.RuntimeInformation]::OSDescription)" /> | ||
<PropertyGroup> | ||
<Rid>$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</Rid> | ||
<IsLinux>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))</IsLinux> | ||
<IsDarwin>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))</IsDarwin> | ||
<IsWindows>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))</IsWindows> | ||
<IsArm64>False</IsArm64> | ||
<IsArm64 Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64' ">true</IsArm64> | ||
</PropertyGroup> | ||
<Message Text="DEBUGGING: Rid=$(Rid), IsLinux=$(IsLinux), IsDarwin=$(IsDarwin), IsWindows=$(IsWindows), IsArm64=$(IsArm64), IsNotArm64=$(IsNotArm64)" /> | ||
<Message Condition=" $(IsDarwin) And !$(IsArm64) " Text="Darwin not arm64" /> | ||
<Message Condition=" $(IsDarwin) And $(IsArm64) " Text="Darwin arm64" /> | ||
<!-- for Windows --> | ||
<ItemGroup Condition="'$(OS)' == 'Windows_NT'"> | ||
<ItemGroup Condition=" $(IsWindows) "> | ||
<TfmSpecificPackageFile Include="../Products/Release/openstudio*csharp.dll" PackagePath="lib/$(TargetFramework)" /> | ||
<TfmSpecificPackageFile Include="../Products/Release/openstudiolib.dll" PackagePath="lib/$(TargetFramework)" /> | ||
</ItemGroup> | ||
|
||
<!-- for Linux --> | ||
<ItemGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' "> | ||
<ItemGroup Condition=" $(IsLinux) "> | ||
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.so" PackagePath="runtimes/linux-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/*openstudiolib.so" PackagePath="runtimes/linux-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/OpenStudio-linux-x64.targets" PackagePath="build/OpenStudio.targets" /> | ||
</ItemGroup> | ||
|
||
<!-- for Mac --> | ||
<ItemGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' "> | ||
<ItemGroup Condition=" $(IsDarwin) And !$(IsArm64) "> | ||
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.dylib" PackagePath="runtimes/osx-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/*openstudiolib.dylib" PackagePath="runtimes/osx-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/OpenStudio-osx-x64.targets" PackagePath="build/OpenStudio.targets" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" $(IsDarwin) And $(IsArm64) "> | ||
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.dylib" PackagePath="runtimes/$(Rid)/native" /> | ||
<TfmSpecificPackageFile Include="../Products/*openstudiolib.dylib" PackagePath="runtimes/$(Rid)/native" /> | ||
<TfmSpecificPackageFile Include="../Products/OpenStudio-$(Rid).targets" PackagePath="build/OpenStudio.targets" /> | ||
</ItemGroup> |
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.
New to support osx-arm64
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.dylib" PackagePath="runtimes/osx-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/*openstudiolib.dylib" PackagePath="runtimes/osx-x64/native" /> | ||
<TfmSpecificPackageFile Include="../Products/OpenStudio-osx-x64.targets" PackagePath="build/OpenStudio.targets" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" $(IsDarwin) And $(IsArm64) "> | ||
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.dylib" PackagePath="runtimes/$(Rid)/native" /> |
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.
Note that for mac, I could just use a single block... But I was wary of maybe breaking something, and after about 25 runs of the C# workflow (some of which I have to wait almost 2 hours to see if breaks), I just didn't want to risk it
<ItemGroup Condition=" $(IsDarwin) ">
<TfmSpecificPackageFile Include="../Products/*openstudio*csharp.dylib" PackagePath="runtimes/$(Rid)/native" />
<TfmSpecificPackageFile Include="../Products/*openstudiolib.dylib" PackagePath="runtimes/$(Rid)/native" />
<TfmSpecificPackageFile Include="../Products/OpenStudio-$(Rid).targets" PackagePath="build/OpenStudio.targets" />
</ItemGroup>
@@ -5,6 +5,7 @@ | |||
// ignores toJSON/fromJSON globally | |||
%rename("$ignore", regextarget=1, fullname=1) "openstudio::.*::toJSON$"; | |||
%rename("$ignore", regextarget=1, fullname=1) "openstudio::.*::fromJSON$"; | |||
%rename("$ignore", regextarget=1, fullname=1) "openstudio::.*::valueAsJSON$"; |
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.
New global ignore
Thanks @jmarrec, done! The new NuGet packages are added per platform including arm64 for mac. |
Pull request overview
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.