-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP-IDF Component Continuous Integration #229
Merged
pavel-kirienko
merged 6 commits into
OpenCyphal:master
from
manforowicz:add-esp-component-registry
Sep 18, 2024
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7f1bee6
Added files required for ESP-IDF component.
8ba46ab
Added files necessary for ESP component.
3943a03
Update idf_component.yml description to mention CAN.
manforowicz 562d443
Switched to script to package ESP-IDF component.
cbf9f5d
--amend
6c7bb6c
Moved script to esp_metadata and added new line.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow only runs when it is manually dispatched using GitHub. | ||
# It does a dry-run of publishing this project to the ESP component registry. | ||
# The project won't actually be published. | ||
|
||
name: Dry-run ESP-IDF component upload. | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
upload_components: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Dry-run upload to the ESP component registry | ||
uses: espressif/upload-components-ci-action@v1 | ||
with: | ||
dry_run: True | ||
name: "libcanard" | ||
# Meaningless version for the purpose of dry run. | ||
version: "0.0.0" | ||
namespace: "opencyphal" | ||
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This workflow gets triggered when a GitHub release is published. | ||
# It publishes this project to the ESP component registry. | ||
|
||
name: Publish component to https://components.espressif.com | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload_components: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Upload to the ESP component registry | ||
uses: espressif/upload-components-ci-action@v1 | ||
with: | ||
name: "libcanard" | ||
version: ${{ github.event.release.tag_name }} | ||
namespace: "opencyphal" | ||
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file sets up builds if libcanard is used | ||
# as an ESP-IDF component. | ||
|
||
idf_component_register(SRCS "libcanard/canard.c" | ||
INCLUDE_DIRS "libcanard/") | ||
|
||
# Apply the Kconfig options to the source file. | ||
|
||
if(NOT CONFIG_CANARD_ASSERTIONS) | ||
target_compile_definitions(${COMPONENT_LIB} PRIVATE "CANARD_ASSERT=(void)") | ||
endif() | ||
|
||
if(CONFIG_CANARD_CRC_TABLE) | ||
target_compile_definitions(${COMPONENT_LIB} PRIVATE CANARD_CRC_TABLE=1) | ||
else() | ||
target_compile_definitions(${COMPONENT_LIB} PRIVATE CANARD_CRC_TABLE=0) | ||
endif() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This file defines customizable build options | ||
# if libcanard is used as an ESP-IDF component. | ||
# Configure these values by running 'idf.py menuconfig' in this | ||
# directory. | ||
|
||
menu "Libcanard" | ||
|
||
config CANARD_ASSERTIONS | ||
bool "Enable libcanard assertions." | ||
default y | ||
help | ||
Set to 'n' to disable libcanard assertions. | ||
|
||
config CANARD_CRC_TABLE | ||
bool "Enable libcanard CRC table" | ||
default y | ||
help | ||
Set to 'n' to use slow but ROM-efficient transfer-CRC computation algorithm. | ||
Doing so is expected to save ca. 500 bytes of ROM and | ||
increase the cost of RX/TX transfer processing by ~half. | ||
|
||
|
||
endmenu |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Metadata for using libcanard as an ESP-IDF component. | ||
|
||
# Note: Version is not specified in this file, | ||
# because the 'esp_publish.yml' GitHub action | ||
# automatically sets it based on the release version. | ||
|
||
description: "OpenCyphal for embedded systems." | ||
manforowicz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
url: "https://github.com/OpenCyphal/libcanard" | ||
license: "MIT" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to hide
CMakeLists.txt
,Kconfig
, andidf_component.yml
into a subdirectory, or at least the first two? I don't want to pollute the project root with third-party items.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be doable via
repository_info