-
Notifications
You must be signed in to change notification settings - Fork 2
120 lines (105 loc) · 3.56 KB
/
release-debs.yaml
File metadata and controls
120 lines (105 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build & Release Debian Packages
on:
push:
tags: ['*']
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-deb:
strategy:
fail-fast: false
matrix:
include:
- ros_distro: humble
os_codename: jammy
container: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
runner: ubuntu-22.04
- ros_distro: jazzy
os_codename: noble
container: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest
runner: ubuntu-24.04
- ros_distro: kilted
os_codename: noble
container: rostooling/setup-ros-docker:ubuntu-noble-ros-kilted-ros-base-latest
runner: ubuntu-24.04
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.container }}
env:
HOME: /root
ROS_HOME: /root/.ros
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: src/pj_bridge
- name: Install build tools
run: |
apt-get update
apt-get install -y python3-bloom fakeroot debhelper dh-python
- name: Install IXWebSocket from source
run: |
cd /tmp
wget -q https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.6.tar.gz
tar xzf v11.4.6.tar.gz
cd IXWebSocket-11.4.6
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_TLS=OFF -DUSE_ZLIB=ON
cmake --build build -j$(nproc)
cmake --install build
- name: Install ROS dependencies
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
rosdep update --rosdistro ${{ matrix.ros_distro }}
rosdep install --from-paths src/pj_bridge --ignore-src -y --rosdistro ${{ matrix.ros_distro }}
- name: Clean previous builds
shell: bash
run: |
cd src/pj_bridge
rm -rf debian .obj-x86_64-linux-gnu
- name: Generate debian packaging
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
cd src/pj_bridge
bloom-generate rosdebian \
--os-name ubuntu \
--os-version ${{ matrix.os_codename }} \
--ros-distro ${{ matrix.ros_distro }}
- name: Build debian package
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
cd src/pj_bridge
fakeroot debian/rules binary
- name: Upload deb artifact
uses: actions/upload-artifact@v4
with:
name: deb-${{ matrix.ros_distro }}
path: src/ros-${{ matrix.ros_distro }}-*.deb
release:
needs: build-deb
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all deb artifacts
uses: actions/download-artifact@v4
with:
path: debs
pattern: deb-*
merge-multiple: true
- name: Upload to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ github.ref_name }}"
# Create release if it doesn't exist yet
gh release view "$tag" >/dev/null 2>&1 || \
gh release create "$tag" --title "$tag" --generate-notes || true
# Upload assets (--clobber overwrites if re-run)
gh release upload "$tag" debs/*.deb --clobber