Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
run: |
dotnet build build\Stride.Android.slnf `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Android `
-p:StrideSkipUnitTests=true `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-assembly-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Build
run: |
dotnet build build\Stride.AssemblyProcessor.sln `
-restore -m:1 -nr:false `
-restore -nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StrideSkipUnitTests=true `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
dotnet build build\Stride.iOS.slnf `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=iOS `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
dotnet build build\Stride.Runtime.slnf `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Linux `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-vs-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Build
run: |
msbuild build\Stride.VisualStudio.sln `
-restore -m:1 -nr:false `
-restore -nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StrideSkipUnitTests=true `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
dotnet build build\Stride.sln `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Windows `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
dotnet build build\Stride.Runtime.slnf `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Windows `
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-linux-game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
dotnet build build\Stride.Tests.Game.GPU.slnf `
-p:StrideTestRuntimeIdentifier=linux-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatform=Linux `
Expand All @@ -75,7 +75,7 @@ jobs:
dotnet build build\Stride.Tests.Game.Linux.slnf `
-p:StrideTestRuntimeIdentifier=linux-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatform=Linux `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
dotnet build build\Stride.Tests.Simple.Linux.slnf `
-p:StrideTestRuntimeIdentifier=linux-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatform=Linux `
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-windows-game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
dotnet build build\Stride.Tests.Game.slnf `
-p:StrideTestRuntimeIdentifier=win-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Windows `
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
dotnet build build\Stride.Tests.Game.GPU.slnf `
-p:StrideTestRuntimeIdentifier=win-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Windows `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
dotnet build build\Stride.Tests.Simple.slnf `
-p:StrideTestRuntimeIdentifier=win-x64 `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }} `
-p:StridePlatforms=Windows `
Expand Down
2 changes: 1 addition & 1 deletion build/test-linux-gpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ foreach ($proj in $testProjects) {
Write-Host "=== Step 2: Build (targeting Linux/Vulkan) ===" -ForegroundColor Cyan
dotnet build build\Stride.Tests.Game.GPU.slnf `
-p:StrideNativeBuildMode=Clang `
-m:1 -nr:false `
-nr:false `
-v:m -p:WarningLevel=0 `
-p:Configuration=Debug `
-p:StridePlatform=Linux `
Expand Down
6 changes: 6 additions & 0 deletions sources/sdk/Stride.Build.Sdk.Tests/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<!-- Mark as test project for dotnet test -->
<IsTestProject>true</IsTestProject>

<!-- Test projects don't need to produce NuGet packages. Local property only — do NOT
let it propagate to referenced projects (e.g. Stride.Core.Assets.CompilerApp), which
still need their own .nupkg in bin\packages\ for the test's AssetCompiler run. The
ProjectReference metadata below adds this to GlobalPropertiesToRemove to be sure. -->
<StrideSkipAutoPack>true</StrideSkipAutoPack>

<!-- Tests are executables (for asset compilation, native libs, etc.) -->
<OutputType>WinExe</OutputType>
<StrideIsExecutable>true</StrideIsExecutable>
Expand Down
4 changes: 3 additions & 1 deletion sources/sdk/Stride.Build.Sdk.Tests/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
<ProjectReference Include="$(StrideRoot)sources\assets\Stride.Core.Assets.CompilerApp\Stride.Core.Assets.CompilerApp.csproj">
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<GlobalPropertiesToRemove>TargetFramework</GlobalPropertiesToRemove>
<!-- Strip test-project-only properties so CompilerApp still packs its .nupkg
(needed at AssetCompiler time for the test's package graph resolution). -->
<GlobalPropertiesToRemove>TargetFramework;StrideSkipAutoPack</GlobalPropertiesToRemove>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions sources/sdk/Stride.Build.Sdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@
<!-- ================================================================ -->
<!-- Stride.Core.CompilerServices Roslyn Analyzer -->
<!-- ================================================================ -->
<!-- Stride.Core.CompilerServices is single-TF (netstandard2.0), so an explicit
SetTargetFramework is redundant — and harmful: it forces TargetFramework into the
consumer-ref dispatch globals, producing a cache key distinct from the slnf-direct
outer dispatch (which has no TF global). Both then race on obj/. -->
<ItemGroup Condition="!$(MSBuildProjectName.StartsWith('Stride.Core.CompilerServices'))">
<ProjectReference Include="$(StrideRoot)sources\core\Stride.Core.CompilerServices\Stride.Core.CompilerServices.csproj"
OutputItemType="Analyzer"
SetTargetFramework="TargetFramework=netstandard2.0"
ReferenceOutputAssembly="false" />
</ItemGroup>

Expand Down Expand Up @@ -228,7 +231,6 @@
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)"
Condition="'%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != ''"
BuildInParallel="$(BuildInParallel)"
Targets="Build;Pack"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;StrideGraphicsApi">
</MSBuild>
</Target>
Expand Down
32 changes: 32 additions & 0 deletions sources/sdk/Stride.Build.Sdk/Sdk/Stride.Dependencies.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,46 @@
<!-- ================================================================ -->

<!-- List dependency files from .ssdeps -->
<!-- When the current build targets a specific StrideGraphicsApi, drop candidate paths whose
parent directory is a non-current API folder. Otherwise a non-API-dependent middle project
(say Stride.Engine, built with default API=Direct3D11) re-exports its CopyLocal'd
Stride.Graphics.ssdeps through the reference graph, and the direct API-dependent reference
also provides one — both land on the same filename in the output folder and race. -->
<Target Name="_StrideListDepsFiles" DependsOnTargets="ResolveAssemblyReferences">
<ItemGroup>
<_StrideDepsFile Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferencePath.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferenceDependencyPaths.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
</ItemGroup>
<ItemGroup Condition="'$(StrideGraphicsApi)' != ''">
<_StrideDepsFile Remove="@(_StrideDepsFile)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Direct3D11\')) And '$(StrideGraphicsApi)' != 'Direct3D11'" />
<_StrideDepsFile Remove="@(_StrideDepsFile)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Direct3D12\')) And '$(StrideGraphicsApi)' != 'Direct3D12'" />
<_StrideDepsFile Remove="@(_StrideDepsFile)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Vulkan\')) And '$(StrideGraphicsApi)' != 'Vulkan'" />
<_StrideDepsFile Remove="@(_StrideDepsFile)" Condition="$([System.String]::Copy('%(Identity)').Contains('\OpenGL\')) And '$(StrideGraphicsApi)' != 'OpenGL'" />
<_StrideDepsFile Remove="@(_StrideDepsFile)" Condition="$([System.String]::Copy('%(Identity)').Contains('\OpenGLES\')) And '$(StrideGraphicsApi)' != 'OpenGLES'" />
</ItemGroup>
<ItemGroup>
<None Include="@(_StrideDepsFile)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>

<!-- Filter transitive CopyToOutput items coming from non-API-dependent project references.
They would otherwise pull the default-API variant (e.g. Direct3D11) of API-dependent
side files (Stride.Graphics.ssdeps, Stride.VirtualReality.ssdeps, and the native libs
they manifest) through the reference graph, colliding in the consumer's output folder
with the direct API-dependent reference's correct variant. -->
<Target Name="_StrideFilterTransitiveCopyToOutputDirectoryItems"
BeforeTargets="_CopyOutOfDateSourceItemsToOutputDirectory;_CopyOutOfDateSourceItemsToOutputDirectoryAlways"
DependsOnTargets="GetCopyToOutputDirectoryItems"
Condition="'$(StrideGraphicsApi)' != ''">
<ItemGroup>
<_SourceItemsToCopyToOutputDirectory Remove="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Direct3D11\')) And '$(StrideGraphicsApi)' != 'Direct3D11'" />
<_SourceItemsToCopyToOutputDirectory Remove="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Direct3D12\')) And '$(StrideGraphicsApi)' != 'Direct3D12'" />
<_SourceItemsToCopyToOutputDirectory Remove="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy('%(Identity)').Contains('\Vulkan\')) And '$(StrideGraphicsApi)' != 'Vulkan'" />
<_SourceItemsToCopyToOutputDirectory Remove="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy('%(Identity)').Contains('\OpenGL\')) And '$(StrideGraphicsApi)' != 'OpenGL'" />
<_SourceItemsToCopyToOutputDirectory Remove="@(_SourceItemsToCopyToOutputDirectory)" Condition="$([System.String]::Copy('%(Identity)').Contains('\OpenGLES\')) And '$(StrideGraphicsApi)' != 'OpenGLES'" />
</ItemGroup>
</Target>

<!-- Note: this target Outputs are not real, used so that it gets expanded for each file
also, if _StrideDepsFile is empty the target is still called so check for it -->
<Target Name="_StrideBuildDependencies" DependsOnTargets="_StrideListDepsFiles" Outputs="%(_StrideDepsFile.Identity)">
Expand Down
Loading
Loading