Skip to content
Open
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
22 changes: 21 additions & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
include:
- os: ubuntu-latest
rid: linux-x64
- os: windows-latest
rid: win-x64
- os: macos-latest
rid: osx-x64
- os: macos-14
rid: osx-arm64

steps:
- uses: actions/checkout@v4
Expand All @@ -32,3 +41,14 @@ jobs:

- name: Test
run: dotnet test --no-restore --verbosity normal

- name: Publish
run: dotnet publish -c Release -r ${{ matrix.rid }} --self-contained true -p:PublishSingleFile=true

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: ZeDMDUpdater-${{ matrix.rid }}
path: |
bin/Release/net8.0/${{ matrix.rid }}/publish/*
if-no-files-found: error
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,24 @@ jobs:
- name: Publish Linux
run: dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true

- name: Publish macOS
- name: Publish macOS x64
run: dotnet publish -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true

- name: Publish macOS ARM64
run: dotnet publish -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true

- name: Zip Windows Release
run: zip -j ZeDMDUpdater-windows-x64.zip bin/Release/net8.0/win-x64/publish/ZeDMDUpdater.exe

- name: Zip Linux Release
run: zip -j ZeDMDUpdater-linux-x64.zip bin/Release/net8.0/linux-x64/publish/ZeDMDUpdater

- name: Zip macOS Release
- name: Zip macOS x64 Release
run: zip -j ZeDMDUpdater-macos-x64.zip bin/Release/net8.0/osx-x64/publish/ZeDMDUpdater

- name: Zip macOS ARM64 Release
run: zip -j ZeDMDUpdater-macos-arm64.zip bin/Release/net8.0/osx-arm64/publish/ZeDMDUpdater

- name: Generate Release Notes
id: release_notes
run: |
Expand All @@ -61,6 +67,7 @@ jobs:
ZeDMDUpdater-windows-x64.zip
ZeDMDUpdater-linux-x64.zip
ZeDMDUpdater-macos-x64.zip
ZeDMDUpdater-macos-arm64.zip
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
Expand Down
34 changes: 0 additions & 34 deletions DeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,6 @@ namespace ZeDMDUpdater;

public class DeviceManager
{
public Task<List<string>> GetAvailablePorts()
{
// TODO: Use LibZeDMD to list ZeDMD devices
List<string> ports = new List<string>();

// Standard SerialPort.GetPortNames() attempt
ports.AddRange(SerialPort.GetPortNames());

// Linux-specific checks
if (OperatingSystem.IsLinux())
{
// Check for ttyUSB devices
string[] ttyUSBDevices = Directory.GetFiles("/dev", "ttyUSB*");
ports.AddRange(ttyUSBDevices);

// Check for ttyACM devices (for Arduino-compatible devices)
string[] ttyACMDevices = Directory.GetFiles("/dev", "ttyACM*");
ports.AddRange(ttyACMDevices);

// Check for ttyS devices
string[] ttySDevices = Directory.GetFiles("/dev", "ttyS*");
ports.AddRange(ttySDevices);
}

// Remove duplicates and sort
return Task.FromResult(ports.Distinct().OrderBy(p => p).ToList());
}

public async Task<bool> FlashFirmware(string firmwarePath, string portName, bool isS3 = false, Action<string>? logCallback = null)
{
try
Expand Down Expand Up @@ -98,10 +70,4 @@ public async Task<bool> FlashFirmware(string firmwarePath, string portName, bool
}
}


public Task ApplySettings(Dictionary<string, string> settings)
{
// Implement settings application logic here
return Task.CompletedTask;
}
}
Loading
Loading