Skip to content

Commit 8c9fd26

Browse files
Merge pull request #3 from PlotJuggler/unify-backends
ci: Migrate to pixi-based CI with AppImage generation
2 parents 1a7705e + e45a664 commit 8c9fd26

78 files changed

Lines changed: 33815 additions & 5473 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pixi_ci.yaml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [development, main]
6+
pull_request:
7+
branches: [development, main]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build-and-test:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
environment: [humble, jazzy, kilted]
20+
runs-on: ubuntu-latest
21+
name: ${{ matrix.environment }}
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: prefix-dev/setup-pixi@v0.9.4
27+
with:
28+
environments: ${{ matrix.environment }}
29+
locked: true
30+
cache: true
31+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
32+
33+
- name: Build
34+
run: pixi run -e ${{ matrix.environment }} build
35+
36+
- name: Test
37+
run: pixi run -e ${{ matrix.environment }} test
38+
39+
appimage:
40+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
41+
runs-on: ubuntu-latest
42+
needs: build-and-test
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
environment: [humble, jazzy, kilted]
47+
name: appimage-${{ matrix.environment }}
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- uses: prefix-dev/setup-pixi@v0.9.4
53+
with:
54+
environments: ${{ matrix.environment }}
55+
locked: true
56+
cache: true
57+
58+
- name: Build
59+
run: pixi run -e ${{ matrix.environment }} build
60+
61+
- name: Create AppImage
62+
run: |
63+
# Download linuxdeploy
64+
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
65+
chmod +x linuxdeploy-x86_64.AppImage
66+
67+
CONDA_PREFIX="$(pixi run -e ${{ matrix.environment }} printenv CONDA_PREFIX)"
68+
69+
# Create AppDir structure
70+
mkdir -p AppDir/usr/{bin,lib,share}
71+
72+
# Copy binary
73+
cp install/lib/pj_bridge/pj_bridge_ros2 AppDir/usr/bin/
74+
75+
# Bundle shared libraries from the conda environment
76+
# (exclude glibc/ld-linux which must come from the host)
77+
ldd AppDir/usr/bin/pj_bridge_ros2 | \
78+
grep "$CONDA_PREFIX" | \
79+
awk '{print $3}' | \
80+
xargs -I{} cp --no-dereference {} AppDir/usr/lib/ 2>/dev/null || true
81+
82+
# Also copy transitive deps from conda lib/
83+
for lib in AppDir/usr/lib/*.so*; do
84+
ldd "$lib" 2>/dev/null | \
85+
grep "$CONDA_PREFIX" | \
86+
awk '{print $3}' | \
87+
xargs -I{} cp --no-dereference {} AppDir/usr/lib/ 2>/dev/null || true
88+
done
89+
90+
# Copy ament index (needed for schema discovery at runtime)
91+
cp -r "$CONDA_PREFIX"/share/ament_index AppDir/usr/share/ 2>/dev/null || true
92+
93+
# Copy message definitions (.msg/.srv/.idl files)
94+
for pkg_dir in "$CONDA_PREFIX"/share/*/msg "$CONDA_PREFIX"/share/*/srv; do
95+
[ -d "$pkg_dir" ] && cp -r --parents "$pkg_dir" AppDir/usr/share/ 2>/dev/null || true
96+
done
97+
98+
# Create .desktop file
99+
cat > AppDir/pj_bridge.desktop <<'DESKTOP'
100+
[Desktop Entry]
101+
Name=pj_bridge
102+
Exec=pj_bridge_ros2
103+
Icon=pj_bridge
104+
Type=Application
105+
Categories=Science;
106+
DESKTOP
107+
108+
# Create minimal icon
109+
convert -size 256x256 xc:transparent AppDir/pj_bridge.png 2>/dev/null || \
110+
touch AppDir/pj_bridge.png
111+
112+
# Create AppRun wrapper that sets environment
113+
cat > AppDir/AppRun <<'APPRUN'
114+
#!/bin/bash
115+
SELF="$(readlink -f "$0")"
116+
HERE="${SELF%/*}"
117+
export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
118+
export AMENT_PREFIX_PATH="${HERE}/usr"
119+
exec "${HERE}/usr/bin/pj_bridge_ros2" "$@"
120+
APPRUN
121+
chmod +x AppDir/AppRun
122+
123+
# Generate AppImage
124+
ARCH=x86_64 ./linuxdeploy-x86_64.AppImage \
125+
--appdir AppDir \
126+
--output appimage
127+
128+
- uses: actions/upload-artifact@v4
129+
with:
130+
name: appimage-${{ matrix.environment }}
131+
path: "*.AppImage"

.github/workflows/release-debs.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ jobs:
2727
os_codename: noble
2828
container: rostooling/setup-ros-docker:ubuntu-noble-ros-kilted-ros-base-latest
2929
runner: ubuntu-24.04
30-
- ros_distro: rolling
31-
os_codename: noble
32-
container: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest
33-
runner: ubuntu-24.04
3430

3531
runs-on: ${{ matrix.runner }}
3632
container:
@@ -43,7 +39,7 @@ jobs:
4339
- uses: actions/checkout@v4
4440
with:
4541
fetch-depth: 0
46-
path: src/pj_ros_bridge
42+
path: src/pj_bridge
4743

4844
- name: Install build tools
4945
run: |
@@ -55,19 +51,19 @@ jobs:
5551
run: |
5652
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
5753
rosdep update --rosdistro ${{ matrix.ros_distro }}
58-
rosdep install --from-paths src/pj_ros_bridge --ignore-src -y --rosdistro ${{ matrix.ros_distro }}
54+
rosdep install --from-paths src/pj_bridge --ignore-src -y --rosdistro ${{ matrix.ros_distro }}
5955
6056
- name: Clean previous builds
6157
shell: bash
6258
run: |
63-
cd src/pj_ros_bridge
59+
cd src/pj_bridge
6460
rm -rf debian .obj-x86_64-linux-gnu
6561
6662
- name: Generate debian packaging
6763
shell: bash
6864
run: |
6965
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
70-
cd src/pj_ros_bridge
66+
cd src/pj_bridge
7167
bloom-generate rosdebian \
7268
--os-name ubuntu \
7369
--os-version ${{ matrix.os_codename }} \
@@ -77,7 +73,7 @@ jobs:
7773
shell: bash
7874
run: |
7975
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
80-
cd src/pj_ros_bridge
76+
cd src/pj_bridge
8177
fakeroot debian/rules binary
8278
8379
- name: Upload deb artifact

.github/workflows/ros-humble.yaml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/ros-jazzy.yaml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/ros-rolling.yaml

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)