Skip to content

Commit 2fcd9a6

Browse files
committed
update cicd
1 parent 03b8dd8 commit 2fcd9a6

11 files changed

Lines changed: 44 additions & 45 deletions

File tree

.github/workflows/build-common-deb.yml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ jobs:
4242
include:
4343
- arch: amd64
4444
runner: ubuntu-24.04
45+
ros_distro: jazzy
46+
image: ros:jazzy-ros-base-noble
4547
- arch: arm64
4648
runner: ubuntu-24.04-arm
49+
ros_distro: jazzy
50+
image: ros:jazzy-ros-base-noble
51+
container:
52+
image: ${{ matrix.image }}
4753

4854
steps:
4955
- name: Checkout repository
@@ -57,6 +63,7 @@ jobs:
5763
env:
5864
INPUT_TAG: ${{ github.event.inputs.tag }}
5965
INPUT_ROS_DISTRO: ${{ github.event.inputs.ros_distro }}
66+
MATRIX_ROS_DISTRO: ${{ matrix.ros_distro }}
6067
DEB_ARCH: ${{ matrix.arch }}
6168
run: |
6269
set -eo pipefail
@@ -73,9 +80,9 @@ jobs:
7380
tag="v${tag}"
7481
fi
7582
76-
ros_distro="${INPUT_ROS_DISTRO:-$DEFAULT_ROS_DISTRO}"
77-
if [[ "${ros_distro}" != "${DEFAULT_ROS_DISTRO}" ]]; then
78-
echo "This workflow currently supports only ROS 2 ${DEFAULT_ROS_DISTRO}." >&2
83+
ros_distro="${INPUT_ROS_DISTRO:-$MATRIX_ROS_DISTRO}"
84+
if [[ "${ros_distro}" != "${MATRIX_ROS_DISTRO}" ]]; then
85+
echo "This containerized deb workflow currently supports only ROS 2 ${MATRIX_ROS_DISTRO}." >&2
7986
echo "Requested: ${ros_distro}" >&2
8087
exit 1
8188
fi
@@ -105,24 +112,13 @@ jobs:
105112
exit 1
106113
fi
107114
108-
- name: Install ROS and build tools
115+
- name: Install build tools
109116
shell: bash
110117
run: |
111118
set -eo pipefail
112119
113-
sudo apt-get update
114-
sudo apt-get install -y curl gnupg lsb-release software-properties-common
115-
sudo add-apt-repository universe
116-
117-
sudo mkdir -p /etc/apt/keyrings
118-
curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
119-
| sudo gpg --dearmor -o /etc/apt/keyrings/ros-archive-keyring.gpg
120-
121-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME}") main" \
122-
| sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
123-
124-
sudo apt-get update
125-
sudo apt-get install -y \
120+
apt-get update
121+
apt-get install -y \
126122
python3-rosdep \
127123
python3-colcon-core \
128124
python3-colcon-common-extensions \
@@ -136,10 +132,9 @@ jobs:
136132
cmake \
137133
ros-${{ steps.meta.outputs.ros_distro }}-ament-cmake \
138134
ros-${{ steps.meta.outputs.ros_distro }}-ament-cmake-core \
139-
ros-${{ steps.meta.outputs.ros_distro }}-ament-package \
140-
ros-${{ steps.meta.outputs.ros_distro }}-ros-base
135+
ros-${{ steps.meta.outputs.ros_distro }}-ament-package
141136
142-
sudo rosdep init || true
137+
rosdep init || true
143138
rosdep update
144139
145140
source "/opt/ros/${{ steps.meta.outputs.ros_distro }}/setup.bash"
@@ -323,13 +318,14 @@ jobs:
323318
set -eo pipefail
324319
325320
ls -lh *.deb
326-
if ! gh release view "$TAG" > /dev/null 2>&1; then
321+
if ! gh release view "$TAG" --repo "${GITHUB_REPOSITORY}" > /dev/null 2>&1; then
327322
gh release create "$TAG" \
323+
--repo "${GITHUB_REPOSITORY}" \
328324
--title "$TAG" \
329325
--notes "Automated release for Debian packages."
330326
fi
331327
332-
gh release upload "$TAG" ./*.deb --clobber
328+
gh release upload "$TAG" ./*.deb --repo "${GITHUB_REPOSITORY}" --clobber
333329
334330
verify_common_deb:
335331
name: verify common deb (${{ matrix.arch }})
@@ -341,8 +337,12 @@ jobs:
341337
include:
342338
- arch: amd64
343339
runner: ubuntu-24.04
340+
image: ros:jazzy-ros-base-noble
344341
- arch: arm64
345342
runner: ubuntu-24.04-arm
343+
image: ros:jazzy-ros-base-noble
344+
container:
345+
image: ${{ matrix.image }}
346346

347347
steps:
348348
- name: Resolve verify metadata
@@ -360,24 +360,23 @@ jobs:
360360
echo "ros_distro=${ROS_DISTRO}" >> "$GITHUB_OUTPUT"
361361
echo "deb_file=${DEB_FILE_PREFIX}_${VERSION}_${DEB_ARCH}.deb" >> "$GITHUB_OUTPUT"
362362
363-
- name: Install ROS and base tools
363+
- name: Install verification tools
364364
shell: bash
365365
run: |
366366
set -eo pipefail
367367
368-
sudo apt-get update
369-
sudo apt-get install -y curl gnupg lsb-release software-properties-common cmake build-essential
370-
sudo add-apt-repository universe
371-
372-
sudo mkdir -p /etc/apt/keyrings
373-
curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
374-
| sudo gpg --dearmor -o /etc/apt/keyrings/ros-archive-keyring.gpg
368+
apt-get update
369+
apt-get install -y ca-certificates curl cmake build-essential
375370
376-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME}") main" \
377-
| sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
371+
mkdir -p -m 755 /etc/apt/keyrings
372+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
373+
-o /etc/apt/keyrings/githubcli-archive-keyring.gpg
374+
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
375+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
376+
> /etc/apt/sources.list.d/github-cli.list
378377
379-
sudo apt-get update
380-
sudo apt-get install -y "ros-${{ steps.meta.outputs.ros_distro }}-ros-base"
378+
apt-get update
379+
apt-get install -y gh
381380
382381
- name: Download deb from release
383382
env:
@@ -418,7 +417,7 @@ jobs:
418417
deb_file="${{ steps.meta.outputs.deb_file }}"
419418
ros_distro="${{ steps.meta.outputs.ros_distro }}"
420419
421-
sudo dpkg -i "./${deb_file}" || sudo apt-get -f install -y
420+
dpkg -i "./${deb_file}" || apt-get -f install -y
422421
423422
set +u
424423
source "/opt/ros/${ros_distro}/setup.bash"

component_models/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(component_models)
33

44
find_package(ament_cmake REQUIRED)

dexhands/brainco_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(brainco_description)
33

44
find_package(ament_cmake REQUIRED)

dexhands/linkerhand_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(linkerhand_description)
33

44
find_package(ament_cmake REQUIRED)

dexhands/oymotion_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(oymotion_description)
33

44
find_package(ament_cmake REQUIRED)

gripper/changingtek_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(changingtek_description)
33

44
find_package(ament_cmake REQUIRED)

gripper/dh_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(dh_description)
33

44
find_package(ament_cmake REQUIRED)

gripper/hitbot_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(hitbot_description)
33

44
find_package(ament_cmake REQUIRED)

gripper/inspire_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(inspire_description)
33

44
find_package(ament_cmake REQUIRED)

gripper/jodell_description/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.14)
22
project(jodell_description)
33

44
find_package(ament_cmake REQUIRED)

0 commit comments

Comments
 (0)