From 6d2e8a9e68866384784e0573784177c2a91dd066 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 00:50:14 +0100 Subject: [PATCH 01/11] Update workflow actions --- .github/workflows/ci.yaml | 50 +++++++++++++++++----------------- .github/workflows/release.yaml | 6 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 269e718..a73349b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,7 @@ on: push: pull_request: release: - types: [ published ] + types: [published] env: BUILD_TYPE: Debug @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true @@ -60,21 +60,21 @@ jobs: - name: Upload test logs if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: testing-shl-${{ matrix.build_single_header }} path: ${{github.workspace}}/build/Testing - name: Upload coverage if: ${{ matrix.build_single_header == 'OFF' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: coverage path: ${{github.workspace}}/build/coverage_xml.xml - name: Upload generated header if: ${{ matrix.build_single_header == 'ON' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: single-header path: ${{github.workspace}}/lib/shl/embedded_cli.h @@ -86,23 +86,23 @@ jobs: files: ${{ github.workspace }}/build/coverage_xml.xml build-arduino-example: - runs-on: ubuntu-latest + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v6 - - name: Generate single header lib - working-directory: ${{github.workspace}}/lib - run: python3 build-shl.py + - name: Generate single header lib + working-directory: ${{github.workspace}}/lib + run: python3 build-shl.py - - name: Copy single header file to sketch dir - run: cp ${{github.workspace}}/lib/shl/embedded_cli.h ${{github.workspace}}/examples/arduino-cli/embedded_cli.h + - name: Copy single header file to sketch dir + run: cp ${{github.workspace}}/lib/shl/embedded_cli.h ${{github.workspace}}/examples/arduino-cli/embedded_cli.h - - name: Compile arduino sketch - uses: arduino/compile-sketches@v1 - with: - sketch-paths: | - - examples/arduino-cli + - name: Compile arduino sketch + uses: arduino/compile-sketches@v1 + with: + sketch-paths: | + - examples/arduino-cli build-win: strategy: @@ -115,7 +115,7 @@ jobs: runs-on: windows-2019 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true @@ -136,13 +136,13 @@ jobs: - name: Upload test logs if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: testing-win-${{ matrix.arch }} path: ${{github.workspace}}/build/Testing - name: Upload windows examples - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: windows-example-${{ matrix.arch }} path: ${{github.workspace}}/build/examples/win32-example/Release/embedded_cli_win32.exe @@ -151,7 +151,7 @@ jobs: runs-on: macos-12 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true @@ -172,7 +172,7 @@ jobs: - name: Upload test logs if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v6 with: name: testing-mac path: ${{github.workspace}}/build/Testing @@ -180,9 +180,9 @@ jobs: add-release-assets: runs-on: ubuntu-latest if: github.event_name == 'release' - needs: [ build ] + needs: [build] steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v7 with: path: artifacts diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7bd275e..9308f55 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: Release on: push: tags: - - '*' + - "*" jobs: create-release: @@ -14,9 +14,9 @@ jobs: id: version - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: token: ${{ secrets.RELEASE_ACCESS_TOKEN }} name: embedded-cli ${{ steps.version.outputs.version }} draft: false - prerelease: true \ No newline at end of file + prerelease: true From 929ab2390e023cf33f71fd467eca65a32a0edf31 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 01:26:54 +0100 Subject: [PATCH 02/11] Exclude deps/catch2 from gcovr coverage analysis --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d8c82c..3c9b45e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,8 @@ if (${BUILD_TESTS}) NAME coverage_xml EXECUTABLE ctest DEPENDENCIES embedded_cli_tests - EXCLUDE "tests/*") + EXCLUDE "tests/*" + "deps/catch2/*" + "build/deps/*") endif () endif () From 46f6dce7d1c9d205f9dec1f13d849e9f90449e60 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 01:44:08 +0100 Subject: [PATCH 03/11] Fix macos build machine unsupported version, specify shell as bash for ctest run --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a73349b..a391b3f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -132,6 +132,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build + shell: bash run: ctest -C $BUILD_TYPE - name: Upload test logs @@ -148,7 +149,7 @@ jobs: path: ${{github.workspace}}/build/examples/win32-example/Release/embedded_cli_win32.exe build-mac: - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v6 From 2c5318d5b1d5ed40f808c5a854fba06c35205e50 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 01:57:32 +0100 Subject: [PATCH 04/11] Run ctest with Release config instead of Debug --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a391b3f..d37d0dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -133,7 +133,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build shell: bash - run: ctest -C $BUILD_TYPE + run: ctest -C Release - name: Upload test logs if: ${{ always() }} @@ -165,11 +165,11 @@ jobs: - name: Build working-directory: ${{github.workspace}}/build - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config Release - name: Test working-directory: ${{github.workspace}}/build - run: ctest -C $BUILD_TYPE + run: ctest -C Release - name: Upload test logs if: ${{ always() }} From b3c25bfe3bd7a0f16a2d0f0598948c618f533849 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:02:15 +0100 Subject: [PATCH 05/11] Revert changes for macos cmake and ctest runs --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d37d0dd..b81561c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -165,11 +165,11 @@ jobs: - name: Build working-directory: ${{github.workspace}}/build - run: cmake --build . --config Release + run: cmake --build . --config $BUILD_TYPE - name: Test working-directory: ${{github.workspace}}/build - run: ctest -C Release + run: ctest -C $BUILD_TYPE - name: Upload test logs if: ${{ always() }} From 1f45fae64e815aa98a7b79ea7b917ed889bac49f Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:05:21 +0100 Subject: [PATCH 06/11] Add --gcov-ignore-errors=no_working_dir_found" to Coverage step --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b81561c..8a98a66 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: - name: Coverage working-directory: ${{github.workspace}}/build shell: bash - run: cmake --build . --target coverage_xml + run: cmake --build . --target coverage_xml -- VERBOSE=1 GCOVR_ADDITIONAL_ARGS="--gcov-ignore-errors=no_working_dir_found" - name: Upload test logs if: ${{ always() }} From b3aab68a2b9c58ca861f3abcb2a03033a051cebb Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:13:51 +0100 Subject: [PATCH 07/11] Improves gcovr error handling during coverage generation Adds option to ignore 'no_working_dir_found' errors when running gcovr for XML and HTML reports. Prevents coverage tasks from failing due to missing working directory issues. --- cmake-modules/CodeCoverage.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake-modules/CodeCoverage.cmake b/cmake-modules/CodeCoverage.cmake index a1b0058..404477b 100644 --- a/cmake-modules/CodeCoverage.cmake +++ b/cmake-modules/CodeCoverage.cmake @@ -334,6 +334,7 @@ function(setup_target_for_coverage_gcovr_xml) # Running gcovr COMMAND ${GCOVR_PATH} --xml + --gcov-ignore-errors=no_working_dir_found -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR} -o ${Coverage_NAME}.xml @@ -410,6 +411,7 @@ function(setup_target_for_coverage_gcovr_html) # Running gcovr COMMAND ${GCOVR_PATH} --html --html-details + --gcov-ignore-errors=no_working_dir_found -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR} -o ${Coverage_NAME}/index.html From 45e2f0a4b5429a955e2d7844a3d956eeb4347458 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:19:26 +0100 Subject: [PATCH 08/11] Revert changes for Coverage step --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a98a66..b81561c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: - name: Coverage working-directory: ${{github.workspace}}/build shell: bash - run: cmake --build . --target coverage_xml -- VERBOSE=1 GCOVR_ADDITIONAL_ARGS="--gcov-ignore-errors=no_working_dir_found" + run: cmake --build . --target coverage_xml - name: Upload test logs if: ${{ always() }} From cb2b4639d6f697e313a5978237d9124f85b51714 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:13:51 +0100 Subject: [PATCH 09/11] Change CodeCoverage.cmake to improve gcovr error handling during coverage generation Adds option to ignore 'no_working_dir_found' errors when running gcovr for XML and HTML reports. Prevents coverage tasks from failing due to missing working directory issues. --- cmake-modules/CodeCoverage.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake-modules/CodeCoverage.cmake b/cmake-modules/CodeCoverage.cmake index a1b0058..404477b 100644 --- a/cmake-modules/CodeCoverage.cmake +++ b/cmake-modules/CodeCoverage.cmake @@ -334,6 +334,7 @@ function(setup_target_for_coverage_gcovr_xml) # Running gcovr COMMAND ${GCOVR_PATH} --xml + --gcov-ignore-errors=no_working_dir_found -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR} -o ${Coverage_NAME}.xml @@ -410,6 +411,7 @@ function(setup_target_for_coverage_gcovr_html) # Running gcovr COMMAND ${GCOVR_PATH} --html --html-details + --gcov-ignore-errors=no_working_dir_found -r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS} --object-directory=${PROJECT_BINARY_DIR} -o ${Coverage_NAME}/index.html From a7ac1d3027932597938553019b9c4cb521929348 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:19:26 +0100 Subject: [PATCH 10/11] Revert changes for Coverage step --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a98a66..b81561c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: - name: Coverage working-directory: ${{github.workspace}}/build shell: bash - run: cmake --build . --target coverage_xml -- VERBOSE=1 GCOVR_ADDITIONAL_ARGS="--gcov-ignore-errors=no_working_dir_found" + run: cmake --build . --target coverage_xml - name: Upload test logs if: ${{ always() }} From f175b80897b6cd6be6ce4834dbc2a84eba677c09 Mon Sep 17 00:00:00 2001 From: TheColector Date: Wed, 11 Feb 2026 02:33:34 +0100 Subject: [PATCH 11/11] Revert to singe-quote usage in release.yaml --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9308f55..c1e23ae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: Release on: push: tags: - - "*" + - '*' jobs: create-release: