forked from libcsp/libcsp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'libcsp-develop' into develop
- Loading branch information
Showing
52 changed files
with
636 additions
and
247 deletions.
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,76 @@ | ||
--- | ||
name: Q & A | ||
about: Ask for help | ||
title: '' | ||
labels: Q&A | ||
--- | ||
|
||
## Description | ||
|
||
<!-- | ||
Describe your question in detail. Explain what you're trying to | ||
achieve and what specific part is causing trouble. | ||
--> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- | ||
Provide a step-by-step guide on how to reproduce the issue. Include | ||
any code snippets, commands, or configurations. | ||
--> | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
## Expected behavior | ||
|
||
<!-- | ||
A clear and concise description of what you expected to happen. | ||
--> | ||
|
||
## Actual Behavior | ||
|
||
<!-- | ||
Describe what actually happened. Include any error messages or | ||
unexpected outputs. | ||
--> | ||
|
||
## Environment Details | ||
|
||
Provide information about your environment, including: | ||
|
||
- Build OS: (e.g., Ubuntu 24.04) | ||
- Target OS: (e.g., Ubunut 24.04, FreeRTOS, Zephyr) | ||
- libcsp commit hash: | ||
- Meson version: | ||
- CMake version: | ||
- GNU Make version | ||
- Ninja version: | ||
|
||
## Logs or console output from the very beginning to the end | ||
|
||
<!-- | ||
Do NOT add screen shorts. Make sure to copy & paste in plain text. Or, | ||
use logging feature of your terminal software. | ||
--> | ||
|
||
## Additional Context | ||
|
||
<!-- | ||
Add any other context, logs, or screenshots that might help in | ||
understanding the issue. | ||
--> | ||
|
||
## Checklist | ||
|
||
<!-- | ||
Please confirm by replacing `[ ]` with `[x]`. | ||
--> | ||
|
||
- [ ] I've searched in "Issues" for similar issues, both open and closed. | ||
- [ ] I've used GitHub Flavored Markdown (GFM) to format my text. | ||
- [ ] I've avoided using screenshots for console output or logs | ||
- [ ] I've included all relevant details and steps to reproduce the issue. | ||
- [ ] I've provided information about my environment. | ||
- [ ] I've attached necessary logs or code snippet for minimal reproducible example. |
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,78 @@ | ||
--- | ||
name: Bug Report | ||
about: Create a report to help us improve libcsp | ||
title: '' | ||
labels: Defect | ||
--- | ||
|
||
## Description | ||
|
||
<!-- | ||
Describe the bug in detail. Explain what the bug is and how it affects | ||
the project. | ||
--> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- | ||
Provide a step-by-step guide on how to reproduce the issue. Include | ||
any code snippets, commands, or configurations. | ||
--> | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
## Expected behavior | ||
|
||
<!-- | ||
A clear and concise description of what you expected to happen. | ||
--> | ||
|
||
## Actual Behavior: | ||
|
||
<!-- | ||
Describe what actually happened. Include any error messages or | ||
unexpected outputs. | ||
--> | ||
|
||
## Environment Details: | ||
|
||
Provide information about your environment, including: | ||
|
||
- Build OS: (e.g., Ubuntu 24.04) | ||
- Target OS: (e.g., Ubunut 24.04, FreeRTOS, Zephyr) | ||
- libcsp commit hash: | ||
- Meson version: | ||
- CMake version: | ||
- GNU Make version | ||
- Ninja version: | ||
|
||
## Logs or console output from the very beginning to the end | ||
|
||
<!-- | ||
Do NOT add screen shorts. Make sure to copy & paste in plain text. Or, | ||
use logging feature of your terminal software. | ||
--> | ||
|
||
## Additional Context: | ||
|
||
<!-- | ||
Add any other context, logs or code snippet for minimal reproducible | ||
example that might help in understanding the issue. | ||
--> | ||
|
||
## Checklist | ||
|
||
<!-- | ||
Please confirm by replacing `[ ]` with `[x]`. | ||
--> | ||
|
||
- [ ] I've searched in "Issues" for similar issues, both open and closed. | ||
- [ ] I've used GitHub Flavored Markdown (GFM) to format my text. | ||
- [ ] I've avoided using screenshots for console output or logs | ||
- [ ] I've included all relevant details and steps to reproduce the issue. | ||
- [ ] I've provided information about my environment. | ||
- [ ] I've attached necessary logs or code snippet for minimal reproducible example. |
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,58 @@ | ||
name: ABI Compliance Check | ||
on: [pull_request] | ||
jobs: | ||
abi-check: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup packages on Linux | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libzmq3-dev libsocketcan-dev | ||
- name: Setup build system packages on Linux | ||
run: | | ||
sudo apt-get install ninja-build cmake | ||
- name: Setup ABI Compliance Checker | ||
run: | | ||
sudo apt-get install abi-compliance-checker abi-dumper | ||
- name: Checkout merged-base | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
|
||
- name: Build and Dump ABI for `merged-base` version | ||
run: | | ||
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build | ||
abi-dumper build/libcsp.so -lver "merged-base" -o ../tmp/libcsp-merged-base.dump | ||
- name: Checkout Current PR | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
|
||
- name: Build and Dump ABI for Current PR | ||
run: | | ||
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build | ||
abi-dumper build/libcsp.so -lver "PR" -o ../tmp/pr.dump | ||
- name: Compare ABI | ||
run: | | ||
abi-compliance-checker -l libcsp -old ../tmp/libcsp-merged-base.dump -new ../tmp/pr.dump | ||
- name: Check ABI Compatibility Result | ||
if: failure() | ||
run: echo "::warning::ABI compatibility issues detected. Please review the report." | ||
|
||
- name: Upload ABI Report | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: abi-compliance-report-${{ github.run_id }} | ||
path: compat_reports | ||
if-no-files-found: warn |
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,64 @@ | ||
name: Python Bindings | ||
on: [push, pull_request] | ||
jobs: | ||
build-test-python: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
os: | ||
- ubuntu-24.04 | ||
- ubuntu-22.04 | ||
- ubuntu-20.04 | ||
buildsystem: | ||
- meson | ||
- cmake | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup packages on Linux | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libzmq3-dev libsocketcan-dev | ||
- name: Setup build system packages on Linux | ||
run: | | ||
sudo apt-get install ninja-build ${{ matrix.buildsystem }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build libcsp examples | ||
run: python3 examples/buildall.py --build-system=${{ matrix.buildsystem }} | ||
|
||
- name: Build libcsp with python binding with cmake | ||
if: ${{ matrix.buildsystem == 'cmake' }} | ||
run: | | ||
cmake -GNinja -B builddir -DCSP_ENABLE_PYTHON3_BINDINGS=1 -DCSP_USE_RTABLE=1 && ninja -C builddir | ||
- name: Install the latest Meson using Pip if Python is 3.12 or later | ||
# Meson 1.3+ supports Python 3.12 (distutils removed) | ||
if: ${{ matrix.buildsystem == 'meson' && matrix.python-version == '3.12' }} | ||
run: | | ||
pip install meson | ||
meson --version | ||
- name: Build libcsp with python binding with meson | ||
if: ${{ matrix.buildsystem == 'meson' }} | ||
run: | | ||
meson setup builddir -Denable_python3_bindings=true -Duse_rtable=true && ninja -C builddir | ||
- name: Run ZMQ Python binding Test | ||
run: | | ||
build/examples/zmqproxy & | ||
PYTHONPATH=builddir python3 examples/python_bindings_example_server.py & | ||
PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -z localhost -s 27 -a 2 | ||
pkill zmqproxy |
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
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,31 @@ | ||
name: GitLint | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
gitlint: | ||
runs-on: ubuntu-latest | ||
name: Run gitlint against all commits in a PR | ||
steps: | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip3 install gitlint | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Git (pull request) | ||
run: | | ||
git checkout -b this_pr | ||
- name: Run gitlint | ||
if: ${{ github.base_ref }} | ||
env: | ||
BASE_REF: ${{ github.base_ref }} | ||
run: | | ||
gitlint --commits origin/${BASE_REF}..this_pr |
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,15 @@ | ||
name: EOF newline | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
linelint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Linelint | ||
uses: fernandrone/linelint@master |
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,19 @@ | ||
# 'true' will fix files | ||
autofix: false | ||
|
||
# list of paths to ignore, uses gitignore syntaxes (executes before any rule) | ||
ignore: | ||
- /.git | ||
- /zephyr | ||
|
||
rules: | ||
# checks if file ends in a newline character | ||
end-of-file: | ||
# set to true to enable this rule | ||
enable: true | ||
|
||
# set to true to disable autofix (if enabled globally) | ||
disable-autofix: true | ||
|
||
# if true also checks if file ends in a single newline character | ||
single-new-line: true |
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
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
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 |
---|---|---|
|
@@ -8,4 +8,3 @@ void csp_reboot_hook(void) { | |
void csp_shutdown_hook(void) { | ||
NVIC_SystemReset(); | ||
} | ||
|
Oops, something went wrong.