-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (66 loc) · 3.66 KB
/
cpp-ci.yml
File metadata and controls
83 lines (66 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#*********************************************************************/
# CI Pipeline - Linux Native Application Execution */
# */
# Purpose : Validates the end-to-end build and execution flow of */
# the C++ String Conversion Application on Linux. */
# Trigger : Push to main / Pull Request to main */
# Runtime : Ubuntu Latest */
# */
# Notes : - Synchronizes the LocalApp CMake configuration. */
# - Validates core logic via GoogleTest console output. */
# - Confirms binary linkage and runtime stability. */
# - Updated for Monorepo (backend/ subdirectory). */
# */
# Revision History: */
# ------------------------------------------------------------------ */
# Version Date Author Description */
# ------------------------------------------------------------------ */
# 1.0 2026-04-14 Nitish Singh Initial Linux App Workflow */
# 1.1 2026-04-15 Nitish Singh Updated for /backend path */
#*********************************************************************/
name: C++ CI Working Application using build steps
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# ======================================================
# 1. REPOSITORY & ENVIRONMENT PREPARATION
# ======================================================
- name: Checkout repository
uses: actions/checkout@v4
- name: Create marker file
run: touch marker_file.txt
- name: Install compiler and CMake
run: sudo apt-get update && sudo apt-get install -y build-essential cmake
- name: Show directory structure
run: ls -R
# ======================================================
# 2. ARCHITECTURAL CONFIGURATION (Updated Paths)
# ======================================================
- name: Use local app CMakeLists
# TRICK: Swap the default CMakeLists with a specialized version
# for local/standalone app building. This allows us to build
# a testable executable without modifying the core API build logic.
run: cp backend/CaseConversionAPI/CppLib/CMakeListsLocalApp.txt backend/CaseConversionAPI/CppLib/CMakeLists.txt
- name: Configure String Conversion
run: cmake -S backend/CaseConversionAPI/CppLib -B backend/CaseConversionAPI/CppLib/build -DCMAKE_BUILD_TYPE=Release
# ======================================================
# 3. COMPILATION & BUILD
# ======================================================
- name: Build project
run: cmake --build backend/CaseConversionAPI/CppLib/build --parallel
# ======================================================
# 4. RUNTIME VALIDATION (APPLICATION)
# ======================================================
- name: Run String Conversion App
run: ./backend/CaseConversionAPI/CppLib/build/app
# ======================================================
# 5. NATIVE TEST EXECUTION (GOOGLE TEST)
# ======================================================
- name: Run String Conversion Tests with Logs
run: ./backend/CaseConversionAPI/CppLib/build/runTests --gtest_output=console --gtest_brief=0