Skip to content

Commit 53bff15

Browse files
authored
Merge pull request #131 from VaclavElias/main
fix: Fixes CI/CD issue
2 parents ca6a609 + 08b2b79 commit 53bff15

File tree

5 files changed

+53
-36
lines changed

5 files changed

+53
-36
lines changed

.github/workflows/dotnet-nuget.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,31 @@ jobs:
3232
- name: Restore dependencies - Stride.CommunityToolkit
3333
run: dotnet restore ${{ env.PROJECT_PATH_CORE }}
3434

35+
# Temporary solution, because of System.Security.Cryptography.Pkcs not found issue
36+
- name: Modify Stride.Core.Assets.CompilerApp.targets
37+
shell: pwsh
38+
run: |
39+
$targetsPath = Join-Path -Path (Get-ChildItem -Path "${env:USERPROFILE}\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive" -Filter "Stride.Core.Assets.CompilerApp.targets" -Recurse).DirectoryName -ChildPath "Stride.Core.Assets.CompilerApp.targets"
40+
41+
[xml]$targetsXml = Get-Content -Path $targetsPath
42+
$namespaceManager = New-Object System.Xml.XmlNamespaceManager($targetsXml.NameTable)
43+
$namespaceManager.AddNamespace("msbuild", "http://schemas.microsoft.com/developer/msbuild/2003")
44+
45+
$targetNode = $targetsXml.SelectSingleNode("//msbuild:Target[@Name='_StridePrepareAssetsForPack']", $namespaceManager)
46+
if ($targetNode -ne $null)
47+
{
48+
$targetNode.SetAttribute("Condition", "false")
49+
$targetsXml.Save($targetsPath)
50+
Write-Host "Modified _StridePrepareAssetsForPack target in Stride.Core.Assets.CompilerApp.targets"
51+
}
52+
else
53+
{
54+
Write-Host "_StridePrepareAssetsForPack target not found in Stride.Core.Assets.CompilerApp.targets"
55+
}
56+
3557
- name: Build
3658
run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore
3759

38-
# - name: Copy System.Security.Cryptography.Pkcs DLL to output directory
39-
# run: |
40-
# Copy-Item "C:\Users\runneradmin\.nuget\packages\system.security.cryptography.pkcs\6.0.4\lib\net6.0\System.Security.Cryptography.Pkcs.dll" -Destination "src/Stride.CommunityToolkit/bin/Debug/net8.0/"
41-
# shell: pwsh
42-
4360
- name: Test
4461
run: dotnet test ${{ env.PROJECT_PATH_CORE }} --no-build --verbosity normal
4562

.github/workflows/dotnet.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,32 @@ jobs:
2020
with:
2121
dotnet-version: 8.0.x
2222

23+
# Stride.CommunityToolkit
2324
- name: Restore Stride.CommunityToolkit dependencies
2425
run: dotnet restore ${{ env.PROJECT_PATH_CORE }}
25-
26+
27+
# Temporary solution, because of System.Security.Cryptography.Pkcs not found issue
28+
- name: Modify Stride.Core.Assets.CompilerApp.targets
29+
shell: pwsh
30+
run: |
31+
$targetsPath = Join-Path -Path (Get-ChildItem -Path "${env:USERPROFILE}\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive" -Filter "Stride.Core.Assets.CompilerApp.targets" -Recurse).DirectoryName -ChildPath "Stride.Core.Assets.CompilerApp.targets"
32+
33+
[xml]$targetsXml = Get-Content -Path $targetsPath
34+
$namespaceManager = New-Object System.Xml.XmlNamespaceManager($targetsXml.NameTable)
35+
$namespaceManager.AddNamespace("msbuild", "http://schemas.microsoft.com/developer/msbuild/2003")
36+
37+
$targetNode = $targetsXml.SelectSingleNode("//msbuild:Target[@Name='_StridePrepareAssetsForPack']", $namespaceManager)
38+
if ($targetNode -ne $null)
39+
{
40+
$targetNode.SetAttribute("Condition", "false")
41+
$targetsXml.Save($targetsPath)
42+
Write-Host "Modified _StridePrepareAssetsForPack target in Stride.Core.Assets.CompilerApp.targets"
43+
}
44+
else
45+
{
46+
Write-Host "_StridePrepareAssetsForPack target not found in Stride.Core.Assets.CompilerApp.targets"
47+
}
48+
2649
# - name: Get NuGet global-packages location
2750
# id: nuget-cache
2851
# run: |
@@ -41,35 +64,12 @@ jobs:
4164

4265
# - name: Copy System.Security.Cryptography.Pkcs DLL to output directory
4366
# run: |
44-
# Copy-Item "c:\Users\Vacla\.nuget\packages\system.security.cryptography.pkcs\6.0.4\lib\net6.0\System.Security.Cryptography.Pkcs.dll" -Destination "src/Stride.CommunityToolkit/bin/Debug/net8.0/"
67+
# Copy-Item "C:\Users\runneradmin\.nuget\packages\system.security.cryptography.pkcs\6.0.4\lib\net6.0\System.Security.Cryptography.Pkcs.dll" -Destination "src/Stride.CommunityToolkit/bin/Debug/net8.0/"
4568
# shell: pwsh
4669

47-
- name: Test Stride.CommunityToolkit
48-
run: dotnet test ${{ env.PROJECT_PATH_CORE }} --no-build --verbosity normal
49-
70+
# Stride.CommunityToolkit.Skyboxes
5071
- name: Restore Stride.CommunityToolkit.Skyboxes dependencies
5172
run: dotnet restore ${{ env.PROJECT_PATH_SKYBOX }}
5273

53-
- name: Modify Stride.Core.Assets.CompilerApp.targets
54-
shell: pwsh
55-
run: |
56-
$targetsPath = Join-Path -Path (Get-ChildItem -Path "${env:USERPROFILE}\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive" -Filter "Stride.Core.Assets.CompilerApp.targets" -Recurse).DirectoryName -ChildPath "Stride.Core.Assets.CompilerApp.targets"
57-
58-
[xml]$targetsXml = Get-Content -Path $targetsPath
59-
$namespaceManager = New-Object System.Xml.XmlNamespaceManager($targetsXml.NameTable)
60-
$namespaceManager.AddNamespace("msbuild", "http://schemas.microsoft.com/developer/msbuild/2003")
61-
62-
$targetNode = $targetsXml.SelectSingleNode("//msbuild:Target[@Name='_StridePrepareAssetsForPack']", $namespaceManager)
63-
if ($targetNode -ne $null)
64-
{
65-
$targetNode.SetAttribute("Condition", "false")
66-
$targetsXml.Save($targetsPath)
67-
Write-Host "Modified _StridePrepareAssetsForPack target in Stride.Core.Assets.CompilerApp.targets"
68-
}
69-
else
70-
{
71-
Write-Host "_StridePrepareAssetsForPack target not found in Stride.Core.Assets.CompilerApp.targets"
72-
}
73-
7474
- name: Build Stride.CommunityToolkit.Skyboxes
7575
run: dotnet build ${{ env.PROJECT_PATH_SKYBOX }} --no-restore

examples/code-only/Example01_Basic2DScene/Example01_Basic2DScene.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10-
<ItemGroup>
10+
<!--<ItemGroup>
1111
<PackageReference Include="Stride.Core.Assets.CompilerApp" Version="4.2.0.2122" IncludeAssets="build;buildTransitive" />
12-
</ItemGroup>
12+
</ItemGroup>-->
1313

1414
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
1515
<Exec Command="copy ..\Resources\JumpyJetBackground.jpg $(OutDir)" />

examples/code-only/Example06_ImageProcessing/Example06_ImageProcessing.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10-
<ItemGroup>
10+
<!--<ItemGroup>
1111
<PackageReference Include="Stride.Core.Assets.CompilerApp" Version="4.2.0.2122" IncludeAssets="build;buildTransitive" />
12-
</ItemGroup>
12+
</ItemGroup>-->
1313

1414
<ItemGroup>
1515
<ProjectReference Include="..\..\..\src\Stride.CommunityToolkit\Stride.CommunityToolkit.csproj" />

src/Stride.CommunityToolkit/Stride.CommunityToolkit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<ItemGroup>
1717
<!-- The light requires a shader defined in the engine assemblies - but shaders are assets and I think they are compiled by the asset compiler per Graphics API target, that's why we need Stride.Core.Assets.CompilerApp -->
18-
<!--<PackageReference Include="Stride.Core.Assets.CompilerApp" Version="4.2.0.2067" IncludeAssets="build;buildTransitive" />-->
18+
<PackageReference Include="Stride.Core.Assets.CompilerApp" Version="4.2.0.2122" IncludeAssets="build;buildTransitive" />
1919
<PackageReference Include="Stride.Engine" Version="4.2.0.2122" />
2020
<PackageReference Include="Stride.Particles" Version="4.2.0.2122" />
2121
<PackageReference Include="Stride.Physics" Version="4.2.0.2122" />

0 commit comments

Comments
 (0)