Skip to content

Commit 37f0412

Browse files
committed
updating workflows for zephyr v4.0.x
1 parent 38069f3 commit 37f0412

File tree

4 files changed

+131
-101
lines changed

4 files changed

+131
-101
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,38 @@ name: CI
22

33
on:
44
pull_request:
5-
branches:
6-
- '**'
5+
branches-ignore: ["iron", "rolling", "humble"]
76

87
jobs:
98

109
micro_ros_zephyr_module:
1110
runs-on: ubuntu-latest
12-
container: ubuntu:22.04
11+
container:
12+
image: zephyrprojectrtos/zephyr-build:v0.26.17
13+
options: --user root
1314
strategy:
1415
fail-fast: false
15-
matrix:
16-
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
17-
include:
18-
- zephyr_version: zephyr-v2.7.2
19-
zephyr_sdk: 0.14.2
20-
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
21-
- zephyr_version: zephyr-v3.1.0
22-
zephyr_sdk: 0.14.2
23-
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
16+
defaults:
17+
run:
18+
working-directory: /workdir
2419
steps:
25-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2621
with:
2722
path: micro_ros_zephyr_module
2823

2924
- name: Build
3025
shell: bash
3126
run: |
32-
# Install dependencies
33-
apt update
34-
export DEBIAN_FRONTEND=noninteractive
35-
apt install -y --no-install-recommends wget git cmake ninja-build gperf \
36-
ccache dfu-util device-tree-compiler wget \
37-
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
38-
make gcc gcc-multilib g++-multilib libsdl2-dev
39-
40-
# Install Zephyr environment
41-
pip3 install --user -U west
42-
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH"
43-
west init zephyrproject
44-
cd zephyrproject
45-
cd zephyr
46-
git checkout ${{ matrix.zephyr_version }}
47-
cd ..
48-
west update
49-
west zephyr-export
50-
pip3 install --user -r zephyr/scripts/requirements.txt
51-
cd ..
52-
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }}
53-
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }}
54-
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME
55-
tar xvf $TOOLCHAIN_FILE_NAME
56-
cd zephyr-sdk-$TOOLCHAIN_VERSION
57-
./setup.sh -h -t arm-zephyr-eabi -c
58-
cd ..
59-
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux
60-
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
61-
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION
62-
source zephyrproject/zephyr/zephyr-env.sh
27+
# Zephyr setup
28+
apt -y update
29+
west init
30+
west update --narrow
6331
6432
# Installing micro-ROS prerequisites
6533
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
6634
6735
# Build with Serial USB transport
68-
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
36+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
6937
7038
# Build with Serial transport
71-
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
39+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y

.github/workflows/legacy_ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Legacy_CI
2+
3+
on:
4+
pull_request:
5+
branches: ["iron", "rolling", "humble"]
6+
7+
jobs:
8+
9+
legacy_micro_ros_zephyr_module:
10+
runs-on: ubuntu-latest
11+
container:
12+
image: zephyrprojectrtos/zephyr-build:v0.23.2
13+
options: --user root
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
18+
defaults:
19+
run:
20+
working-directory: /workdir
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
path: micro_ros_zephyr_module
25+
26+
- name: Build
27+
shell: bash
28+
run: |
29+
# Zephyr setup
30+
apt -y update
31+
west init
32+
cd zephyr
33+
git checkout ${{ matrix.zephyr_version }}
34+
cd ..
35+
west update --narrow
36+
37+
# Installing micro-ROS prerequisites
38+
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
39+
40+
# Build with Serial USB transport
41+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
42+
43+
# Build with Serial transport
44+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
45+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Legacy_Nightly
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
name:
7+
description: "Manual trigger"
8+
schedule:
9+
- cron: '0 4 * * *'
10+
11+
jobs:
12+
13+
legacy_nightly_micro_ros_zephyr_module:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: zephyrprojectrtos/zephyr-build:v0.23.2
17+
options: --user root
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
22+
distro: ["iron", "humble", "rolling"]
23+
include:
24+
- distro: iron
25+
branch: iron
26+
- distro: humble
27+
branch: humble
28+
- distro: rolling
29+
branch: rolling
30+
defaults:
31+
run:
32+
working-directory: /workdir
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
path: micro_ros_zephyr_module
37+
ref: ${{ matrix.branch }}
38+
39+
- name: Build
40+
shell: bash
41+
run: |
42+
# Zephyr setup
43+
apt -y update
44+
west init
45+
cd zephyr
46+
git checkout ${{ matrix.zephyr_version }}
47+
cd ..
48+
west update --narrow
49+
50+
# Installing micro-ROS prerequisites
51+
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
52+
53+
# Build with Serial USB transport
54+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
55+
56+
# Build with Serial transport
57+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y

.github/workflows/nightly.yml

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,75 +10,35 @@ on:
1010

1111
jobs:
1212

13-
micro_ros_zephyr_module:
13+
nightly_micro_ros_zephyr_module:
1414
runs-on: ubuntu-latest
15-
container: ubuntu:22.04
15+
container:
16+
image: zephyrprojectrtos/zephyr-build:v0.26.17
17+
options: --user root
1618
strategy:
1719
fail-fast: false
18-
matrix:
19-
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
20-
distro: ["iron", "humble", "rolling", "jazzy"]
21-
include:
22-
- distro: iron
23-
branch: iron
24-
- distro: rolling
25-
branch: rolling
26-
- distro: humble
27-
branch: humble
28-
- distro: jazzy
29-
branch: jazzy
30-
- zephyr_version: zephyr-v2.7.2
31-
zephyr_sdk: 0.14.2
32-
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
33-
- zephyr_version: zephyr-v3.1.0
34-
zephyr_sdk: 0.14.2
35-
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
20+
defaults:
21+
run:
22+
working-directory: /workdir
3623
steps:
37-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
3825
with:
3926
path: micro_ros_zephyr_module
40-
branch: ${{ matrix.branch }}
27+
ref: jazzy
4128

4229
- name: Build
4330
shell: bash
4431
run: |
45-
# Install dependencies
46-
apt update
47-
export DEBIAN_FRONTEND=noninteractive
48-
apt install -y --no-install-recommends wget git cmake ninja-build gperf \
49-
ccache dfu-util device-tree-compiler wget \
50-
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
51-
make gcc gcc-multilib g++-multilib libsdl2-dev
52-
53-
# Install Zephyr environment
54-
pip3 install --user -U west
55-
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH"
56-
west init zephyrproject
57-
cd zephyrproject
58-
cd zephyr
59-
git checkout ${{ matrix.zephyr_version }}
60-
cd ..
61-
west update
62-
west zephyr-export
63-
pip3 install --user -r zephyr/scripts/requirements.txt
64-
cd ..
65-
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }}
66-
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }}
67-
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME
68-
tar xvf $TOOLCHAIN_FILE_NAME
69-
cd zephyr-sdk-$TOOLCHAIN_VERSION
70-
./setup.sh -h -t arm-zephyr-eabi -c
71-
cd ..
72-
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux
73-
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
74-
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION
75-
source zephyrproject/zephyr/zephyr-env.sh
32+
# Zephyr setup
33+
apt -y update
34+
west init
35+
west update --narrow
7636
7737
# Installing micro-ROS prerequisites
7838
pip3 install catkin_pkg lark-parser empy colcon-common-extensions
7939
8040
# Build with Serial USB transport
81-
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
41+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
8242
8343
# Build with Serial transport
84-
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
44+
west build -b disco_l475_iot1 $GITHUB_WORKSPACE/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y

0 commit comments

Comments
 (0)