Skip to content

Commit

Permalink
CI for linux and osx
Browse files Browse the repository at this point in the history
  • Loading branch information
veniware committed Dec 30, 2023
1 parent 3738a62 commit f5870cd
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest] #ubuntu-latest, macos-latest
os: [windows-latest, ubuntu-latest, macos-latest]
language: [ 'csharp' ]

steps:
Expand Down
8 changes: 4 additions & 4 deletions Protest/Front/oversight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Oversight extends Window {

this.SetupToolbar();
this.connectButton = this.AddToolbarButton("Connect", "mono/connect.svg?light");
this.addStatButton = this.AddToolbarButton("Add", "mono/add.svg?light");
this.addStatButton = this.AddToolbarButton("Add chart", "mono/add.svg?light");
this.AddToolbarSeparator();
this.startButton = this.AddToolbarButton("Start", "mono/play.svg?light");
this.pauseButton = this.AddToolbarButton("Pause", "mono/pause.svg?light");
Expand All @@ -50,7 +50,7 @@ class Oversight extends Window {
this.content.append(this.scrollable, this.consoleBox, this.toggleConsoleButton);

this.connectButton.onclick = ()=> this.InitializeSocketConnection();
this.addStatButton.onclick = ()=> this.AddStat();
this.addStatButton.onclick = ()=> this.AddChart();
this.startButton.onclick = ()=> this.Start();
this.pauseButton.onclick = ()=> this.Pause();

Expand Down Expand Up @@ -229,7 +229,7 @@ class Oversight extends Window {
}
}

async AddStat() {
async AddChart() {
if (!this.socket) {
this.ConfirmBox("Web-socket is disconnected.", "mono/oversight.svg", true);
return;
Expand Down Expand Up @@ -302,7 +302,7 @@ class Oversight extends Window {

const templatesBox = document.createElement("div");
templatesBox.style.border = "var(--clr-control) solid 1.5px";
templatesBox.style.gridArea = "1 / 1 / 7 / 4";
templatesBox.style.gridArea = "1 / 1 / 9 / 4";
templatesBox.style.overflowY = "scroll";
innerBox.appendChild(templatesBox);

Expand Down
6 changes: 6 additions & 0 deletions Protest/Http/Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

namespace Protest.Http;

#if !OS_WINDOWS
public static class StaticCacheSerialization {
public static Dictionary<string, byte[]> cache = new Dictionary<string, byte[]>() {};
}
#endif

internal sealed class Cache {
public struct Entry {
public byte[] bytes;
Expand Down
2 changes: 1 addition & 1 deletion Protest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Released into the public domain under the GPL v3

global using System;
global using System.Linq;
using System.Diagnostics;

namespace Protest;

internal class Program {
internal static readonly string[] alternativeUriPrefixes = new string[] { "http://127.0.0.1:8080/" };

Expand Down
28 changes: 18 additions & 10 deletions Protest/Protest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!--<AssemblyVersion>5.0.*</AssemblyVersion>-->

<Deterministic>false</Deterministic>
<VersionSuffix>5.0.$([System.DateTime]::UtcNow.ToString(yyMM)).$([System.DateTime]::UtcNow.ToString(ddhh))</VersionSuffix>
<VersionSuffix>5.0.$([System.DateTime]::UtcNow.ToString(yyMM))0.$([System.DateTime]::UtcNow.ToString(ddhh))</VersionSuffix>
<AssemblyVersion>$(VersionSuffix)</AssemblyVersion>
<Version>$(VersionSuffix)</Version>

Expand All @@ -34,7 +34,6 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>


<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>

Expand All @@ -45,18 +44,27 @@
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<Copyright>2023 veniware. Released into the public domain.</Copyright>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.2" />
<PackageReference Include="SSH.NET" Version="2023.0.0" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.2" />
<PackageReference Include="SSH.NET" Version="2023.0.0" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Protest-CacheGenerator\Protest-CacheGenerator.csproj" OutputItemType="Analyzer" />

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<ProjectReference Include="..\Protest-CacheGenerator\Protest-CacheGenerator.csproj" OutputItemType="Analyzer" />
</ItemGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>OS_WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<DefineConstants>OS_MAC</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>OS_LINUX</DefineConstants>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.2312
5.0.23120

0 comments on commit f5870cd

Please sign in to comment.