diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 269e718..b81561c 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 @@ -132,26 +132,27 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - run: ctest -C $BUILD_TYPE + shell: bash + run: ctest -C Release - 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 build-mac: - runs-on: macos-12 + runs-on: macos-14 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 with: submodules: true @@ -172,7 +173,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 +181,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..c1e23ae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 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 () 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