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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.3.0",
"commands": [
"csharpier"
],
"rollForward": false
}
}
}
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Formatting follows CSharpier; `dotnet csharpier check` enforces it in CI. These keys keep the IDE
# formatter consistent with it, and IDE0055 is off because some layouts, such as a multi-line
# constructor initializer before an empty body, cannot be expressed to it.
dotnet_diagnostic.IDE0055.severity = none
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
csharp_space_around_declaration_statements = do_not_ignore

[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2

Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@ jobs:
- name: Restore
run: dotnet restore PipeWire.NET.slnx

- name: Check formatting
run: |
dotnet tool restore
dotnet csharpier check .

- name: Build
run: dotnet build PipeWire.NET.slnx --no-restore -c Release

- name: Test (non-integration on host runner)
run: dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --coverage --coverage-settings coverage.settings.xml --coverage-output-format cobertura --coverage-output coverage.cobertura.xml
run: dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --coverage --coverage-settings coverage.settings.xml --coverage-output-format cobertura --coverage-output coverage.cobertura.xml
--filter "TestCategory!=Integration"

- name: Summarize coverage
Expand Down Expand Up @@ -191,7 +196,7 @@ jobs:
PIPEWIRE_DEBUG: "3"
PIPEWIRE_LOG: ${{ runner.temp }}/pw-native-nodaemon.log
timeout-minutes: 10
run: dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release
run: dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release
--filter "TestCategory=Integration&TestCategory!=RequiresDaemon&TestCategory!=PenTest&TestCategory!=KillsTheDaemon&TestCategory!=RequiresPatchedDaemon" --max-parallel-test-modules 1

- name: Name the test that hung
Expand All @@ -215,7 +220,7 @@ jobs:
run: |
source build/session.sh
pwnet_session_start
pwnet_session_run dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
pwnet_session_run dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
--filter "TestCategory=RequiresDaemon&TestCategory!=RequiresGpu&TestCategory!=RequiresGStreamer&TestCategory!=PenTest&TestCategory!=KillsTheDaemon&TestCategory!=RequiresPatchedDaemon" --max-parallel-test-modules 1
exit $PWNET_LAST_RC

Expand Down Expand Up @@ -294,7 +299,7 @@ jobs:
run: |
source build/session.sh
pwnet_session_start
pwnet_session_run dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
pwnet_session_run dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
--filter "TestCategory=RequiresGpu&TestCategory!=RequiresGStreamer" --max-parallel-test-modules 1
echo "::notice::DMA-BUF leg exit $PWNET_LAST_RC (non-gating: a hosted runner has no GPU to import with)"

Expand All @@ -307,7 +312,7 @@ jobs:
run: |
source build/session.sh
pwnet_session_start
pwnet_session_run dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
pwnet_session_run dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release \
--filter "TestCategory=RequiresGStreamer&TestCategory!=RequiresGpu&TestCategory!=PenTest" --max-parallel-test-modules 1
exit $PWNET_LAST_RC

Expand Down Expand Up @@ -360,7 +365,7 @@ jobs:
run: dotnet build PipeWire.NET.slnx -c Release

- name: Unit tests
run: dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --filter "TestCategory!=Integration"
run: dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --filter "TestCategory!=Integration"

aot_arm64:
name: Native AOT and ABI on arm64
Expand Down Expand Up @@ -399,7 +404,7 @@ jobs:
# The struct layouts and enum widths are what arm64 is here to disagree about, and these
# need no daemon.
run: |
dotnet test PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --filter "TestCategory!=Integration"
dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings --no-build -c Release --filter "TestCategory!=Integration"

- name: Native AOT publish and run
timeout-minutes: 20
Expand Down Expand Up @@ -514,7 +519,7 @@ jobs:
run: |
source build/session.sh
pwnet_session_start
pwnet_session_run dotnet test PipeWire.NET.slnx --settings tests.runsettings -c Release --filter "TestCategory=RequiresDaemon&TestCategory!=RequiresGpu&TestCategory!=RequiresGStreamer&TestCategory!=PenTest&TestCategory!=KillsTheDaemon&TestCategory!=RequiresPatchedDaemon" --max-parallel-test-modules 1
pwnet_session_run dotnet test --solution PipeWire.NET.slnx --settings tests.runsettings -c Release --filter "TestCategory=RequiresDaemon&TestCategory!=RequiresGpu&TestCategory!=RequiresGStreamer&TestCategory!=PenTest&TestCategory!=KillsTheDaemon&TestCategory!=RequiresPatchedDaemon" --max-parallel-test-modules 1

if [ $PWNET_LAST_RC -eq 0 ]; then
echo "- result: passed" >> "$GITHUB_STEP_SUMMARY"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dotnet build PipeWire.NET.slnx
dotnet test --filter "TestCategory!=Integration"
```

The build treats warnings as errors and targets .NET 10 (and .NET 11 preview).
The build treats warnings as errors and targets .NET 10 and .NET 11.

Integration tests need a running PipeWire daemon on Linux. Some use GStreamer to produce real
sources; install `gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good
Expand Down
14 changes: 11 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
<!-- A stable target should not carry a preview dependency: net10 consumers would otherwise be
forced onto an unreleased package for no API they use. Kept split across the merge - the
bump on main moved a single unconditional entry, which would put the preview back on net10. -->
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="11.0.0-rc.1.26425.128" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="MinVer" Version="7.0.0" />
<PackageVersion
Include="Microsoft.Extensions.Logging.Abstractions"
Version="11.0.0-rc.1.26425.128"
Condition="'$(TargetFramework)' == 'net11.0'"
/>
<PackageVersion
Include="Microsoft.Extensions.Logging.Abstractions"
Version="10.0.12"
Condition="'$(TargetFramework)' != 'net11.0'"
/>
<PackageVersion Include="MinVer" Version="8.0.0" />
<PackageVersion Include="MSTest.TestFramework" Version="4.4.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.4.1" />
<PackageVersion Include="Microsoft.Testing.Platform.MSBuild" Version="2.4.1" />
Expand Down
38 changes: 19 additions & 19 deletions PipeWire.NET.slnx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Solution>
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
<File Path=".gitignore" />
<File Path="Directory.Build.props" />
<File Path="Directory.Packages.props" />
<File Path="global.json" />
<File Path="LICENSE" />
<File Path="README.md" />
</Folder>
<Folder Name="/src/">
<Project Path="src/PipeWire.NET/PipeWire.NET.csproj" />
<Project Path="src/PipeWire.NET.Media/PipeWire.NET.Media.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/PipeWire.NET.Tests/PipeWire.NET.Tests.csproj" />
</Folder>
<Folder Name="/samples/">
<Project Path="samples/PipeWire.NET.SampleConsole/PipeWire.NET.SampleConsole.csproj" />
</Folder>
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
<File Path=".gitignore" />
<File Path="Directory.Build.props" />
<File Path="Directory.Packages.props" />
<File Path="global.json" />
<File Path="LICENSE" />
<File Path="README.md" />
</Folder>
<Folder Name="/src/">
<Project Path="src/PipeWire.NET/PipeWire.NET.csproj" />
<Project Path="src/PipeWire.NET.Media/PipeWire.NET.Media.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/PipeWire.NET.Tests/PipeWire.NET.Tests.csproj" />
</Folder>
<Folder Name="/samples/">
<Project Path="samples/PipeWire.NET.SampleConsole/PipeWire.NET.SampleConsole.csproj" />
</Folder>
</Solution>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "11.0.100-preview.7.26381.103",
"version": "11.0.100-rc.1.26425.128",
"rollForward": "latestFeature",
"allowPrerelease": true
},
Expand Down
Loading
Loading