Skip to content

Commit 5f54399

Browse files
committed
Split CI into separate workflows and add per-workflow badges
1 parent a10ea7f commit 5f54399

4 files changed

Lines changed: 84 additions & 63 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: dashboard-check
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
dashboard-check:
11+
name: python-dashboard-check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install Dashboard Dependencies
24+
run: pip install -r python/dashboard/requirements.txt
25+
26+
- name: Compile Python Sources
27+
run: python -m compileall python/dashboard
28+
29+
- name: Import Flask App
30+
working-directory: python/dashboard
31+
run: python -c "from app import app; print(app.url_map)"
Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cross-platform-ci
1+
name: health-check
22

33
on:
44
push:
@@ -7,65 +7,6 @@ on:
77
pull_request:
88

99
jobs:
10-
native-build:
11-
name: build-${{ matrix.os }}
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
os: [ubuntu-latest, macos-latest, windows-latest]
17-
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v4
21-
22-
- name: Configure CMake
23-
run: cmake -S . -B build
24-
25-
- name: Build Native Targets
26-
run: cmake --build build --config Release
27-
28-
- name: Validate Artifacts (Unix)
29-
if: runner.os != 'Windows'
30-
shell: bash
31-
run: |
32-
test -f build/sysnetmon-server
33-
test -f build/sysnetmon-agent
34-
35-
- name: Validate Artifacts (Windows)
36-
if: runner.os == 'Windows'
37-
shell: pwsh
38-
run: |
39-
if (!(Test-Path "build/Release/sysnetmon-server.exe") -and !(Test-Path "build/sysnetmon-server.exe")) {
40-
throw "Server artifact missing"
41-
}
42-
if (!(Test-Path "build/Release/sysnetmon-agent.exe") -and !(Test-Path "build/sysnetmon-agent.exe")) {
43-
throw "Agent artifact missing"
44-
}
45-
46-
dashboard-check:
47-
name: python-dashboard-check
48-
runs-on: ubuntu-latest
49-
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v4
53-
54-
- name: Setup Python
55-
uses: actions/setup-python@v5
56-
with:
57-
python-version: "3.12"
58-
59-
- name: Install Dashboard Dependencies
60-
run: pip install -r python/dashboard/requirements.txt
61-
62-
- name: Compile Python Sources
63-
run: python -m compileall python/dashboard
64-
65-
- name: Import Flask App
66-
working-directory: python/dashboard
67-
run: python -c "from app import app; print(app.url_map)"
68-
6910
health-check:
7011
name: linux-e2e-health-check
7112
runs-on: ubuntu-latest

.github/workflows/native-build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: native-build
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
native-build:
11+
name: build-${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Configure CMake
23+
run: cmake -S . -B build
24+
25+
- name: Build Native Targets
26+
run: cmake --build build --config Release
27+
28+
- name: Validate Artifacts (Unix)
29+
if: runner.os != 'Windows'
30+
shell: bash
31+
run: |
32+
test -f build/sysnetmon-server
33+
test -f build/sysnetmon-agent
34+
35+
- name: Validate Artifacts (Windows)
36+
if: runner.os == 'Windows'
37+
shell: pwsh
38+
run: |
39+
if (!(Test-Path "build/Release/sysnetmon-server.exe") -and !(Test-Path "build/sysnetmon-server.exe")) {
40+
throw "Server artifact missing"
41+
}
42+
if (!(Test-Path "build/Release/sysnetmon-agent.exe") -and !(Test-Path "build/sysnetmon-agent.exe")) {
43+
throw "Agent artifact missing"
44+
}

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## CI Status
44

5-
[![Cross-Platform CI](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/ci.yml/badge.svg)](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/ci.yml)
5+
[![Native Build](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/native-build.yml/badge.svg)](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/native-build.yml)
6+
[![Dashboard Check](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/dashboard-check.yml/badge.svg)](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/dashboard-check.yml)
7+
[![Health Check](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/health-check.yml/badge.svg)](https://github.com/dev-rajnishg/SysNetMon/actions/workflows/health-check.yml)
68

79
SysNetMon is a distributed system monitor built as an infra-focused monorepo for systems and networking roles. It combines a low-level C++ TCP server, cross-platform C++ monitoring daemons, a Python Flask dashboard with Plotly, and AWS alert delivery using S3 and SNS.
810

@@ -138,14 +140,17 @@ This launches the C++ server on port `9090` and the dashboard on port `5000`.
138140

139141
## CI Matrix
140142

141-
GitHub Actions workflow `.github/workflows/ci.yml` validates the repo on:
143+
GitHub Actions workflows validate the repo with separate pipelines:
144+
145+
- `.github/workflows/native-build.yml` for Windows, macOS, and Linux native builds
146+
- `.github/workflows/dashboard-check.yml` for Python dashboard checks
147+
- `.github/workflows/health-check.yml` for Linux end-to-end metric flow
142148

143149
- Windows
144150
- macOS
145151
- Linux
146152

147153
It includes a lightweight Linux end-to-end health check that starts the C++ server and one agent, then validates that a dashboard socket client receives a snapshot containing live metrics.
148-
- Linux
149154

150155
CI builds `sysnetmon-server` and `sysnetmon-agent` with CMake on each OS, and runs Flask dashboard dependency plus import checks.
151156

0 commit comments

Comments
 (0)