Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 28 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
pull_request:
release:
types: [ published ]
types: [published]

env:
BUILD_TYPE: Debug
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: true

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -115,7 +115,7 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: true

Expand All @@ -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

Expand All @@ -172,17 +173,17 @@ 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

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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
prerelease: true
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
2 changes: 2 additions & 0 deletions cmake-modules/CodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down