-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hepa-uv): Add the initial project for the HEPA/UV module (#740)
* Added HEPA/UV module project, which builds and idles the drive pin indefinitely * Added hepa_uv NodeId 0x32 and hepa_uv_bootloader NodeID 0x3e to match monorepo * Added GPIO pin configuration to match board design * Added placeholder test * Added CI project
- Loading branch information
Showing
38 changed files
with
2,825 additions
and
6 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,122 @@ | ||
name: "HEPA/UV build/test" | ||
on: | ||
pull_request: | ||
paths: | ||
- "hepa-uv/**" | ||
- "common/**" | ||
- "can/**" | ||
- "include/**" | ||
- "!include/pipettes/**" | ||
- "!include/gantry/**" | ||
- "!include/head/**" | ||
- "cmake/*" | ||
- "!cmake/Arduino*" | ||
- "CMakeLists.txt" | ||
- "hepa-uv/CMakeLists.txt" | ||
- "CMakePresets.json" | ||
- ".clang-format" | ||
- ".clang-tidy" | ||
push: | ||
paths: | ||
- "hepa-uv/**" | ||
- "common/**" | ||
- "can/**" | ||
- "spi/**" | ||
- "include/**" | ||
- "!include/pipettes/**" | ||
- "!include/gantry/**" | ||
- "!include/head/**" | ||
- "cmake/*" | ||
- "!cmake/Arduino*" | ||
- "CMakeLists.txt" | ||
- "hepa-uv/CMakeLists.txt" | ||
- "CMakePresets.json" | ||
- ".clang-format" | ||
- ".clang-tidy" | ||
- ".github/workflows/hepa_uv.yaml" | ||
branches: | ||
- "*" | ||
tags: | ||
- "hepa_uv@*" | ||
workflow_dispatch: | ||
|
||
env: | ||
ci: 1 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
cross-compile-check: | ||
name: "Cross-Compile/Check" | ||
runs-on: "ubuntu-20.04" | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 0 | ||
- uses: "actions/cache@v3" | ||
with: | ||
path: "./stm32-tools" | ||
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }} | ||
- name: "Configure" | ||
run: cmake --preset=cross . -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
- name: "Format" | ||
run: cmake --build ./build-cross --target hepa-uv-format-ci | ||
- name: "Build" | ||
run: cmake --build ./build-cross --target hepa-uv-images hepa-uv-applications | ||
- name: "Lint" | ||
run: cmake --build ./build-cross --target hepa-uv-lint | ||
|
||
host-compile-test: | ||
name: "Host-Compile/Test" | ||
runs-on: "ubuntu-20.04" | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Update and install gcc-10 & g++-10 | ||
run: | | ||
sudo apt update | ||
sudo apt install gcc-10 g++-10 | ||
- name: Checkout ot3-firmware repository | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 0 | ||
path: ot3-firmware | ||
|
||
- name: Checkout opentrons repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: "Opentrons/opentrons" | ||
path: opentrons | ||
|
||
- name: Cache stm32-tools | ||
uses: "actions/cache@v3" | ||
with: | ||
path: "./stm32-tools" | ||
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }} | ||
|
||
- name: "Configure" | ||
run: cmake --preset=host-gcc10 . | ||
working-directory: ot3-firmware | ||
|
||
- name: 'Build and test' | ||
run: cmake --build ./build-host --target hepa-uv-build-and-test | ||
working-directory: ot3-firmware | ||
|
||
- name: 'Setup state_manager' | ||
run: cmake --build ./build-host/ --target state-manager-setup | ||
working-directory: ot3-firmware | ||
|
||
- name: 'Build simulator' | ||
run: cmake --build ./build-host --target hepa-uv-simulator | ||
working-directory: ot3-firmware | ||
|
||
- name: "Upload artifacts" | ||
if: github.event_name != 'pull_request' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "hepa-uv-simulator-${{github.ref_name}}" | ||
path: | | ||
build-host/hepa-uv/simulator/hepa-uv-simulator |
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
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
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,33 @@ | ||
# hepa-uv source tree | ||
|
||
add_subdirectory(core) | ||
|
||
if (${CMAKE_CROSSCOMPILING}) | ||
if (${ARM_ARCH_TYPE} STREQUAL "cortex-m4") | ||
add_subdirectory(firmware) | ||
endif () | ||
else () | ||
add_subdirectory(simulator) | ||
add_subdirectory(tests) | ||
endif () | ||
|
||
file(GLOB_RECURSE HEPA_SOURCES_FOR_FORMAT ./*.cpp ./*.hpp ../include/hepa-uv/*.hpp) | ||
|
||
# Targets for formatting. These are here rather than in individual target CMakeLists (e.g. | ||
# the ones in tests/ or firmware/) because they don't have semantic reasoning involved and | ||
# can therefore operate on file globs, unlike lint/static analysis | ||
|
||
# Target for use during dev - edits files | ||
add_custom_target( | ||
hepa-uv-format | ||
ALL | ||
COMMAND ${Clang_CLANGFORMAT_EXECUTABLE} -style=file -i ${HEPA_SOURCES_FOR_FORMAT} | ||
) | ||
|
||
# Target for use in ci - warnings are errors, doesn't edit files | ||
add_custom_target( | ||
hepa-uv-format-ci | ||
COMMAND ${Clang_CLANGFORMAT_EXECUTABLE} -style=file -Werror --ferror-limit=0 -n ${HEPA_SOURCES_FOR_FORMAT} | ||
) | ||
|
||
set(LINT_TARGETS ${LINT_TARGETS} PARENT_SCOPE) |
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,8 @@ | ||
function(target_hepa_uv_core TARGET) | ||
target_sources(${TARGET} PUBLIC | ||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/can_tasks.cpp | ||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/tasks.cpp) | ||
target_include_directories(${TARGET} PUBLIC ${CMAKE_CURRENT_FUNCTION_LIST_DIR}) | ||
target_link_libraries(${TARGET} PUBLIC common-core) | ||
target_include_directories(${TARGET} INTERFACE ${CMAKE_SOURCE_DIR}/cpp-utils/include) | ||
endfunction() |
Oops, something went wrong.