Skip to content

.NET Build Test

.NET Build Test #28

Workflow file for this run

name: .NET Build Test
env:
PROJECT_PATH_CORE: src/Stride.CommunityToolkit/Stride.CommunityToolkit.csproj
PROJECT_PATH_SKYBOX: src/Stride.CommunityToolkit.Skyboxes/Stride.CommunityToolkit.Skyboxes.csproj
PROJECT_PATH_WINDOWS: src/Stride.CommunityToolkit.Windows/Stride.CommunityToolkit.Windows.csproj
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Stride Community Toolkit
uses: actions/checkout@v4
- name: .NET Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Not needed as Directory.Build.props added a condition to this target
# - name: Create .sarif Directory
# run: New-Item -ItemType Directory -Force -Path D:\.sarif
# shell: pwsh
# Stride.CommunityToolkit
- name: Restore Stride.CommunityToolkit dependencies
run: dotnet restore ${{ env.PROJECT_PATH_CORE }}
# Temporary solution, because of System.Security.Cryptography.Pkcs not found issue
# - name: Modify Stride.Core.Assets.CompilerApp.targets
# shell: pwsh
# run: |
# $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"
# [xml]$targetsXml = Get-Content -Path $targetsPath
# $namespaceManager = New-Object System.Xml.XmlNamespaceManager($targetsXml.NameTable)
# $namespaceManager.AddNamespace("msbuild", "http://schemas.microsoft.com/developer/msbuild/2003")
# $targetNode = $targetsXml.SelectSingleNode("//msbuild:Target[@Name='_StridePrepareAssetsForPack']", $namespaceManager)
# if ($targetNode -ne $null)
# {
# $targetNode.SetAttribute("Condition", "false")
# $targetsXml.Save($targetsPath)
# Write-Host "Modified _StridePrepareAssetsForPack target in Stride.Core.Assets.CompilerApp.targets"
# }
# else
# {
# Write-Host "_StridePrepareAssetsForPack target not found in Stride.Core.Assets.CompilerApp.targets"
# }
# - name: Get NuGet global-packages location
# id: nuget-cache
# run: |
# $cacheDir = dotnet nuget locals global-packages --list | Out-String
# $path = $cacheDir -replace "global-packages: ", "" -replace "`r`n", ""
# echo "NUGET_CACHE_DIR=$path" | Out-File -FilePath $env:GITHUB_ENV -Append
# shell: pwsh
# - name: List contents of System.Security.Cryptography.Pkcs package directory
# run: |
# Get-ChildItem "${{ env.NUGET_CACHE_DIR }}\system.security.cryptography.pkcs\" -Recurse | Select-Object FullName
# shell: pwsh
- name: Build Stride.CommunityToolkit
run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore
# - name: Copy System.Security.Cryptography.Pkcs DLL to output directory
# run: |
# 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/"
# shell: pwsh
# Stride.CommunityToolkit.Windows
- name: Restore Stride.CommunityToolkit.Windows dependencies
run: dotnet restore ${{ env.PROJECT_PATH_WINDOWS }}
- name: Build Stride.CommunityToolkit.Windows
run: dotnet build ${{ env.PROJECT_PATH_WINDOWS }} --no-restore
# Stride.CommunityToolkit.Skyboxes
- name: Restore Stride.CommunityToolkit.Skyboxes dependencies
run: dotnet restore ${{ env.PROJECT_PATH_SKYBOX }}
- name: Build Stride.CommunityToolkit.Skyboxes
run: dotnet build ${{ env.PROJECT_PATH_SKYBOX }} --no-restore