Skip to content

Commit 8315f61

Browse files
authored
ci: build Debian packages on main (#30)
Signed-off-by: Esteve Fernandez <esteve@apache.org>
1 parent dfc7081 commit 8315f61

2 files changed

Lines changed: 113 additions & 1 deletion

File tree

.github/workflows/build-deb.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build Debian packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-deb:
13+
name: Build Debian packages (${{ matrix.rosdistro }} / ${{ matrix.debdistro }})
14+
runs-on: ubuntu-24.04
15+
if: github.repository_owner == 'ros2-rust'
16+
concurrency:
17+
group: build-deb-${{ github.ref }}-${{ matrix.rosdistro }}-${{ matrix.debdistro }}
18+
cancel-in-progress: true
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- rosdistro: lyrical
24+
debdistro: resolute
25+
- rosdistro: rolling
26+
debdistro: resolute
27+
- rosdistro: kilted
28+
debdistro: noble
29+
- rosdistro: jazzy
30+
debdistro: noble
31+
- rosdistro: humble
32+
debdistro: jammy
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
with:
37+
path: repo
38+
fetch-depth: 0
39+
persist-credentials: false
40+
41+
- name: Create repos file for this commit
42+
working-directory: repo
43+
run: |
44+
cat > sources.repos <<EOF
45+
repositories:
46+
rosidl_rust:
47+
type: git
48+
url: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git
49+
version: ${GITHUB_SHA}
50+
EOF
51+
52+
- name: Build Debian packages
53+
uses: esteve/ros-deb-builder-action@tier4/main
54+
with:
55+
ROS_DISTRO: ${{ matrix.rosdistro }}
56+
DEB_DISTRO: ${{ matrix.debdistro }}
57+
REPOS_FILE: sources.repos
58+
SKIP_CHECKOUT: true
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
PACKAGES_BRANCH: ${{ matrix.debdistro }}-${{ matrix.rosdistro }}
61+
DEBIAN_REVISION_PREFIX: 0~
62+
SQUASH_HISTORY: true

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
11
# rosidl_rust
2-
rosidl support for Rust
2+
3+
rosidl support for Rust
4+
5+
## Debian packages
6+
7+
The Debian package build workflow publishes apt repositories to package branches
8+
named `<ubuntu-codename>-<ros-distro>`.
9+
10+
| ROS distribution | Ubuntu distribution | Package branch |
11+
| --- | --- | --- |
12+
| Rolling | Resolute | `resolute-rolling` |
13+
| Lyrical | Resolute | `resolute-lyrical` |
14+
| Kilted | Noble | `noble-kilted` |
15+
| Jazzy | Noble | `noble-jazzy` |
16+
| Humble | Jammy | `jammy-humble` |
17+
18+
To install the generated packages, choose the matching package branch for your
19+
ROS and Ubuntu distribution:
20+
21+
```bash
22+
export ROS_DISTRO=rolling
23+
export PACKAGE_BRANCH=resolute-rolling
24+
25+
echo "deb [trusted=yes] https://raw.githubusercontent.com/ros2-rust/rosidl_rust/${PACKAGE_BRANCH}/ ./" \
26+
| sudo tee "/etc/apt/sources.list.d/ros2-rust-rosidl-rust-${PACKAGE_BRANCH}.list"
27+
28+
echo "yaml https://raw.githubusercontent.com/ros2-rust/rosidl_rust/${PACKAGE_BRANCH}/local.yaml ${ROS_DISTRO}" \
29+
| sudo tee "/etc/ros/rosdep/sources.list.d/1-ros2-rust-rosidl-rust-${PACKAGE_BRANCH}.list"
30+
31+
sudo apt update
32+
rosdep update
33+
sudo apt install "ros-${ROS_DISTRO}-rosidl-generator-rs"
34+
```
35+
36+
Replace `ROS_DISTRO` and `PACKAGE_BRANCH` with the matching values from the
37+
table above.
38+
39+
Generated package versions use the nearest reachable tag, the number of commits
40+
since that tag, the commit date in UTC, and the short commit SHA. For example,
41+
a package built from tag `0.4.13` sorts below the official ROS buildfarm release:
42+
43+
```text
44+
0.4.13-0~2026.06.14.22.00+gabcdef123456
45+
```
46+
47+
A package built from a newer commit after that tag sorts above the older tagged
48+
release while remaining deterministic for rebuilds of the same commit:
49+
50+
```text
51+
0.4.13+git1-0~2026.06.15.09.30+g123456abcdef
52+
```

0 commit comments

Comments
 (0)