@cryptotaxi247 / netdata-1 / commits / d42e83ef6

Add basic testing of Windows installs in CI. (#21869)

* Add basic testing of Windows installs in CI. This uses a separate CI job to verify that the 64-bit x86 MSI package can be installed, and that the agent itself can actually be run at a very basic level. * Update .github/workflows/build.yml Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Fix typo in netdata.exe path. * Property track exit status of commands and dump install log. * Further syntax fixes. * Disable full verbose logging (way more info than we are likely to ever need). * Check correct exit codes. * Explicitly print exit code. * Correctly capture process. * Report actual exit code for Netdata command. * Check for file existence separately from invoking netdata. * Split checks to their own script and also check linking. * Skip checking buildinfo for agent. * Update .github/scripts/windows-linker-check.ps1 Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Correctly check ldd output. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Austin S. Hemmelgarn committed Mar 19, 2026 at 10:37 UTC d42e83ef6af1accaeaa7c87eea182ea7767477fa
2 files changed +103
.github/scripts/windows-linker-check.ps1 new
+32
@@ -0,0 +1,32 @@
1 +#Requires -Version 4.0
2 +
3 +$ErrorActionPreference = "Stop"
4 +
5 +$ndPath = "C:\Program Files\Netdata\usr\bin\netdata.exe"
6 +$lddPath = "C:\Program Files\Netdata\usr\bin\ldd.exe"
7 +
8 +if (Test-Path -Path $ndPath) {
9 + Write-Output "$ndPath found, attempting to check linking"
10 +
11 + if (Test-Path -Path $lddPath) {
12 + & $lddPath $ndPath | Tee-Object -Variable lddResult
13 +
14 + if ($LastExitCode -ne 0) {
15 + Write-Output "Exit Code: $LastExitCode"
16 + exit 1
17 + }
18 +
19 + if ($lddResult -match 'missing|not found') {
20 + Write-Output "Libraries missing from install"
21 + exit 1
22 + } else {
23 + Write-Output "Linking OK"
24 + }
25 + } else {
26 + Write-Output "$lddPath not found, unable to check linking"
27 + exit 2
28 + }
29 +} else {
30 + Write-Output "$ndPath does not exist"
31 + exit 1
32 +}
.github/workflows/build.yml
+71
@@ -450,6 +450,75 @@ jobs:
450 && needs.file-check.outputs.run == 'true'
451 }}
452
453 + windows-test: # Test the Windows installer
454 + name: Test Windows installer
455 + runs-on: windows-latest
456 + needs:
457 + - windows-build
458 + - file-check
459 + steps:
460 + - name: Skip Check
461 + id: skip
462 + if: needs.file-check.outputs.run != 'true'
463 + run: Write-Output "SKIPPED"
464 + - name: Checkout
465 + uses: actions/checkout@v6
466 + id: checkout
467 + if: needs.file-check.outputs.run == 'true'
468 + with:
469 + submodules: false
470 + lfs: false
471 + - name: Retrieve Windows Artifacts
472 + id: fetch-windows
473 + if: needs.file-check.outputs.run == 'true'
474 + uses: Wandalen/wretry.action@v3
475 + with:
476 + action: actions/download-artifact@v4
477 + with: |
478 + pattern: windows-*-installer
479 + path: dist-artifacts
480 + merge-multiple: true
481 + attempt_limit: 3
482 + attempt_delay: 2000
483 + - name: Install Netdata
484 + id: install-netdata
485 + if: needs.file-check.outputs.run == 'true'
486 + run: |
487 + $installerProc = Start-Process "msiexec" "/qn /i `"$PWD\dist-artifacts\netdata-x64.msi`" /l* `"$PWD\msi.log`" NDDRVINST=0" -Wait -NoNewWindow -PassThru
488 + Write-Output "Exit Code: $installerProc.ExitCode"
489 + Get-Content "$PWD\msi.log"
490 + $successCodes = @(0, 3010)
491 + if ($installerProc.ExitCode -notin $successCodes) {
492 + exit 1
493 + }
494 + - name: Check agent linking
495 + id: linker-check
496 + if: needs.file-check.outputs.run == 'true'
497 + run: ./.github/scripts/windows-linker-check.ps1
498 + - name: Failure Notification
499 + uses: rtCamp/action-slack-notify@v2
500 + env:
501 + SLACK_COLOR: 'danger'
502 + SLACK_FOOTER: ''
503 + SLACK_ICON_EMOJI: ':github-actions:'
504 + SLACK_TITLE: 'Windows install test failed:'
505 + SLACK_USERNAME: 'GitHub Actions'
506 + SLACK_MESSAGE: |-
507 + ${{ github.repository }}: Windows install test failed.
508 + Checkout agent sources: ${{ steps.checkout.outcome }}
509 + Fetch Windows installers: ${{ steps.fetch-windows.outcome }}
510 + Install Netdata: ${{ steps.install-netdata.outcome }}
511 + Check agent linking: ${{ steps.linker-check.outcome }}
512 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
513 + if: >-
514 + ${{
515 + failure()
516 + && startsWith(github.ref, 'refs/heads/master')
517 + && github.event_name != 'pull_request'
518 + && github.repository == 'netdata/netdata'
519 + && needs.file-check.outputs.run == 'true'
520 + }}
521 +
522 prepare-upload: # Consolidate the artifacts for uploading or releasing.
523 name: Prepare Artifacts
524 runs-on: ubuntu-latest
@@ -754,6 +823,7 @@ jobs:
823 if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata'
824 needs:
825 - prepare-upload
826 + - windows-test
827 - artifact-verification-dist
828 - artifact-verification-static
829 steps:
@@ -889,6 +959,7 @@ jobs:
959 needs:
960 - artifact-verification-dist
961 - artifact-verification-static
962 + - windows-test
963 - normalize-tag
964 steps:
965 - name: Checkout