Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3fdfeb2
feat: implement rust-based case conversion engine
nitishhsinghhh Jun 8, 2026
a2e7dcf
Potential fix for pull request finding 'CodeQL / Useless assignment t…
nitishhsinghhh Jun 8, 2026
b9354ad
Potential fix for pull request finding 'CodeQL / Virtual call in cons…
nitishhsinghhh Jun 8, 2026
2445d35
Potential fix for pull request finding 'CodeQL / Call to 'System.IO.P…
nitishhsinghhh Jun 8, 2026
d1bde09
Potential fix for pull request finding 'CodeQL / Generic catch clause'
nitishhsinghhh Jun 8, 2026
f75459a
Release docs
nitishhsinghhh Jun 17, 2026
ee0a0ee
Added release docs
nitishhsinghhh Jun 17, 2026
66c6009
Added the file to resolve error
nitishhsinghhh Jun 17, 2026
6dda038
Added rust engine for DLL injection
nitishhsinghhh Jun 17, 2026
dcbe484
removed hardcoded visual studio from the CI
nitishhsinghhh Jun 17, 2026
fcb8c89
removed hardcoded visual studio from the CI
nitishhsinghhh Jun 17, 2026
b29dfd2
removed hardcoded visual studio from the CI
nitishhsinghhh Jun 17, 2026
3af59e3
Added files
nitishhsinghhh Jun 23, 2026
a326c79
Added files
nitishhsinghhh Jun 23, 2026
6e52175
style: apply clang-format fixes to resolve CI error
nitishhsinghhh Jun 23, 2026
3c9b7a3
style: replace nested block comments with single-line comments for cl…
nitishhsinghhh Jun 23, 2026
a846e8c
fix: sanitize comment dividers for clang-tidy compliance
nitishhsinghhh Jun 23, 2026
69da23a
hardcoded path to make it work on any runner
nitishhsinghhh Jun 23, 2026
2ee5995
hardcoded path to make it work on any runner
nitishhsinghhh Jun 23, 2026
44b23bf
hardcoded path to make it work on any runner
nitishhsinghhh Jun 23, 2026
c0441e5
hardcoded path to make it work on any runner
nitishhsinghhh Jun 23, 2026
d0bbdca
hardcoded path to make it work on any runner
nitishhsinghhh Jun 23, 2026
ab55580
Connection refused troubleshooting
nitishhsinghhh Jul 4, 2026
f4b3c44
Rust specifc changes
nitishhsinghhh Aug 23, 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
26 changes: 13 additions & 13 deletions .github/workflows/dotnet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
paths: &shared_paths
- 'Backend/CaseConversionAPI/CppLib/**'
- 'Backend/CaseConversionAPI/DotNetAPI/**'
- 'Backend/CaseConversionAPI/Tests/DotNetTests/**' # <-- FIXED: tests to Tests
- 'Backend/CaseConversionAPI/Tests/DotNetTests/**'
- '.github/workflows/dotnet-tests.yml'
pull_request:
branches: ["main"]
Expand Down Expand Up @@ -66,9 +66,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# ------------------------------------------------------------
# ------------------------------------------------------------------
# Resource Initialization & Structured Logging
# ------------------------------------------------------------
# ------------------------------------------------------------------

- name: Initialize Workflow Logs
shell: bash
Expand All @@ -89,9 +89,9 @@ jobs:
with:
dotnet-version: "8.0.x"

# ------------------------------------------------------------
# ------------------------------------------------------------------
# Native Layer Build (C++17)
# ------------------------------------------------------------
# ------------------------------------------------------------------

- name: Build C++ Library (Unix)
if: runner.os != 'Windows'
Expand All @@ -111,20 +111,20 @@ jobs:
-G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --parallel

# ------------------------------------------------------------
# ------------------------------------------------------------------
# Managed Layer Build & ABI Bridge Preparation
# ------------------------------------------------------------
# ------------------------------------------------------------------

- name: Build .NET Tests
working-directory: Backend/CaseConversionAPI/Tests/DotNetTests # <-- FIXED: tests to Tests
working-directory: Backend/CaseConversionAPI/Tests/DotNetTests
run: |
dotnet restore
dotnet build --configuration Release

- name: Inject Native Library (Artifact Injection)
shell: bash
run: |
DEST_PATH="Backend/CaseConversionAPI/Tests/DotNetTests/bin/Release/net8.0/" # <-- FIXED: tests to Tests
DEST_PATH="Backend/CaseConversionAPI/Tests/DotNetTests/bin/Release/net8.0/"
mkdir -p "$DEST_PATH"

if [ "${{ runner.os }}" == "Windows" ]; then
Expand All @@ -139,16 +139,16 @@ jobs:
fi

cp "$LIB_FILE" "$DEST_PATH$TARGET_NAME"
cp "$LIB_FILE" "Backend/CaseConversionAPI/Tests/DotNetTests/$TARGET_NAME" # <-- FIXED: tests to Tests
cp "$LIB_FILE" "Backend/CaseConversionAPI/Tests/DotNetTests/$TARGET_NAME"

echo "{\"event\": \"BRIDGE_READY\", \"lib\": \"$TARGET_NAME\", \"os\": \"${{ matrix.os }}\"}"

# ------------------------------------------------------------
# ------------------------------------------------------------------
# Test Execution (With Telemetry Context)
# ------------------------------------------------------------
# --------------------------------------------------------------------

- name: Run Integration Tests
working-directory: Backend/CaseConversionAPI/Tests/DotNetTests # <-- FIXED: tests to Tests
working-directory: Backend/CaseConversionAPI/Tests/DotNetTests
shell: bash
env:
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ runner.os == 'Linux' && 'http://localhost:4317' || 'http://localhost:9999' }}
Expand Down
68 changes: 60 additions & 8 deletions .github/workflows/full-stack-orchestration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@
-B Backend/CaseConversionAPI/CppLib/build_dll \
-DCMAKE_BUILD_TYPE=Release

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1

- name: Configure DLL (Windows)
if: runner.os == 'Windows'
run: |
cmake -S Backend/CaseConversionAPI/CppLib `
-B Backend/CaseConversionAPI/CppLib/build_dll `
-DCMAKE_BUILD_TYPE=Release `
-DPROCESSSTRING_EXPORTS=ON `
-G "Visual Studio 17 2022" -A x64
cmake -S Backend/CaseConversionAPI/CppLib `
-B Backend/CaseConversionAPI/CppLib/build_dll `
-G "NMake Makefiles" `
-DCMAKE_BUILD_TYPE=Release

- name: Build DLL
run: cmake --build Backend/CaseConversionAPI/CppLib/build_dll --config Release --parallel
Expand All @@ -108,10 +110,24 @@
with:
dotnet-version: '8.0.x'

- name: Restore & Publish .NET API
- name: Clean .NET Build
run: |
dotnet clean Backend/CaseConversionAPI/DotNetAPI -c Release

- name: Remove Build Artifacts
shell: bash
run: |
find Backend/CaseConversionAPI -type d \( -name bin -o -name obj \) -exec rm -rf {} + || true

- name: Restore .NET Dependencies
run: |
dotnet restore Backend/CaseConversionAPI/DotNetAPI
dotnet publish Backend/CaseConversionAPI/DotNetAPI -c Release -o ./publish
dotnet restore Backend/CaseConversionAPI/DotNetAPI --force

- name: Build .NET API
run: dotnet build Backend/CaseConversionAPI/DotNetAPI -c Release --no-restore

- name: Publish .NET API
run: dotnet publish Backend/CaseConversionAPI/DotNetAPI -c Release --no-build -o ./publish

# ABI Bridge (Artifact Injection)
- name: Inject Native Artifacts
Expand All @@ -132,6 +148,42 @@
name: DotNetAPI-${{ matrix.os }}
path: ./publish/

# ------------------------------------------------------------
# RUST NATIVE ENGINE and dotnet PUBLISH
# ------------------------------------------------------------

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: Build Rust Library
working-directory: Backend/CaseConversionAPI/RustLib
run: cargo build --release

- name: Create Rust Runtime Directory
shell: bash
run: |
mkdir -p ./publish/rust

- name: Copy Rust Library (Linux)
if: runner.os == 'Linux'
run: |
cp Backend/CaseConversionAPI/RustLib/target/release/librust_lib.so \
./publish/rust/

- name: Copy Rust Library (macOS)
if: runner.os == 'macOS'
run: |
cp Backend/CaseConversionAPI/RustLib/target/release/librust_lib.dylib \
./publish/rust/

- name: Copy Rust Library (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Copy-Item `
Backend/CaseConversionAPI/RustLib/target/release/rust_lib.dll `
./publish/rust/

# ------------------------------------------------------------
# JOB 2: FRONTEND VALIDATION
# ------------------------------------------------------------
Expand Down
39 changes: 33 additions & 6 deletions .github/workflows/native-engine-ci_Non_DLL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@
# 1.4 2026-05-12 Nitish Singh Refactored Header & Log Logic */
#*********************************************************************/

name: C++ CI CaseConversionAPI - All Platforms (Local App)
name: C++ CI CaseConversionAPI - All Platforms

on:
push:
branches: ["main"]
paths: &shared
- 'Backend/CaseConversionAPI/CppLib/'
- 'Backend/CaseConversionAPI/RustLib/'
- '.github/workflows/cpp-local-app-validation.yml'
pull_request:
branches: ["main"]
paths: *shared

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -44,6 +49,7 @@
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -52,31 +58,51 @@
env:
BUILD_DIR: Backend/CaseConversionAPI/CppLib/build
CPP_ROOT: Backend/CaseConversionAPI/CppLib
RUST_ROOT: Backend/CaseConversionAPI/RustLib

steps:

# ------------------------------------------------------------
# SOURCE ACQUISITION
# ------------------------------------------------------------

- name: Checkout repository
uses: actions/checkout@v4

# ------------------------------------------------------------
# Resource Initialization & Toolchain Setup
# Workflow Initialization
# ------------------------------------------------------------

- name: Initialize Workflow Logs
shell: bash
run: |
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "{\"timestamp\": \"$TIMESTAMP\", \"event\": \"MATRIX_INIT\", \"os\": \"${{ matrix.os }}\"}"

# ------------------------------------------------------------
# Toolchain Setup
# ------------------------------------------------------------

- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v1.14
with:
cmake-version: "3.26.4"

- name: Install compiler & CMake (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y build-essential cmake jq
run: sudo apt-get update
sudo apt-get install -y build-essential cmake jq

- name: Install CMake (macOS)
if: runner.os == 'macOS'
run: brew install cmake

- name: Install CMake (Windows)
if: runner.os == 'Windows'
run: choco install cmake ninja --installargs 'ADD_CMAKE_TO_PATH=System' --yes
- name: Setup MSVC Environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

# ------------------------------------------------------------
# Workspace Cleanup & Config Injection
Expand Down Expand Up @@ -116,6 +142,7 @@
# ------------------------------------------------------------
# Native Test Execution (CTEST Matrix)
# ------------------------------------------------------------

- name: Run tests (Linux/macOS)
if: runner.os != 'Windows'
run: ctest -V --output-on-failure --test-dir ${{ env.BUILD_DIR }}
Expand Down
45 changes: 29 additions & 16 deletions .github/workflows/telemetry-e2e-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,29 +83,42 @@ jobs:
# Managed Layer & Sidecar Orchestration
# ------------------------------------------------------------

- name: Bootstrap .NET API
- name: Build and Start .NET API
run: |
echo "=== Native Artifacts ==="
find Backend/CaseConversionAPI/CppLib/build -type f | sort

- name: Start API
env:
OTEL_EXPORTER_OTLP_ENDPOINT: http://localhost:4317
ASPNETCORE_URLS: http://localhost:5050
ASPNETCORE_URLS: http://localhost:5050
ASPNETCORE_ENVIRONMENT: Development
LD_LIBRARY_PATH: .:${{ github.workspace }}/Backend/CaseConversionAPI/CppLib/build
run: |
cd Backend/CaseConversionAPI/DotNetAPI

dotnet build -c Release

# Synchronize Native Binary with API Runtime
cp ../CppLib/build/libProcessStringDLL.so .
cp ../CppLib/build/libProcessStringDLL.so ./bin/Release/net8.0/

# Background Execution for Trace Capture
dotnet ./bin/Release/net8.0/DotNetAPI.dll > api.log 2>&1 &

echo "Waiting for API Readiness at :5050..."
timeout 60s bash -c 'until curl -sf http://localhost:5050/api/WordCase/convert \
-X POST -H "Content-Type: application/json" \
-d "{\"text\":\"CI-PROBE\", \"choice\":1}"; do
sleep 2;
done' || (echo "FATAL: API Startup Timeout" && cat api.log && exit 1)

LIB_PATH=$(find ../CppLib/build -name "*.so" | head -n1)

cp "$LIB_PATH" ./bin/Release/net8.0/

nohup dotnet ./bin/Release/net8.0/DotNetAPI.dll > api.log 2>&1 &

echo "Waiting for API..."

for i in {1..30}; do
if curl -s http://localhost:5050/ >/dev/null; then
echo "API started."
exit 0
fi

sleep 2
done

echo "API failed to start"
cat api.log
exit 1

# ------------------------------------------------------------
# Traffic Injection & Span Generation
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ docker-compose.override.yml
*DotNetAPI.Tests.csproj.lscache
*DotNetAPI.csproj.lscache

Advantage/
Advantage/

*Cargo.lock
target/
Loading
Loading