Skip to content

Commit

Permalink
Build and publish demos
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldaviva committed Feb 18, 2023
1 parent 72c949d commit a12ec87
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/dotnetpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Test
run: |
dotnet test --no-build --verbosity normal --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml"
mv Tests/TestResults/*/coverage.info Tests/TestResults
Copy-Item Tests/TestResults/*/coverage.info Tests/TestResults
- name: Pack
run: dotnet pack ${{ env.ProjectName }} --no-build --configuration Release --verbosity normal
Expand All @@ -42,6 +42,29 @@ jobs:
name: ${{ env.ProjectName }}.nupkg
path: ${{ env.ProjectName }}/bin/Release/*.*nupkg

- name: Publish demos
run: |
dotnet publish PowerMateVolume -c Release --self-contained false -p:PublishSingleFile=true -r win10-x64
dotnet publish Demo -c Release --self-contained false -p:PublishSingleFile=true -r win10-x64
dotnet publish Demo -c Release --self-contained false -p:PublishSingleFile=true -r win10-arm64
dotnet publish Demo -c Release --self-contained false -p:PublishSingleFile=true -r osx-x64
dotnet publish Demo -c Release --self-contained false -p:PublishSingleFile=true -r osx-arm64
New-Item -Name Demo/bin/Release/upload/Windows -Type Directory -ErrorAction SilentlyContinue
New-Item -Name Demo/bin/Release/upload/MacOS -Type Directory -ErrorAction SilentlyContinue
Copy-Item PowerMateVolume/bin/Release/net7.0-windows7.0/win10-x64/publish/PowerMateVolume.exe Demo/bin/Release/upload/Windows/PowerMateVolume-win10-x64.exe
Copy-Item Demo/bin/Release/net7.0/win10-x64/publish/Demo.exe Demo/bin/Release/upload/Windows/Demo-x64.exe
Copy-Item Demo/bin/Release/net7.0/win10-arm64/publish/Demo.exe Demo/bin/Release/upload/Windows/Demo-arm64.exe
Copy-Item Demo/bin/Release/net7.0/osx-x64/publish/Demo Demo/bin/Release/upload/MacOS/Demo-x64
Copy-Item Demo/bin/Release/net7.0/osx-arm64/publish/Demo Demo/bin/Release/upload/MacOS/Demo-arm64
- name: Upload demos
uses: actions/upload-artifact@v3.1.2
with:
name: Demos
path: Demo/bin/Release/upload/

- name: Upload test report
run: testspace Tests/TestResults/TestResults.xml

Expand Down
8 changes: 1 addition & 7 deletions Demo/Demo.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using HidSharp;
using PowerMate;

Console.WriteLine("All devices:");
foreach (Device device in DeviceList.Local.GetAllDevices()) {
Console.WriteLine($" {device.GetFriendlyName()}");
}
using PowerMate;

using IPowerMateClient powerMate = new PowerMateClient();

Expand Down
6 changes: 0 additions & 6 deletions PowerMate/PowerMate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,4 @@
<InternalsVisibleTo Include="Tests" />
</ItemGroup>

<!--<ItemGroup>
<Reference Include="HidSharp">
<HintPath>..\..\hidsharp\bin\netstandard2.0\HidSharp.dll</HintPath>
</Reference>
</ItemGroup>-->

</Project>
10 changes: 7 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ powerMate.InputReceived += (sender, input) => {
- [.NET Core 2.0 or later](https://dotnet.microsoft.com/en-us/download/dotnet)
- [.NET Framework 4.6.1 or later](https://dotnet.microsoft.com/en-us/download/dotnet-framework)
- A supported operating system
- ✅ Windows (verified on 10 22H2 and 11 22H2)
- ✅ MacOS (verified on 12.6)
- ❓ Linux is currently unverified
- ✅ Windows
- verified on 10 22H2, x64
- verified on 11 22H2, x64
- ✅ MacOS
- verified on 12.6, x64
- ❌ Linux is not supported
- on Fedora 37 and Debian 11, the PowerMate is never detected by [HIDSharp](https://www.nuget.org/packages/HidSharp/), even though it appears with `lsusb`

## Installation

Expand Down
6 changes: 0 additions & 6 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,4 @@
<ProjectReference Include="..\PowerMate\PowerMate.csproj" />
</ItemGroup>

<!--<ItemGroup>
<Reference Include="HidSharp">
<HintPath>..\..\hidsharp\bin\netstandard2.0\HidSharp.dll</HintPath>
</Reference>
</ItemGroup>-->

</Project>

0 comments on commit a12ec87

Please sign in to comment.