Skip to content
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

[CI] Add PlatformIO pipeline #351

Merged
merged 3 commits into from
Nov 21, 2023
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
29 changes: 29 additions & 0 deletions .github/workflows/pio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PlatformIO CI

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
example: [examples/virtual_terminal/esp32_platformio_object_pool]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Install AgIsoStack library in PlatformIO
run: pio pkg install -g -l ./
- name: Build PlatformIO examples
run: pio run -d ${{ matrix.example }} -e local_agisostack
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
monitor_filters = esp32_exception_decoder

; Mainly for CI reasons, we introduce a new environment for cases
; where AgIsoStack is installed locally
[env:local_agisostack]
extends = env:denky32
lib_deps = AgIsoStack-plus-plus
14 changes: 7 additions & 7 deletions isobus/src/nmea2000_message_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.send_can_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::CourseOverGroundSpeedOverGroundRapidUpdate),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->cogSogTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->cogSogTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority2);
}
Expand All @@ -395,7 +395,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.get_fast_packet_protocol().send_multipacket_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::Datum),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->datumTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->datumTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::PriorityDefault6);
}
Expand All @@ -410,7 +410,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.get_fast_packet_protocol().send_multipacket_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::GNSSPositionData),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->gnssPositionDataTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->gnssPositionDataTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority3);
}
Expand All @@ -425,7 +425,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.send_can_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::PositionDeltaHighPrecisionRapidUpdate),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->positionDeltaHighPrecisionRapidUpdateTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->positionDeltaHighPrecisionRapidUpdateTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority2);
}
Expand All @@ -440,7 +440,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.send_can_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::PositionRapidUpdate),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->positionRapidUpdateTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->positionRapidUpdateTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority2);
}
Expand All @@ -455,7 +455,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.send_can_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::RateOfTurn),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->rateOfTurnTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->rateOfTurnTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority2);
}
Expand All @@ -470,7 +470,7 @@ namespace isobus
transmitSuccessful = CANNetworkManager::CANNetwork.send_can_message(static_cast<std::uint32_t>(CANLibParameterGroupNumber::VesselHeading),
messageBuffer.data(),
messageBuffer.size(),
std::dynamic_pointer_cast<InternalControlFunction>(targetInterface->vesselHeadingTransmitMessage.get_control_function()),
std::static_pointer_cast<InternalControlFunction>(targetInterface->vesselHeadingTransmitMessage.get_control_function()),
nullptr,
CANIdentifier::Priority2);
}
Expand Down
7 changes: 7 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
},
"license": "MIT",
"homepage": "https://isobusplusplus.com/",
"export": {
"include": [
"isobus/*",
"utility/*",
"hardware_integration/*"
]
},
"build": {
"flags": [
"-Ihardware_integration/include",
Expand Down