Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [ main ]
pull_request:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build
- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON

- name: Build
run: cmake --build build --config Release

- name: Run tests
run: ctest --test-dir build --output-on-failure
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,15 @@ ci/hw-smoke.sh
```

CI expectations:
- `ci/security.yml` validates attestation materials and cosign signatures.
- `ci/sandbox.yml` runs sandbox workflow scenarios with telemetry fuzzing.
- `.github/workflows/ci.yml` runs the public GitHub Actions pipeline (configure, build, unit and integration tests).
- `ci/pipeline.yml` runs the default lint/build/test stages used by the OSS mirror.
- `ci/hw-smoke.sh` executes on bare metal to verify MSR/perf integration and metrics TLS.

> **Note**
> Historical documentation referenced `ci/security.yml` and `ci/sandbox.yml` for supply-chain and fuzzing coverage. Those
> workflows are not currently part of this repository. Security attestation validation and sandbox fuzzing remain roadmap
> items and should be treated as future work until corresponding workflows land.
## Packaging

- `packaging/Dockerfile` builds a minimal container with the dispatcher defaulting to health checks on startup.
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/metrics_tuner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ std::string FetchMetrics(uint16_t port) {
::inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr);
int rc = ::connect(fd, reinterpret_cast<sockaddr *>(&addr), sizeof(addr));
assert(rc == 0);
(void)rc;

const char request[] = "GET /metrics HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n";
ssize_t sent = ::send(fd, request, sizeof(request) - 1, 0);
assert(sent == static_cast<ssize_t>(sizeof(request) - 1));
(void)sent;

std::string response;
char buffer[1024];
Expand All @@ -55,6 +57,7 @@ int main() {
// Metrics exporter lifecycle
int start_rc = tsd_metrics_exporter_start("127.0.0.1", 0);
assert(start_rc == 0);
(void)start_rc;
uint16_t port = tsd_metrics_exporter_listen_port();
assert(port != 0);

Expand Down Expand Up @@ -100,6 +103,7 @@ int main() {
fs::path bundle_path = tmpdir / "policy_bundle.json";
bool wrote = WritePolicyBundle(bundle_path.string(), result);
assert(wrote);
(void)wrote;

std::ifstream in(bundle_path);
std::string contents((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
Expand Down
3 changes: 3 additions & 0 deletions tests/policy/test_policy_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static void test_predictive_convergence(void) {
assert(fallback == 0);
assert(rc == 1);
assert(target < SIMD_AVX512);
(void)rc;

tsd_dispatcher_policy_destroy(state);
}
Expand All @@ -67,6 +68,7 @@ static void test_predictive_stability(void) {
assert(fallback == 0);
assert(rc == 0);
assert(target == SIMD_AVX2);
(void)rc;

tsd_dispatcher_policy_destroy(state);
}
Expand All @@ -86,6 +88,7 @@ static void test_predictive_fallback(void) {
assert(rc == 0);
assert(fallback == 1);
assert(target == SIMD_AVX2);
(void)rc;

tsd_dispatcher_policy_destroy(state);
}
Expand Down
11 changes: 11 additions & 0 deletions tests/telemetry/test_telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ int main() {
history_ptr.reset();
fs::remove(path);

(void)evaluated;
(void)kTolerance;
(void)expected_weighted;
(void)record;
(void)second_value;
(void)record_after;
(void)expected_mean;
(void)expected_variance;
(void)persisted;
(void)fallback_value;

return 0;
}