Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1dea8cd
wip
hojmark Dec 13, 2025
5a85f92
windows ping tool implementation
hojmark Dec 13, 2025
737e040
ci: windows workflow
hojmark Dec 13, 2025
abf5143
linux only tests
hojmark Dec 13, 2025
c1f9467
oops
hojmark Dec 13, 2025
2b99ae3
temp skip e2e on windows
hojmark Dec 13, 2025
01a88f9
f
hojmark Dec 13, 2025
0ba8ff1
platform
hojmark Dec 13, 2025
5ef6f4b
f
hojmark Dec 13, 2025
026d3fd
fix test
hojmark Dec 13, 2025
c1a93a3
fix tests
hojmark Dec 13, 2025
cfac532
fix test
hojmark Dec 13, 2025
43d6d3c
enable test on windows
hojmark Dec 13, 2025
af98eaa
temp disable test on Windows
hojmark Dec 13, 2025
fd9f970
test on windows
hojmark Dec 13, 2025
6edf789
test on windows
hojmark Dec 13, 2025
93c1928
fix test
hojmark Dec 13, 2025
a1be606
refactor arp tables
hojmark Dec 13, 2025
6118a76
blind windows arp table implementation
hojmark Dec 13, 2025
76d6356
blind windows ping subnet scanner implementation
hojmark Dec 13, 2025
fbc70a5
disable test on windows
hojmark Dec 14, 2025
4cd44e6
more specific disable
hojmark Dec 14, 2025
b504cd2
enable e2e
hojmark Dec 14, 2025
dc258a3
build binaries on the right platforms
hojmark Dec 14, 2025
e917d2b
default platform when localbuild
hojmark Dec 14, 2025
cc6ef21
fix RID
hojmark Dec 14, 2025
540a932
platform dependant binary name
hojmark Dec 14, 2025
21b39aa
f
hojmark Dec 14, 2025
bdc198c
bump windows timeout to 10 minutes
hojmark Dec 14, 2025
328b971
f
hojmark Dec 14, 2025
4a72ced
f
hojmark Dec 14, 2025
41f83b5
pinguin
hojmark Feb 6, 2026
0d81a3c
can't run containers on gha win runners
hojmark Feb 6, 2026
463f664
normalize content
hojmark Feb 6, 2026
e55d439
normalize whitespace
hojmark Feb 6, 2026
18f020f
another checkmark char
hojmark Feb 6, 2026
aa4db3c
update windows snapshots
hojmark Feb 6, 2026
b0f09e9
refactor
hojmark Feb 6, 2026
a49976e
use unicode for checkmark and cross
hojmark Feb 6, 2026
4f5c3cd
fix warning
hojmark Feb 6, 2026
c9b2841
update windows snapshots
hojmark Feb 6, 2026
1e821d6
Fix merge conflict resolution in TestE2E
hojmark Feb 18, 2026
6f40570
merge ci workflow files
hojmark Feb 18, 2026
e9943a2
remove outdated todo
hojmark Feb 18, 2026
27be00b
Split TestE2E into TestE2E_Binary and TestE2E_Container for Windows C…
hojmark Mar 12, 2026
3aca0f3
refactor
hojmark Mar 12, 2026
0bbe9af
f
hojmark Mar 12, 2026
dff409f
increase tolerance
hojmark Mar 12, 2026
ac64deb
fix packbinaries
hojmark Mar 12, 2026
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ dotnet_diagnostic.SA1000.severity = suggestion # Need to configure formatting in
# Parameter '*' should begin with lower-case letter
dotnet_diagnostic.SA1313.severity = suggestion # Rider disagrees?

[**/*.{Tests,E2ETests,ArchTests}*/**.cs]
[**/*.{Tests,E2ETests.*,ArchTests}*/**.cs]
dotnet_diagnostic.CA1852.severity = warning
dotnet_diagnostic.CA1816.severity = warning
dotnet_diagnostic.CA2007.severity = none
Expand Down
37 changes: 34 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
- 'diagnostic'

jobs:
test:
name: Test
test-linux:
name: 🐧 Test
runs-on: ubuntu-latest
timeout-minutes: 5
env:
Expand All @@ -41,15 +41,46 @@ jobs:
--target Test
--commit ${{ github.sha }}
--msbuildverbosity ${{ github.event.inputs.verbosity }}
--platform linux_x64

- name: Display test results
continue-on-error: true
if: always()
run: dotnet trx --verbosity normal

# TODO fix publish warnings and re-enable check
- name: Check for warnings
run: >
dotnet run
--project ./build/_build.csproj
--target CheckBuildWarnings

test-windows:
name: 🪟 Test
runs-on: windows-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up runner
uses: ./.github/actions/setup-runner

- name: Run tests
run: |
dotnet run `
--project ./build/_build.csproj `
--target Test `
--commit ${{ github.sha }} `
--msbuildverbosity ${{ github.event.inputs.verbosity }} `
--platform win_x64

- name: Display test results
continue-on-error: true
if: always()
run: dotnet trx --verbosity normal

- name: Check for warnings
run: |
dotnet run `
--project ./build/_build.csproj `
--target CheckBuildWarnings
42 changes: 42 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"Restore",
"Test",
"TestE2E",
"TestE2E_Binary",
"TestE2E_Container",
"TestE2E_General",
"TestLocal",
"TestSelf",
"TestUnit"
Expand Down Expand Up @@ -147,6 +150,45 @@
"type": "string",
"description": "MsBuildVerbosity - Console output verbosity - Default is 'normal'"
},
"Platform": {
"type": "string",
"description": "Platform - A .NET RID but with underscores instead of dashes e.g. linux_x64 or win_x64",
"enum": [
"linux_arm",
"linux_arm64",
"linux_musl_x64",
"linux_x64",
"osx_10_10_x64",
"osx_10_11_x64",
"osx_10_12_x64",
"osx_10_13_x64",
"osx_10_14_x64",
"osx_10_15_x64",
"osx_11_0_arm64",
"osx_11_0_x64",
"osx_12_arm64",
"osx_12_x64",
"osx_x64",
"rhel_6_x64",
"rhel_x64",
"tizen",
"tizen_4_0_0",
"tizen_5_0_0",
"win_arm",
"win_arm64",
"win_x64",
"win_x86",
"win10_arm",
"win10_arm64",
"win10_x64",
"win10_x86",
"win7_x64",
"win7_x86",
"win81_arm",
"win81_x64",
"win81_x86"
]
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
Expand Down
24 changes: 19 additions & 5 deletions Drift.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "src\Common\Common
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Tests", "src\Common.Tests\Common.Tests.csproj", "{004FE90A-E749-4C17-B7B7-B529AA0F5F34}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.E2ETests", "src\Cli.E2ETests\Cli.E2ETests.csproj", "{11F44BDE-0563-4C64-BE3C-9E7B69F89E12}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.E2ETests.Binary", "src\Cli.E2ETests.Binary\Cli.E2ETests.Binary.csproj", "{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.E2ETests.Container", "src\Cli.E2ETests.Container\Cli.E2ETests.Container.csproj", "{C2B3D4E5-F6A7-8901-BCDE-F12345678901}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.E2ETests.General", "src\Cli.E2ETests.General\Cli.E2ETests.General.csproj", "{D3C4E5F6-A7B8-9012-CDEF-123456789012}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.Abstractions", "src\Cli.Abstractions\Cli.Abstractions.csproj", "{42ECC801-ADCB-43E4-86C0-E0E4B017D7B6}"
EndProject
Expand Down Expand Up @@ -76,6 +80,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cli.Settings.SchemaGenerato
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Schemas", "src\Common.Schemas\Common.Schemas.csproj", "{BAC0F9AF-CAE2-43FB-AF47-B9AC7B62544B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "E2E", "E2E", "{D1DBBF0F-1A0D-486C-A893-ACEB667F2A63}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -132,10 +138,18 @@ Global
{004FE90A-E749-4C17-B7B7-B529AA0F5F34}.Release|Any CPU.Build.0 = Release|Any CPU
{8523E9E0-F412-41B7-B361-ADE639FFAF24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8523E9E0-F412-41B7-B361-ADE639FFAF24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11F44BDE-0563-4C64-BE3C-9E7B69F89E12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11F44BDE-0563-4C64-BE3C-9E7B69F89E12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11F44BDE-0563-4C64-BE3C-9E7B69F89E12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11F44BDE-0563-4C64-BE3C-9E7B69F89E12}.Release|Any CPU.Build.0 = Release|Any CPU
{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1A2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU
{C2B3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2B3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2B3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2B3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.Build.0 = Release|Any CPU
{D3C4E5F6-A7B8-9012-CDEF-123456789012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3C4E5F6-A7B8-9012-CDEF-123456789012}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3C4E5F6-A7B8-9012-CDEF-123456789012}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3C4E5F6-A7B8-9012-CDEF-123456789012}.Release|Any CPU.Build.0 = Release|Any CPU
{42ECC801-ADCB-43E4-86C0-E0E4B017D7B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42ECC801-ADCB-43E4-86C0-E0E4B017D7B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42ECC801-ADCB-43E4-86C0-E0E4B017D7B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ state, Drift can detect issues like unknown devices or unexpected subnet access,

You can install Drift by either:

- Downloading the latest release from the [Releases page](https://github.com/hojmark/drift/releases?q=prerelease%3Afalse), or
- Downloading the latest release from
the [Releases page](https://github.com/hojmark/drift/releases?q=prerelease%3Afalse), or
- Running the installation script:

```bash
Expand All @@ -43,6 +44,23 @@ drift init
drift scan -i
```

### Windows x64

#### Install

Download the `.zip` archive from the [Releases page](https://github.com/hojmark/drift/releases?q=prerelease%3Afalse),
extract `drift.exe`, and place it somewhere on your `PATH`.

#### Run

```powershell
# Create a network spec using auto-discovery
drift init

# Scan and detect drift
drift scan -i
```

### Container

#### Run
Expand Down Expand Up @@ -106,7 +124,8 @@ JSON Schemas are available to enable editor auto-completion and validation:
}
```

There’s no official documentation site yet — if you run into trouble, feel free to [open a discussion](https://github.com/hojmark/drift/discussions/categories/q-a).
There’s no official documentation site yet — if you run into trouble, feel free
to [open a discussion](https://github.com/hojmark/drift/discussions/categories/q-a).

### ▸ What can be automatically discovered?

Expand Down
58 changes: 33 additions & 25 deletions build/NukeBuild.Binaries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@
// ReSharper disable UnusedMember.Local

sealed partial class NukeBuild {
private static readonly string[] FilesToDistribute = ["drift", "drift.dbg"];
private static readonly string[] FilesToDistributeLinux = ["drift", "drift.dbg"];
private static readonly string[] FilesToDistributeWindows = ["drift.exe"];

Target PublishBinaries => _ => _
.DependsOn( Build, CleanArtifacts )
.Requires( () => Platform )
.Requires( () => SupportedRuntimes.Contains( Platform ) )
.Executes( async () => {
using var _ = new OperationTimer( nameof(PublishBinaries) );

// TODO https://nuke.build/docs/common/cli-tools/#combinatorial-modifications
foreach ( var runtime in SupportedRuntimes ) {
var publishDir = Paths.PublishDirectoryForRuntime( runtime );
var version = await Versioning.Value.GetVersionAsync();
var publishDir = Paths.PublishDirectoryForRuntime( Platform );
var version = await Versioning.Value.GetVersionAsync();

Log.Information( "Publishing {Runtime} build to {PublishDir}", runtime, publishDir );
DotNetPublish( s => s
.SetProject( Solution.Cli )
.SetConfiguration( Configuration )
.SetOutput( publishDir )
.SetSelfContained( true )
.SetVersionProperties( version )
// TODO if not specifying a RID, apparently only x64 gets built on x64 host
.SetRuntime( runtime )
.SetProcessAdditionalArguments( $"-bl:{BinaryPublishLogName}" )
.EnableNoLogo()
.EnableNoRestore()
.EnableNoBuild()
);
}
Log.Information( "Publishing {Runtime} build to {PublishDir}", Platform, publishDir );
Log.Debug( "Supported runtimes are {SupportedRuntimes}", string.Join( ", ", SupportedRuntimes ) );
DotNetPublish( s => s
.SetProject( Solution.Cli )
.SetConfiguration( Configuration )
.SetOutput( publishDir )
.SetSelfContained( true )
.SetVersionProperties( version )
.SetRuntime( Platform )
.SetProcessAdditionalArguments( $"-bl:{BinaryPublishLogName}" )
.EnableNoLogo()
.EnableNoRestore()
.EnableNoBuild()
);
}
);

Expand All @@ -50,15 +50,23 @@ sealed partial class NukeBuild {
using var _ = new OperationTimer( nameof(PackBinaries) );

var version = await Versioning.Value.GetVersionAsync();
var publishDir = Paths.PublishDirectoryForRuntime( Platform );

foreach ( var runtime in SupportedRuntimes ) {
var publishDir = Paths.PublishDirectoryForRuntime( runtime );
var artifactFile = Paths.ArtifactsDirectory / $"drift_{version.WithoutMetadata()}_{runtime}.tar.gz";
var isWindows = Platform == DotNetRuntimeIdentifier.win_x64;
var extension = isWindows ? "zip" : "tar.gz";
var filesToDistribute = isWindows ? FilesToDistributeWindows : FilesToDistributeLinux;
var artifactFile = Paths.ArtifactsDirectory / $"drift_{version.WithoutMetadata()}_{Platform}.{extension}";

Log.Information( "Creating {ArtifactFile}", artifactFile );
Log.Information( "Creating {ArtifactFile}", artifactFile );

if ( isWindows ) {
Log.Debug( "Including files matching: {Files}", string.Join( ", ", filesToDistribute ) );
publishDir.ZipTo( artifactFile, f => filesToDistribute.Contains( f.Name ), fileMode: FileMode.CreateNew );
}
else {
var files = publishDir
.GetFiles()
.Where( file => FilesToDistribute.Contains( file.Name ) )
.Where( file => filesToDistribute.Contains( file.Name ) )
.ToList();
Log.Debug( "Including files: {Files}", string.Join( ", ", files.Select( f => f.Name ) ) );
publishDir.TarGZipTo( artifactFile, files, fileMode: FileMode.CreateNew );
Expand Down
2 changes: 2 additions & 0 deletions build/NukeBuild.Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using JetBrains.Annotations;
using Nuke.Common;
using Nuke.Common.Tools.Docker;
using Nuke.Common.Tools.DotNet;
using Serilog;
using Versioning;

Expand Down Expand Up @@ -33,6 +34,7 @@ partial class NukeBuild {

Target PublishContainer => _ => _
.DependsOn( PublishBinaries, CleanArtifacts )
.OnlyWhenDynamic( () => Platform != DotNetRuntimeIdentifier.win_x64 )
.Requires( () => Commit )
.Executes( async () => {
using var _ = new OperationTimer( nameof(PublishContainer) );
Expand Down
Loading
Loading