Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Apr 16, 2024
1 parent a806a0a commit 3e0b4bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
- main
- 'issue/*'

# To test use https://github.com/nektos/act and specify the event as "act"
# For example:
#
# act act -j verification --bind --reuse
#
# That command will run the verification job locally and bind the current directory
# into the container (You'll probably need to delete any existing build directory
# before running act).
jobs:
warmup:
if: >
Expand All @@ -27,9 +19,7 @@ jobs:
container: ghcr.io/opencyphal/toolshed:ts22.4.3
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'act' }}
- name: Cache ext modules
if: ${{ github.event_name != 'act' }}
id: libcyphal-ext
uses: actions/cache@v4
env:
Expand Down Expand Up @@ -70,9 +60,7 @@ jobs:
toolchain: gcc
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'act' }}
- name: Cache ext modules
if: ${{ github.event_name != 'act' }}
id: libcyphal-ext
uses: actions/cache@v4
env:
Expand Down Expand Up @@ -119,9 +107,7 @@ jobs:
needs: [warmup]
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'act' }}
- name: Cache ext modules
if: ${{ github.event_name != 'act' }}
id: libcyphal-ext
uses: actions/cache@v4
env:
Expand All @@ -141,15 +127,15 @@ jobs:
--build-flavor Debug
build-docs
- name: Setup Pages
if: ${{ github.event_name != 'pull_request' && github.event_name != 'act' }}
if: ${{ github.event_name != 'pull_request' }}
uses: actions/configure-pages@v5
- name: Upload docs
if: ${{ github.event_name != 'pull_request' && github.event_name != 'act' }}
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@v3
with:
path: "build/docs/html/"
- name: upload-pr-docs
if: ${{ github.event_name == 'pull_request' && github.event_name != 'act' }}
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: pr-docs
Expand Down
1 change: 1 addition & 0 deletions include/libcyphal/transport/defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ struct ServiceRxTransfer final
};

/// @brief Defines maximum number of media interfaces that can be used in a Cyphal transport.
/// TODO: This is a temporary constant and will be replaced by `cetl::span::size()` (see `makeTransport`).
constexpr std::size_t MaxMediaInterfaces = 3;

} // namespace transport
Expand Down
5 changes: 4 additions & 1 deletion test/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ foreach(NATIVE_TEST ${NATIVE_TESTS})
list(APPEND ALL_TESTS_BUILD ${LOCAL_TEST_TARGET})
list(APPEND ALL_TESTS_RUN ${LOCAL_TEST_REPORT})

# We need to exclude the "external" directory from coverage reports.
cmake_path(APPEND LIBCYPHAL_ROOT "external" OUTPUT_VARIABLE LIBCYPHAL_EXTERNAL_PATH)

if (CMAKE_BUILD_TYPE STREQUAL "Coverage")
define_gcovr_tracefile_target(
TARGET ${LOCAL_TEST_TARGET}
ROOT_DIRECTORY ${LIBCYPHAL_ROOT}
TARGET_EXECUTION_DEPENDS ${LOCAL_TEST_REPORT}
OBJECT_LIBRARY ${LOCAL_TEST_LIB}
EXCLUDE_PATHS ${LIBCYPHAL_ROOT}external
EXCLUDE_PATHS ${LIBCYPHAL_EXTERNAL_PATH}
EXCLUDE_TEST_FRAMEWORKS
EXCLUDE_TARGET
ENABLE_INSTRUMENTATION
Expand Down

0 comments on commit 3e0b4bb

Please sign in to comment.