-
Notifications
You must be signed in to change notification settings - Fork 28
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
updates project to work with zephyr v4.0.x #146
base: jazzy
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,42 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Manual trigger" | ||
pull_request: | ||
branches: | ||
- '**' | ||
branches-ignore: ["iron", "rolling", "humble"] | ||
|
||
jobs: | ||
|
||
micro_ros_zephyr_module: | ||
runs-on: ubuntu-latest | ||
container: ubuntu:22.04 | ||
container: | ||
image: zephyrprojectrtos/ci:v0.26.17 | ||
options: --user root | ||
env: | ||
CMAKE_PREFIX_PATH: /opt/toolchains | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"] | ||
include: | ||
- zephyr_version: zephyr-v2.7.2 | ||
zephyr_sdk: 0.14.2 | ||
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz | ||
- zephyr_version: zephyr-v3.1.0 | ||
zephyr_sdk: 0.14.2 | ||
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: micro_ros_zephyr_module | ||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
# Install dependencies | ||
apt update | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt install -y --no-install-recommends wget git cmake ninja-build gperf \ | ||
ccache dfu-util device-tree-compiler wget \ | ||
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ | ||
make gcc gcc-multilib g++-multilib libsdl2-dev | ||
|
||
# Install Zephyr environment | ||
pip3 install --user -U west | ||
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH" | ||
west init zephyrproject | ||
cd zephyrproject | ||
cd zephyr | ||
git checkout ${{ matrix.zephyr_version }} | ||
cd .. | ||
west update | ||
west zephyr-export | ||
pip3 install --user -r zephyr/scripts/requirements.txt | ||
cd .. | ||
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }} | ||
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }} | ||
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME | ||
tar xvf $TOOLCHAIN_FILE_NAME | ||
cd zephyr-sdk-$TOOLCHAIN_VERSION | ||
./setup.sh -h -t arm-zephyr-eabi -c | ||
cd .. | ||
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux | ||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr | ||
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION | ||
source zephyrproject/zephyr/zephyr-env.sh | ||
# Zephyr setup | ||
apt -y update | ||
west init | ||
west update --narrow | ||
|
||
# Installing micro-ROS prerequisites | ||
pip3 install catkin_pkg lark-parser empy colcon-common-extensions | ||
|
||
# Build with Serial USB transport | ||
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
|
||
# Build with Serial transport | ||
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Legacy_CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Manual trigger" | ||
pull_request: | ||
branches: ["iron", "rolling", "humble"] | ||
|
||
jobs: | ||
|
||
legacy_micro_ros_zephyr_module: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zephyrprojectrtos/ci:v0.23.2 | ||
options: --user root | ||
env: | ||
CMAKE_PREFIX_PATH: /opt/toolchains | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: micro_ros_zephyr_module | ||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
# Zephyr setup | ||
apt -y update | ||
west init | ||
cd zephyr | ||
git checkout ${{ matrix.zephyr_version }} | ||
cd .. | ||
west update --narrow | ||
|
||
# Installing micro-ROS prerequisites | ||
pip3 install catkin_pkg lark-parser empy colcon-common-extensions | ||
|
||
# Build with Serial USB transport | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
|
||
# Build with Serial transport | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Legacy_Nightly | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Manual trigger" | ||
schedule: | ||
- cron: '0 4 * * *' | ||
|
||
jobs: | ||
|
||
legacy_nightly_micro_ros_zephyr_module: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: zephyrprojectrtos/ci:v0.23.2 | ||
options: --user root | ||
env: | ||
CMAKE_PREFIX_PATH: /opt/toolchains | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"] | ||
distro: ["iron", "humble", "rolling"] | ||
include: | ||
- distro: iron | ||
branch: iron | ||
- distro: humble | ||
branch: humble | ||
- distro: rolling | ||
branch: rolling | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: micro_ros_zephyr_module | ||
ref: ${{ matrix.branch }} | ||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
# Zephyr setup | ||
apt -y update | ||
west init | ||
cd zephyr | ||
git checkout ${{ matrix.zephyr_version }} | ||
cd .. | ||
west update --narrow | ||
|
||
# Installing micro-ROS prerequisites | ||
pip3 install catkin_pkg lark-parser empy colcon-common-extensions | ||
|
||
# Build with Serial USB transport | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
|
||
# Build with Serial transport | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,75 +10,34 @@ on: | |
|
||
jobs: | ||
|
||
micro_ros_zephyr_module: | ||
nightly_micro_ros_zephyr_module: | ||
runs-on: ubuntu-latest | ||
container: ubuntu:22.04 | ||
container: | ||
image: zephyrprojectrtos/ci:v0.26.17 | ||
options: --user root | ||
env: | ||
CMAKE_PREFIX_PATH: /opt/toolchains | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"] | ||
distro: ["iron", "humble", "rolling", "jazzy"] | ||
include: | ||
- distro: iron | ||
branch: iron | ||
- distro: rolling | ||
branch: rolling | ||
- distro: humble | ||
branch: humble | ||
- distro: jazzy | ||
branch: jazzy | ||
- zephyr_version: zephyr-v2.7.2 | ||
zephyr_sdk: 0.14.2 | ||
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz | ||
- zephyr_version: zephyr-v3.1.0 | ||
zephyr_sdk: 0.14.2 | ||
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: micro_ros_zephyr_module | ||
branch: ${{ matrix.branch }} | ||
ref: jazzy | ||
Comment on lines
+23
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nightly is not running all ROS 2 distros as in previous approach There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @pablogs9. Thanks for the feedback. Currently, I have split the GitHub actions into the following configurations:
Is it imperative that the older ROS 2 distros run on the newer Zephyr setup? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @Z0rdon, Humble is an active distro until May 2027 and Rolling is "newer" than Jazzy. I'm okay with getting rid of Iron since it is EOL. Concerning the CI, ideally, we need to have a single workflow that tests the module for all active distros. |
||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
# Install dependencies | ||
apt update | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt install -y --no-install-recommends wget git cmake ninja-build gperf \ | ||
ccache dfu-util device-tree-compiler wget \ | ||
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ | ||
make gcc gcc-multilib g++-multilib libsdl2-dev | ||
|
||
# Install Zephyr environment | ||
pip3 install --user -U west | ||
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH" | ||
west init zephyrproject | ||
cd zephyrproject | ||
cd zephyr | ||
git checkout ${{ matrix.zephyr_version }} | ||
cd .. | ||
west update | ||
west zephyr-export | ||
pip3 install --user -r zephyr/scripts/requirements.txt | ||
cd .. | ||
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }} | ||
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }} | ||
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME | ||
tar xvf $TOOLCHAIN_FILE_NAME | ||
cd zephyr-sdk-$TOOLCHAIN_VERSION | ||
./setup.sh -h -t arm-zephyr-eabi -c | ||
cd .. | ||
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux | ||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr | ||
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION | ||
source zephyrproject/zephyr/zephyr-env.sh | ||
# Zephyr setup | ||
apt -y update | ||
west init | ||
west update --narrow | ||
|
||
# Installing micro-ROS prerequisites | ||
pip3 install catkin_pkg lark-parser empy colcon-common-extensions | ||
|
||
# Build with Serial USB transport | ||
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y | ||
|
||
# Build with Serial transport | ||
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y | ||
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y |
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.
Please do not ignore PR to active branches