Added header revision #58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| # ------------------------------- | |
| # Checkout repository | |
| # ------------------------------- | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # ------------------------------- | |
| # Create a test marker file at repo root | |
| # ------------------------------- | |
| - name: Create marker file | |
| run: touch marker_file.txt | |
| # ------------------------------- | |
| # Install compiler & CMake | |
| # ------------------------------- | |
| - name: Install compiler and CMake | |
| run: sudo apt-get update && sudo apt-get install -y build-essential cmake | |
| # ------------------------------- | |
| # Show directory structure (Debug) | |
| # ------------------------------- | |
| - name: Show directory structure | |
| run: ls -R | |
| # ------------------------------- | |
| # Use local app CMakeLists | |
| # ------------------------------- | |
| - name: Use local app CMakeLists | |
| run: cp CaseConversionAPI/CppLib/CMakeListsLocalApp.txt CaseConversionAPI/CppLib/CMakeLists.txt | |
| # ------------------------------- | |
| # Configure project with CMake | |
| # ------------------------------- | |
| - name: Configure String Conversion | |
| run: cmake -S CaseConversionAPI/CppLib -B CaseConversionAPI/CppLib/build -DCMAKE_BUILD_TYPE=Release | |
| # ------------------------------- | |
| # Build application and tests | |
| # ------------------------------- | |
| - name: Build project | |
| run: cmake --build CaseConversionAPI/CppLib/build --parallel | |
| # ------------------------------- | |
| # Run the main application | |
| # ------------------------------- | |
| - name: Run String Conversion App | |
| run: ./CaseConversionAPI/CppLib/build/app | |
| # ------------------------------- | |
| # Run tests with CTest | |
| # ------------------------------- | |
| - name: Run String Conversion Tests with Logs | |
| run: ./CaseConversionAPI/CppLib/build/runTests --gtest_output=console --gtest_brief=0 |