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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thanks for contributing to Reactor! A few notes before you open this PR:
- Link the issue or spec this PR addresses (Fixes #..., Implements docs/specs/0XX-...).
- Keep the change focused. Smaller, well-scoped PRs land faster.
- Include tests. See CONTRIBUTING.md for the unit / selftest / e2e split.
- Run `dotnet build Reactor.sln -p:Platform=x64` and `dotnet test tests/Reactor.Tests` locally.
- Run `dotnet build Reactor.slnx` and `dotnet test tests/Reactor.Tests` locally.
- First-time contributors: the Microsoft CLA bot will comment automatically; sign once and you're set.
-->

Expand All @@ -22,7 +22,7 @@ Thanks for contributing to Reactor! A few notes before you open this PR:
- [ ] Added unit tests in tests/Reactor.Tests/...
- [ ] Added selftest fixture in tests/Reactor.AppTests.Host/SelfTest/Fixtures/...
- [ ] Ran `dotnet test tests/Reactor.Tests`
- [ ] Manually ran `dotnet run --project samples/Reactor.TestApp -p:Platform=x64`
- [ ] Manually ran `dotnet run --project samples/Reactor.TestApp`
-->

## Risk / breaking changes
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
dotnet-version: 10.0.x

- name: Restore
run: dotnet restore tests/Reactor.Tests/Reactor.Tests.csproj
run: dotnet restore tests/Reactor.Tests/Reactor.Tests.csproj -p:Platform=x64

- name: Test
run: dotnet test tests/Reactor.Tests/Reactor.Tests.csproj --no-restore --logger "console;verbosity=normal"
run: dotnet test tests/Reactor.Tests/Reactor.Tests.csproj --no-restore -p:Platform=x64 --logger "console;verbosity=normal"

selftests:
name: Selftests
Expand All @@ -87,10 +87,10 @@ jobs:
dotnet-version: 10.0.x

- name: Restore
run: dotnet restore tests/Reactor.SelfTests/Reactor.SelfTests.csproj
run: dotnet restore tests/Reactor.SelfTests/Reactor.SelfTests.csproj -p:Platform=x64

- name: Test
run: dotnet test tests/Reactor.SelfTests/Reactor.SelfTests.csproj --no-restore --logger "console;verbosity=normal"
run: dotnet test tests/Reactor.SelfTests/Reactor.SelfTests.csproj --no-restore -p:Platform=x64 --logger "console;verbosity=normal"

build-solution:
name: Build solution
Expand All @@ -106,7 +106,7 @@ jobs:
dotnet-version: 10.0.x

- name: Restore
run: dotnet restore Reactor.sln
run: dotnet restore Reactor.slnx

- name: Build
run: dotnet build Reactor.sln --no-restore --configuration Release
run: dotnet build Reactor.slnx --no-restore --configuration Release
15 changes: 10 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,35 @@ jobs:
- name: Build for instrumentation
shell: pwsh
run: |
dotnet build tests/Reactor.Tests -c Debug -p:Optimize=false -p:DebugType=portable
dotnet build tests/Reactor.Tests -c Debug -p:Platform=x64 -p:Optimize=false -p:DebugType=portable
dotnet build src/Reactor -c Debug -p:Optimize=false -p:DebugType=portable --no-incremental
dotnet build tests/Reactor.AppTests.Host -c Debug -p:Optimize=false -p:DebugType=portable --no-incremental
dotnet build tests/Reactor.AppTests.Host -c Debug -p:Platform=x64 -p:Optimize=false -p:DebugType=portable --no-incremental

- name: Collect unit coverage
shell: pwsh
run: |
dotnet-coverage collect -s coverage.settings.xml `
--output unit.cobertura.xml --output-format cobertura `
-- dotnet test tests/Reactor.Tests --no-build
-- dotnet test tests/Reactor.Tests --no-build -p:Platform=x64

- name: Instrument Reactor.dll
shell: pwsh
run: |
$dll = Get-ChildItem -Path "tests/Reactor.AppTests.Host/bin" -Recurse -Filter "Reactor.dll" |
Where-Object { $_.FullName -notmatch 'ref[\\/]' } |
Select-Object -First 1
if (-not $dll) { throw "Reactor.dll not found under tests/Reactor.AppTests.Host/bin" }
Write-Host "Instrumenting: $($dll.FullName)"
dotnet-coverage instrument `
"tests/Reactor.AppTests.Host/bin/x64/Debug/net10.0-windows10.0.22621.0/Reactor.dll" `
$dll.FullName `
-s coverage.settings.xml

- name: Collect selftest coverage
shell: pwsh
run: |
dotnet-coverage collect -s coverage.settings.xml `
--output selftest.cobertura.xml --output-format cobertura `
-- dotnet run --project tests/Reactor.AppTests.Host --no-build -- --self-test
-- dotnet run --project tests/Reactor.AppTests.Host --no-build -p:Platform=x64 -- --self-test

- name: Merge cobertura reports
shell: pwsh
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,16 @@ jobs:
Write-Host "Version: $version (event=$eventName, isTag=$isTag)"

- name: Restore
run: dotnet restore Reactor.sln
run: dotnet restore Reactor.slnx

- name: Build framework + analyzers
run: dotnet build Reactor.sln --no-restore --configuration Release -p:Platform=x64
run: dotnet build Reactor.slnx --no-restore --configuration Release

- name: Pack framework NuGet
run: >
dotnet pack src/Reactor/Reactor.csproj
--no-build --configuration Release
-p:Version=${{ steps.version.outputs.version }}
-p:Platform=x64
-o artifacts/nupkg

- name: Pack Templates
Expand All @@ -121,7 +120,6 @@ jobs:
--configuration Release
--runtime win-x64
--self-contained false
-p:Platform=x64
-p:Version=${{ steps.version.outputs.version }}
-o artifacts/mur/x64

Expand All @@ -131,7 +129,6 @@ jobs:
--configuration Release
--runtime win-arm64
--self-contained false
-p:Platform=ARM64
-p:Version=${{ steps.version.outputs.version }}
-o artifacts/mur/arm64

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Reactor is a declarative, component-based C# framework for building WinUI 3 desk
## Build, Test, Lint

```bash
# Build (platform defaults to machine arch; force with -p:Platform=x64 or ARM64)
dotnet build Reactor.sln
# Build (platform defaults to machine arch for apps; libraries are AnyCPU)
dotnet build Reactor.slnx

# Unit tests — xUnit, headless, fast (~2200 tests incl. 590 Yoga fixtures)
dotnet test tests/Reactor.Tests
Expand Down
21 changes: 14 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,33 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope

```bash
# Restore packages (pulls experimental WinUI 3 from NuGet)
dotnet restore Reactor.sln
dotnet restore Reactor.slnx

# Build the entire solution (framework, tests, test app, samples)
dotnet build Reactor.sln -p:Platform=x64
dotnet build Reactor.slnx

# Build just the framework
dotnet build src/Reactor/Reactor.csproj -p:Platform=x64
dotnet build src/Reactor/Reactor.csproj
```

### From Visual Studio

1. Open `Reactor.sln` in Visual Studio 2022 (17.8+)
2. Select the **x64** or **ARM64** platform from the toolbar (not "Any CPU")
1. Open `Reactor.slnx` in Visual Studio 2022 (17.8+)
2. Select the **x64** or **ARM64** platform from the toolbar
3. Build the solution (Ctrl+Shift+B)

Visual Studio will restore NuGet packages on first load, pulling the experimental Windows App SDK.

### Platforms

The solution targets `x64` and `ARM64`. Omit `-p:Platform=...` to use the default (ARM64 on ARM machines, x64 on Intel). Add `-p:Platform=ARM64` or `-p:Platform=x64` to force one.
Library projects (`Reactor`, `Reactor.Interop.WinForms`) are architecture-neutral (`AnyCPU`). Application projects (samples, tests, CLI) target `x64` and `ARM64`.

When building via the solution (`dotnet build Reactor.slnx`), the platform is selected automatically. When building a single app project directly, pass `-p:Platform=x64` (or `ARM64`):

```bash
dotnet build tests/Reactor.Tests -p:Platform=x64
dotnet test tests/Reactor.Tests -p:Platform=x64
```

---

Expand Down Expand Up @@ -201,7 +208,7 @@ Replace `$(RuntimeIdentifier)` with `ARM64` or `x64`, or omit the platform segme
The interactive demo app exercises every built-in control:

```bash
dotnet run --project samples/Reactor.TestApp -p:Platform=x64
dotnet run --project samples/Reactor.TestApp
```

---
Expand Down
7 changes: 0 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
</PropertyGroup>

<!-- Default Platform to the current machine architecture so that
dotnet build / dotnet watch work without -p:Platform=ARM64. -->
<PropertyGroup Condition="'$(Platform)' == '' or '$(Platform)' == 'AnyCPU'">
<Platform Condition="'$(PROCESSOR_ARCHITECTURE)' == 'ARM64'">ARM64</Platform>
<Platform Condition="'$(PROCESSOR_ARCHITECTURE)' != 'ARM64'">x64</Platform>
</PropertyGroup>

</Project>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ class App : Component

```bash
# Restore and build
dotnet restore Reactor.sln
dotnet build Reactor.sln -p:Platform=x64
dotnet restore Reactor.slnx
dotnet build Reactor.slnx

# Run the interactive demo app
dotnet run --project samples/Reactor.TestApp -p:Platform=x64
dotnet run --project samples/Reactor.TestApp

# Unit tests (xUnit, headless)
dotnet test tests/Reactor.Tests
Expand Down
Loading
Loading