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
33 changes: 16 additions & 17 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ These instructions define the conventions for ElBruno's .NET NuGet library repos
## Project Conventions

### Library Projects
- Target `net8.0;net10.0` (multi-target: LTS + latest)
- Target `net10.0` only (single target). .NET 8 support was dropped ahead of its end of support.
- Package naming: `{Owner}.{ProjectName}.{Feature}` (e.g., `ElBruno.QRCodeGenerator.Svg`)
- Each packable project must include the NuGet icon:
```xml
Expand All @@ -52,14 +52,14 @@ These instructions define the conventions for ElBruno's .NET NuGet library repos
- Enable deterministic CI builds: `<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>`

### Test Projects
- Target `net8.0` only (single target)
- Target `net10.0` only (single target)
- Framework: xUnit with coverlet.collector
- Naming: `{LibraryProject}.Tests`
- Location: `src/tests/{LibraryProject}.Tests/`
- Set `<IsPackable>false</IsPackable>` and `<IsTestProject>true</IsTestProject>`

### Tool Projects (dotnet global tools)
- Target `net8.0` only (single target — CI runners may not have preview SDKs)
- Target `net10.0` only (single target)
- Set `<PackAsTool>true</PackAsTool>` and `<ToolCommandName>{toolname}</ToolCommandName>`

### Sample Projects
Expand Down Expand Up @@ -111,7 +111,7 @@ Use `"rollForward": "latestMajor"` for flexibility across dev machines and CI:
```json
{
"sdk": {
"version": "8.0.0",
"version": "10.0.0",
"rollForward": "latestMajor"
}
}
Expand Down Expand Up @@ -154,10 +154,9 @@ Thumbs.db

- **Triggers:** push to `main`, PR to `main`
- **Runner:** `ubuntu-latest`
- **SDK:** `dotnet-version: 8.0.x`
- **SDK:** `dotnet-version: 10.0.x`
- **Commands use solution-level operations** (not per-project)
- **Use `-p:TargetFrameworks=net8.0`** for restore and build (CI runners may not have preview SDKs)
- **Use `--framework net8.0`** for test
- Projects single-target `net10.0`, so no per-framework overrides are needed

```yaml
name: CI Build
Expand All @@ -176,13 +175,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore {ProjectName}.slnx -p:TargetFrameworks=net8.0
run: dotnet restore {ProjectName}.slnx
- name: Build
run: dotnet build {ProjectName}.slnx --no-restore -p:TargetFrameworks=net8.0
run: dotnet build {ProjectName}.slnx --no-restore
- name: Test
run: dotnet test {ProjectName}.slnx --no-build --framework net8.0
run: dotnet test {ProjectName}.slnx --no-build
```

---
Expand Down Expand Up @@ -225,21 +224,21 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Determine version
id: version
run: |
# Extract from release tag, input, or csproj
# Validate: ^[0-9]+\.[0-9]+\.[0-9]+
- name: Restore
run: dotnet restore {Solution}.slnx -p:TargetFrameworks=net8.0
run: dotnet restore {Solution}.slnx
- name: Build
run: dotnet build {Solution}.slnx -c Release --no-restore -p:TargetFrameworks=net8.0 -p:Version=${{ steps.version.outputs.version }}
run: dotnet build {Solution}.slnx -c Release --no-restore -p:Version=${{ steps.version.outputs.version }}
- name: Test
run: dotnet test {Solution}.slnx -c Release --no-build --framework net8.0
run: dotnet test {Solution}.slnx -c Release --no-build
- name: Pack
run: |
dotnet pack src/{Package}/{Package}.csproj -c Release --no-build -p:TargetFrameworks=net8.0 -p:Version=${{ steps.version.outputs.version }} --output ./nupkgs
dotnet pack src/{Package}/{Package}.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} --output ./nupkgs
# Repeat for each packable project
- name: NuGet login (OIDC trusted publishing)
uses: NuGet/login@v1
Expand Down Expand Up @@ -292,7 +291,7 @@ Follow this exact order:
- Test project naming: `{LibraryProject}.Tests`
- Tests live in `src/tests/{TestProject}/`
- All tests must pass before publishing (enforced in both CI and publish workflows)
- Test projects target `net8.0` only
- Test projects target `net10.0` only

---

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,16 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: 10.0.x

- name: Restore
run: dotnet restore ElBruno.LocalLLMs.slnx -p:TargetFramework=net8.0 -p:TargetFrameworks=net8.0 -p:NoBuild=false
run: dotnet restore ElBruno.LocalLLMs.slnx -p:NoBuild=false

- name: Build
run: dotnet build ElBruno.LocalLLMs.slnx --no-restore -p:TargetFramework=net8.0 -p:TargetFrameworks=net8.0 -p:NoBuild=false
run: dotnet build ElBruno.LocalLLMs.slnx --no-restore -p:NoBuild=false

- name: Test
run: dotnet test ElBruno.LocalLLMs.slnx --no-build --framework net8.0 --verbosity normal --logger "trx;LogFileName=test-results.trx"
run: dotnet test ElBruno.LocalLLMs.slnx --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-bitnet-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x

- name: Determine version
id: version
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: 10.0.x

- name: Determine version
id: version
Expand Down Expand Up @@ -54,12 +52,15 @@ jobs:
dotnet build src/ElBruno.LocalLLMs.Rag/ElBruno.LocalLLMs.Rag.csproj -c Release --no-restore -p:Version=${{ steps.version.outputs.version }}
dotnet build src/ElBruno.LocalLLMs.BitNet/ElBruno.LocalLLMs.BitNet.csproj -c Release --no-restore -p:Version=${{ steps.version.outputs.version }}
dotnet build src/ElBruno.LocalLLMs.BlazorComponents/ElBruno.LocalLLMs.BlazorComponents.csproj -c Release --no-restore -p:Version=${{ steps.version.outputs.version }}
dotnet build src/ElBruno.LocalLLMs.Decisions/ElBruno.LocalLLMs.Decisions.csproj -c Release --no-restore -p:Version=${{ steps.version.outputs.version }}

- name: Unit Tests
run: |
dotnet test src/tests/ElBruno.LocalLLMs.Tests/ElBruno.LocalLLMs.Tests.csproj -c Release --framework net8.0 -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.Rag.Tests/ElBruno.LocalLLMs.Rag.Tests.csproj -c Release --framework net8.0 -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.BitNet.Tests/ElBruno.LocalLLMs.BitNet.Tests.csproj -c Release --framework net8.0 -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.Tests/ElBruno.LocalLLMs.Tests.csproj -c Release -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.Rag.Tests/ElBruno.LocalLLMs.Rag.Tests.csproj -c Release -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.BitNet.Tests/ElBruno.LocalLLMs.BitNet.Tests.csproj -c Release -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.Decisions.Tests/ElBruno.LocalLLMs.Decisions.Tests.csproj -c Release -p:Version=${{ steps.version.outputs.version }} --verbosity normal
dotnet test src/tests/ElBruno.LocalLLMs.BlazorComponents.Tests/ElBruno.LocalLLMs.BlazorComponents.Tests.csproj -c Release -p:Version=${{ steps.version.outputs.version }} --verbosity normal

- name: Validate README What's New policy
run: |
Expand All @@ -83,6 +84,7 @@ jobs:
dotnet pack src/ElBruno.LocalLLMs.Rag/ElBruno.LocalLLMs.Rag.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} -o artifacts
dotnet pack src/ElBruno.LocalLLMs.BitNet/ElBruno.LocalLLMs.BitNet.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} -o artifacts
dotnet pack src/ElBruno.LocalLLMs.BlazorComponents/ElBruno.LocalLLMs.BlazorComponents.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} -o artifacts
dotnet pack src/ElBruno.LocalLLMs.Decisions/ElBruno.LocalLLMs.Decisions.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.version }} -o artifacts
- name: Validate packed assembly versions
shell: pwsh
run: ./scripts/Validate-PackageAssemblyVersions.ps1 -PackageDirectory ./artifacts
Expand Down
38 changes: 27 additions & 11 deletions .github/workflows/squad-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Squad CI
# dotnet project — configure build/test commands below

# Real build and test for the dev-first branches.
# PRs targeting main are covered by ci.yml, so main is deliberately absent
# here to avoid running the same suite twice on the same commit.

on:
pull_request:
branches: [dev, preview, main, insider]
branches: [dev, preview, insider]
types: [opened, synchronize, reopened]
push:
branches: [dev, insider]
Expand All @@ -17,12 +20,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build and test
run: |
# TODO: Add your dotnet build/test commands here
# Go: go test ./...
# Python: pip install -r requirements.txt && pytest
# .NET: dotnet test
# Java (Maven): mvn test
# Java (Gradle): ./gradlew test
echo "No build commands configured — update squad-ci.yml"
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x

# -p:NoBuild=false is required: the BitNet native projects default it to
# true, which otherwise makes restore and build silently skip them.
- name: Restore
run: dotnet restore ElBruno.LocalLLMs.slnx -p:NoBuild=false

- name: Build
run: dotnet build ElBruno.LocalLLMs.slnx --no-restore -p:NoBuild=false

- name: Test
run: dotnet test ElBruno.LocalLLMs.slnx --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: "**/test-results.trx"
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
<Copyright>Copyright © Bruno Capuano $([System.DateTime]::Now.Year)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>nuget_logo.png</PackageIcon>
<PublishedSiblingPackageVersion>0.21.0</PublishedSiblingPackageVersion>
<PublishedSiblingPackageVersion>0.22.0</PublishedSiblingPackageVersion>
<ManagePublishedSiblingPackageVersion
Condition="'$(MSBuildProjectName)' == 'ElBruno.LocalLLMs'
Or '$(MSBuildProjectName)' == 'ElBruno.LocalLLMs.Rag'
Or '$(MSBuildProjectName)' == 'ElBruno.LocalLLMs.BitNet'
Or '$(MSBuildProjectName)' == 'ElBruno.LocalLLMs.BlazorComponents'">true</ManagePublishedSiblingPackageVersion>
Or '$(MSBuildProjectName)' == 'ElBruno.LocalLLMs.BlazorComponents'
Or '$(MSBuildProjectName)' == 'ElBruno.LocalLLMs.Decisions'">true</ManagePublishedSiblingPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(ManagePublishedSiblingPackageVersion)' == 'true'">
Expand Down
4 changes: 4 additions & 0 deletions ElBruno.LocalLLMs.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Folder Name="/src/">
<Project Path="src/ElBruno.LocalLLMs/ElBruno.LocalLLMs.csproj" />
<Project Path="src/ElBruno.LocalLLMs.Rag/ElBruno.LocalLLMs.Rag.csproj" />
<Project Path="src/ElBruno.LocalLLMs.Decisions/ElBruno.LocalLLMs.Decisions.csproj" />
<Project Path="src/ElBruno.LocalLLMs.BitNet/ElBruno.LocalLLMs.BitNet.csproj" />
<Project Path="src/ElBruno.LocalLLMs.BlazorComponents/ElBruno.LocalLLMs.BlazorComponents.csproj" />
</Folder>
Expand All @@ -14,6 +15,7 @@
<Project Path="src/tests/ElBruno.LocalLLMs.Tests/ElBruno.LocalLLMs.Tests.csproj" />
<Project Path="src/tests/ElBruno.LocalLLMs.IntegrationTests/ElBruno.LocalLLMs.IntegrationTests.csproj" />
<Project Path="src/tests/ElBruno.LocalLLMs.Rag.Tests/ElBruno.LocalLLMs.Rag.Tests.csproj" />
<Project Path="src/tests/ElBruno.LocalLLMs.Decisions.Tests/ElBruno.LocalLLMs.Decisions.Tests.csproj" />
<Project Path="src/tests/ElBruno.LocalLLMs.FineTuneEval/ElBruno.LocalLLMs.FineTuneEval.csproj" />
<Project Path="src/tests/ElBruno.LocalLLMs.BitNet.Tests/ElBruno.LocalLLMs.BitNet.Tests.csproj" />
<Project Path="src/tests/MagenticUIServer.Agents.Tests/MagenticUIServer.Agents.Tests.csproj" />
Expand All @@ -34,6 +36,8 @@
<Project Path="src/samples/ToolCallingAgent/ToolCallingAgent.csproj" />
<Project Path="src/samples/FineTunedToolCalling/FineTunedToolCalling.csproj" />
<Project Path="src/samples/RagChatbot/RagChatbot.csproj" />
<Project Path="src/samples/LocalDecisions/LocalDecisions.csproj" />
<Project Path="src/samples/DecisionCalibration/DecisionCalibration.csproj" />
<Project Path="src/samples/ZeroCloudRag/ZeroCloudRag.csproj" />
<Project Path="src/samples/OpenAiServer/OpenAiServer.csproj" />
<Project Path="src/samples/MagenticBrainAgent/MagenticBrainAgent.csproj" />
Expand Down
Loading
Loading