build: Add msbuild flag to reference projs or local nugets
So we can use project refs for dev builds, and package refs for releases.
This commit is contained in:
1 parent
6568c29ad4
commit
bb1e7c30c8
18 files changed
+230
-101
No files matched your search
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -11,10 +12,20 @@
|
||||
<PackageReference Include="YaccLexTools" Version="1.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ExpressionCore" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.Spark.Core" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup Label="ArithmeticExpression">
|
||||
<Scanner Include="ArithmeticExpressionTokens.lex" />
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -11,10 +12,20 @@
|
||||
<PackageReference Include="YaccLexTools" Version="1.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ExpressionCore" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.Spark.Core" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup>
|
||||
<Scanner Include="BooleanExpressionTokens.lex" />
|
||||
|
||||
@@ -4,16 +4,27 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="YaccLexTools" Version="1.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataStreamCore\DataStreamCore.csproj" />
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataStreamCore\DataStreamCore.csproj" />
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DataStreamCore" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="ExpressionCore" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup Label="ColumnExpression">
|
||||
<Scanner Include="ColumnExpressionTokens.lex" />
|
||||
|
||||
@@ -4,16 +4,27 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="YaccLexTools" Version="1.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataStreamCore\DataStreamCore.csproj" />
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataStreamCore\DataStreamCore.csproj" />
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DataStreamCore" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="ExpressionCore" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup Label="ColumnSortExpression">
|
||||
<Scanner Include="ColumnSortExpressionTokens.lex" />
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -4,15 +4,25 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="YaccLexTools" Version="1.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExpressionCore\ExpressionCore.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ExpressionCore" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup Label="ColumnMapExpression">
|
||||
<Scanner Include="ColumnMapExpressionTokens.lex" />
|
||||
|
||||
@@ -3,17 +3,9 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ArithmeticExpressions\ArithmeticExpressions.csproj" />
|
||||
<ProjectReference Include="..\BaseUtilities\BaseUtilities.csproj" />
|
||||
<ProjectReference Include="..\BooleanExpressions\BooleanExpressions.csproj" />
|
||||
<ProjectReference Include="..\Bts.ColumnExpressions\Bts.ColumnExpressions.csproj" />
|
||||
<ProjectReference Include="..\Bts.ColumnSortExpressions\Bts.ColumnSortExpressions.csproj" />
|
||||
<ProjectReference Include="..\DataStreamExpressions\DataStreamExpressions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.57" />
|
||||
<PackageReference Include="IronPython" Version="3.4.2" />
|
||||
@@ -25,4 +17,27 @@
|
||||
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ArithmeticExpressions\ArithmeticExpressions.csproj" />
|
||||
<ProjectReference Include="..\BaseUtilities\BaseUtilities.csproj" />
|
||||
<ProjectReference Include="..\BooleanExpressions\BooleanExpressions.csproj" />
|
||||
<ProjectReference Include="..\Bts.ColumnExpressions\Bts.ColumnExpressions.csproj" />
|
||||
<ProjectReference Include="..\Bts.ColumnSortExpressions\Bts.ColumnSortExpressions.csproj" />
|
||||
<ProjectReference Include="..\DataStreamExpressions\DataStreamExpressions.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ArithmeticExpressions" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="BaseUtilities" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="BooleanExpressions" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.ColumnExpressions" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.ColumnSortExpressions" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="DataStreamExpressions" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -4,6 +4,7 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>disable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -13,8 +14,17 @@
|
||||
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PubSub\PubSub.csproj" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PubSub\PubSub.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="PubSub" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
<ProjectReference Include="..\Bts.Net\Bts.Net.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Core\Bts.Spark.Core.csproj" />
|
||||
<ProjectReference Include="..\Bts.Net\Bts.Net.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bts.Spark.Core" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.Net" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -4,18 +4,30 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>$(SparkVersion)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Api\Bts.Spark.Api.csproj" />
|
||||
<ProjectReference Include="..\DataStream\DataStream.csproj" />
|
||||
<ProjectReference Include="..\PubSub\PubSub.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
|
||||
<PackageReference Include="OpenAI" Version="2.0.0" />
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Api\Bts.Spark.Api.csproj" />
|
||||
<ProjectReference Include="..\DataStream\DataStream.csproj" />
|
||||
<ProjectReference Include="..\PubSub\PubSub.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bts.Spark.Api" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="DataStream" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="PubSub" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -36,6 +36,23 @@
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Api\Bts.Spark.Api.csproj" />
|
||||
<ProjectReference Include="..\..\DataStreamSuite\Bts.Extensions.Hosting\Bts.Extensions.Hosting.csproj" />
|
||||
<ProjectReference Include="..\..\DataStreamSuite\SharedStreams\SharedStreams.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bts.Spark.Api" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="Bts.Extensions.Hosting" Version="$(SparkVersion)" />
|
||||
<PackageReference Include="SharedStreams" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Google.Protobuf" Version="3.24.3" />
|
||||
@@ -59,12 +76,6 @@
|
||||
<PackageReference Include="System.Reactive.PlatformServices" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Api\Bts.Spark.Api.csproj" />
|
||||
<ProjectReference Include="..\..\DataStreamSuite\SharedStreams\SharedStreams.csproj" />
|
||||
<ProjectReference Include="..\..\DataStreamSuite\Bts.Extensions.Hosting\Bts.Extensions.Hosting.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="**/*.ico" />
|
||||
<Resource Include="**/*.png" />
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<PackageOutputPath>$(OutputPath)\net8.0</PackageOutputPath>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
|
||||
|
||||
<Authors>Blue Trading Systems</Authors>
|
||||
<Company>Blue Trading Systems</Company>
|
||||
@@ -27,32 +26,17 @@
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- $(SparkRoot) is something we define on our build at BTS, if it's empty, this project file is in the wild-->
|
||||
<ItemGroup Condition=" '$(SparkRoot)' != '' ">
|
||||
<ProjectReference Include="../../cs/Bts.Spark.Api/Bts.Spark.Api.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(SparkRoot)' != '' ">
|
||||
<None Include="README.md" pack="true" PackagePath="." />
|
||||
<None Include="doc/**" pack="true" PackagePath=".\doc\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences" Condition=" '$(SparkRoot)' != '' ">
|
||||
<ItemGroup>
|
||||
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
|
||||
<BuildOutputInPackage Include="$(OutputPath)..\net8.0\libspark.dll" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- deployed sdk build net8.0 -->
|
||||
<ItemGroup Condition=" '$(SparkRoot)' == '' and '$(TargetFramework)' == 'net8.0'">
|
||||
<Reference Include="spark_api">
|
||||
<HintPath>..\..\lib\net8.0\Bts.Spark.Api.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="copy_lib_deployed" AfterTargets="PostBuildEvent" Condition=" '$(SparkRoot)' == '' ">
|
||||
<Copy SourceFiles="..\..\lib\net8.0\libspark.dll" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cs\Bts.Spark.Api\Bts.Spark.Api.csproj" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bts.Spark.Api" Version="$(SparkVersion)" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -32,21 +32,39 @@
|
||||
</Proto>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Label="NativeAssets">
|
||||
<!-- Windows -->
|
||||
<Content Condition="Exists('$(SparkNativeWindowsLib)')" Include="$(SparkNativeWindowsLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>runtimes/win-x64/native/libspark.dll</TargetPath>
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/win-x64/native</PackagePath>
|
||||
</Content>
|
||||
<!-- Linux -->
|
||||
<Content Condition="Exists('$(SparkNativeLinuxLib)')" Include="$(SparkNativeLinuxLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>runtimes/linux-x64/native/libspark.so</TargetPath>
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(UseProjectRefs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<!-- Windows -->
|
||||
<Content Condition="Exists('$(SparkNativeWindowsLib)')" Include="$(SparkNativeWindowsLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Pack>false</Pack>
|
||||
</Content>
|
||||
<!-- Linux -->
|
||||
<Content Condition="Exists('$(SparkNativeLinuxLib)')" Include="$(SparkNativeLinuxLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Pack>false</Pack>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<!-- Windows -->
|
||||
<Content Condition="Exists('$(SparkNativeWindowsLib)')" Include="$(SparkNativeWindowsLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>runtimes/win-x64/native/libspark.dll</TargetPath>
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/win-x64/native</PackagePath>
|
||||
</Content>
|
||||
<!-- Linux -->
|
||||
<Content Condition="Exists('$(SparkNativeLinuxLib)')" Include="$(SparkNativeLinuxLib)">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>runtimes/linux-x64/native/libspark.so</TargetPath>
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
</Project>
|
||||
@@ -29,6 +29,7 @@ def _get_arg_parser():
|
||||
)
|
||||
add_toggle_opt(parser, "cpp", help="Build c++ libs")
|
||||
add_toggle_opt(parser, "cs", help="Build c# libs")
|
||||
add_toggle_opt(parser, "csproj-refs", help="Use local csproj refs (instead of nugets)")
|
||||
parser.add_argument(
|
||||
"--spark-version",
|
||||
help="The version identifier to use (by default, uses git to generate semantic version number)"
|
||||
@@ -50,6 +51,7 @@ def _get_arg_parser():
|
||||
clean=False,
|
||||
cpp=True,
|
||||
cs=True,
|
||||
csproj_refs=True,
|
||||
verbosity=1,
|
||||
)
|
||||
return parser
|
||||
@@ -112,7 +114,7 @@ def _main():
|
||||
if args.cpp:
|
||||
run(f"cmake --build build/{cmake_preset} --target clean")
|
||||
if args.cs:
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version}")
|
||||
if args.cpp:
|
||||
run(f"cmake --preset {cmake_preset} -DCMAKE_MESSAGE_LOG_LEVEL={cmake_verbosity}")
|
||||
cmake_build_cmd = f"cmake --build build/{cmake_preset} --config {cmake_config}"
|
||||
@@ -120,7 +122,7 @@ def _main():
|
||||
cmake_build_cmd += f" -j {cmake_jobs}"
|
||||
run(cmake_build_cmd)
|
||||
if args.cs:
|
||||
run(f"dotnet build {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet build {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -27,6 +27,7 @@ def _get_arg_parser():
|
||||
)
|
||||
add_toggle_opt(parser, "cpp", help="Build c++ libs")
|
||||
add_toggle_opt(parser, "cs", help="Build c# libs")
|
||||
add_toggle_opt(parser, "csproj-refs", help="Use local csproj refs (instead of nugets)")
|
||||
parser.add_argument(
|
||||
"--verbosity",
|
||||
metavar="{0-5}",
|
||||
@@ -44,6 +45,7 @@ def _get_arg_parser():
|
||||
clean=False,
|
||||
cpp=True,
|
||||
cs=True,
|
||||
csproj_refs=True,
|
||||
verbosity=1,
|
||||
)
|
||||
return parser
|
||||
@@ -107,7 +109,7 @@ def build(args):
|
||||
if args.cpp:
|
||||
run(f"cmake --build build/{cmake_preset} --target clean")
|
||||
if args.cs:
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version}")
|
||||
if args.cpp:
|
||||
run(f"cmake --preset {cmake_preset} -DCMAKE_MESSAGE_LOG_LEVEL={cmake_verbosity}")
|
||||
cmake_build_cmd = f"cmake --build build/{cmake_preset} --config {cmake_config}"
|
||||
@@ -115,7 +117,7 @@ def build(args):
|
||||
cmake_build_cmd += f" -j {cmake_jobs}"
|
||||
run(cmake_build_cmd)
|
||||
if args.cs:
|
||||
run(f"dotnet build {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet build {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version}")
|
||||
|
||||
|
||||
def _main():
|
||||
|
||||
@@ -15,6 +15,7 @@ class BuildArgs:
|
||||
clean: bool = False,
|
||||
cpp: bool = True,
|
||||
cs: bool = True,
|
||||
csproj_refs: bool = True,
|
||||
verbosity: int = 1,
|
||||
dry_run: bool = False,
|
||||
publish: bool = False,
|
||||
@@ -24,6 +25,7 @@ class BuildArgs:
|
||||
self.clean = clean
|
||||
self.cpp = cpp
|
||||
self.cs = cs
|
||||
self.csproj_refs = csproj_refs
|
||||
self.verbosity = verbosity
|
||||
self.dry_run = dry_run
|
||||
self.dotnet_verbosity = at_bounded(
|
||||
@@ -60,6 +62,7 @@ def _get_arg_parser():
|
||||
)
|
||||
add_toggle_opt(parser, "cpp", help="Build c++ libs")
|
||||
add_toggle_opt(parser, "cs", help="Build c# libs")
|
||||
add_toggle_opt(parser, "csproj-refs", help="Use local csproj refs (instead of nugets)")
|
||||
parser.add_argument(
|
||||
"--spark-version",
|
||||
help="The version identifier to use (by default, uses git to generate semantic version number)"
|
||||
@@ -82,6 +85,7 @@ def _get_arg_parser():
|
||||
clean=defaults.clean,
|
||||
cpp=True,
|
||||
cs=True,
|
||||
csproj_refs=True,
|
||||
verbosity=defaults.verbosity,
|
||||
dry_run=defaults.dry_run,
|
||||
)
|
||||
@@ -117,13 +121,13 @@ def build(args: BuildArgs):
|
||||
if args.cpp:
|
||||
run(f'{cmake_build_cmd} --target clean')
|
||||
if args.cs:
|
||||
run(f"dotnet clean spark_client.sln -c {dotnet_config} -v {args.dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet clean spark_client.sln -c {dotnet_config} -v {args.dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p SparkVersion={spark_version}")
|
||||
if args.cpp:
|
||||
run(cmake_configure_cmd)
|
||||
run(cmake_build_cmd)
|
||||
if args.cs:
|
||||
build_action = "publish" if args.publish else "build"
|
||||
run(f"dotnet {build_action} spark_client.sln -c {dotnet_config} -v {args.dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet {build_action} spark_client.sln -c {dotnet_config} -v {args.dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p SparkVersion={spark_version}")
|
||||
|
||||
|
||||
def _main():
|
||||
@@ -134,6 +138,7 @@ def _main():
|
||||
clean=cli_args.clean,
|
||||
cpp=cli_args.cpp,
|
||||
cs=cli_args.cs,
|
||||
csproj_refs=cli_args.csproj_refs,
|
||||
verbosity=cli_args.verbosity,
|
||||
dry_run=cli_args.dry_run,
|
||||
version=cli_args.spark_version,
|
||||
|
||||
@@ -57,6 +57,7 @@ class PublishArgs:
|
||||
configuration: str = "release",
|
||||
cmake_jobs: Optional[int] = None,
|
||||
clean: bool = False,
|
||||
csproj_refs: bool = True,
|
||||
verbosity: int = 2,
|
||||
dry_run: bool = False,
|
||||
output: Optional[str] = None,
|
||||
@@ -67,6 +68,7 @@ class PublishArgs:
|
||||
self.configuration = configuration
|
||||
self.cmake_jobs = cmake_jobs
|
||||
self.clean = clean
|
||||
self.csproj_refs = csproj_refs
|
||||
self.verbosity = verbosity
|
||||
self.dry_run = dry_run
|
||||
self.dotnet_verbosity = at_bounded(
|
||||
@@ -173,7 +175,7 @@ def publish(args: PublishArgs):
|
||||
run(
|
||||
f"cmake --build build/{cmake_preset} --config {cmake_config} --target clean"
|
||||
)
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version}")
|
||||
run(f"dotnet clean {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version}")
|
||||
run(f"cmake --preset {cmake_preset} -DCMAKE_MESSAGE_LOG_LEVEL={cmake_verbosity}")
|
||||
cmake_build_cmd = (
|
||||
f"cmake --build build/{cmake_preset} --config {cmake_config} --target install"
|
||||
@@ -182,7 +184,7 @@ def publish(args: PublishArgs):
|
||||
cmake_build_cmd += f" -j {cmake_jobs}"
|
||||
run(cmake_build_cmd)
|
||||
run(
|
||||
f"dotnet publish {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:SparkVersion={spark_version} -f {args.framework} -r {args.runtime} --sc"
|
||||
f"dotnet publish {sln} -c {dotnet_config} -v {dotnet_verbosity} -p:UseProjectRefs={str(args.csproj_refs).lower()} -p:SparkVersion={spark_version} -f {args.framework} -r {args.runtime} --sc"
|
||||
)
|
||||
# Copy cpp bins
|
||||
print(f"[pseudo shell] cp -r install/{cmake_preset}/bin/* {publish_dir}")
|
||||
@@ -202,6 +204,7 @@ def _main():
|
||||
PublishArgs(
|
||||
configuration=args.configuration,
|
||||
clean=args.clean,
|
||||
csproj_refs=args.csproj_refs,
|
||||
cmake_jobs=args.cmake_jobs,
|
||||
verbosity=args.verbosity,
|
||||
dry_run=args.dry_run,
|
||||
|
||||
Reference in new issue
Block a user