Skip to content

Commit

Permalink
Merge pull request #195 from VaclavElias/main
Browse files Browse the repository at this point in the history
ci-cd: DebugShapes project added
  • Loading branch information
VaclavElias authored Jan 19, 2025
2 parents 9e1658f + c4f8e09 commit 48d6bcb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/dotnet-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
PROJECT_PATH_CORE: src/Stride.CommunityToolkit/Stride.CommunityToolkit.csproj
PROJECT_PATH_BEPU: src/Stride.CommunityToolkit.Bepu/Stride.CommunityToolkit.Bepu.csproj
PROJECT_PATH_BULLET: src/Stride.CommunityToolkit.Bullet/Stride.CommunityToolkit.Bullet.csproj
PROJECT_PATH_DEBUG: src/Stride.CommunityToolkit.DebugShapes/Stride.CommunityToolkit.DebugShapes.csproj
PROJECT_PATH_IMGUI: src/Stride.CommunityToolkit.ImGui/Stride.CommunityToolkit.ImGui.csproj
PROJECT_PATH_SKYBOX: src/Stride.CommunityToolkit.Skyboxes/Stride.CommunityToolkit.Skyboxes.csproj
PROJECT_PATH_WINDOWS: src/Stride.CommunityToolkit.Windows/Stride.CommunityToolkit.Windows.csproj
Expand Down Expand Up @@ -41,28 +42,6 @@ jobs:
- name: Restore dependencies - Stride.CommunityToolkit
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: Build
run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore

Expand Down Expand Up @@ -151,6 +130,24 @@ jobs:
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
TAG_COMMIT: false

# Stride.CommunityToolkit.DebugShapes
- name: Restore dependencies - Stride.CommunityToolkit.DebugShapes
run: dotnet restore ${{ env.PROJECT_PATH_DEBUG }}

- name: Build
run: dotnet build ${{ env.PROJECT_PATH_DEBUG }} --no-restore

- name: Test
run: dotnet test ${{ env.PROJECT_PATH_DEBUG }} --no-build --verbosity normal

- name: Publish Stride Community Toolkit - Bullet
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: ${{ env.PROJECT_PATH_DEBUG }}
VERSION_FILE_PATH: ${{ env.COMMON_SETTINGS_PATH }}
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
TAG_COMMIT: false

# Stride.CommunityToolkit.ImGui
- name: Restore dependencies - Stride.CommunityToolkit.ImGui
run: dotnet restore ${{ env.PROJECT_PATH_IMGUI }}
Expand All @@ -174,4 +171,4 @@ jobs:
run: |
gh release create ${{ env.VERSION }} --title "v${{ env.VERSION }}" --notes "Release notes for ${{ env.VERSION }}" --draft
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout Stride Community Toolkit
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/toolkit/library-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
- Update `docs/docfx.json` to include the new `.csproj` location, ensuring that the [API documentation](../../api/index.md) is generated for the new library.
5. **Update CI/CD Workflows**:
- Add the new project to:
- `.github\workflows\dotnet.yml`.
- `.github\workflows\dotnet-nuget.yml`.
- `.github\workflows\dotnet.yml` (`PROJECTS`).
- `.github\workflows\dotnet-nuget.yml` (`env` and `# Stride.CommunityToolkit.<LibraryName>` section).
6. **Optional: Add Example Projects**:
- If adding example projects, follow the existing folder structure pattern in the `examples` directory.
7. **Optional: Add Guidance Content**:
Expand Down

0 comments on commit 48d6bcb

Please sign in to comment.