Skip to content

Commit b4a6084

Browse files
committed
granular CI workflows
Entire-Checkpoint: cf822bdbcca1
1 parent ffb54d7 commit b4a6084

12 files changed

Lines changed: 223 additions & 113 deletions

.github/workflows/_pixi.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Pixi Build & Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: ubuntu-latest
13+
name: ${{ inputs.environment }}
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: prefix-dev/setup-pixi@v0.9.4
19+
with:
20+
environments: ${{ inputs.environment }}
21+
locked: true
22+
cache: true
23+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
24+
25+
- name: Build
26+
run: pixi run -e ${{ inputs.environment }} build
27+
28+
- name: Test
29+
run: pixi run -e ${{ inputs.environment }} test

.github/workflows/_ros.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: ROS Build & Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ros_distro:
7+
required: true
8+
type: string
9+
container:
10+
required: true
11+
type: string
12+
runner:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
build-and-test:
18+
runs-on: ${{ inputs.runner }}
19+
container:
20+
image: ${{ inputs.container }}
21+
env:
22+
HOME: /root
23+
ROS_HOME: /root/.ros
24+
name: ${{ inputs.ros_distro }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Setup ccache
30+
uses: hendrikmuhs/ccache-action@v1.2
31+
with:
32+
key: ${{ github.job }}-${{ inputs.ros_distro }}
33+
max-size: 500M
34+
35+
- name: Configure ccache
36+
run: echo "/usr/lib/ccache" >> $GITHUB_PATH
37+
38+
- name: Install dependencies
39+
shell: bash
40+
run: |
41+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
42+
apt-get update
43+
rosdep update --rosdistro ${{ inputs.ros_distro }}
44+
rosdep install --from-paths . --ignore-src -y --rosdistro ${{ inputs.ros_distro }}
45+
46+
- name: Build
47+
shell: bash
48+
run: |
49+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
50+
colcon build --packages-select pj_bridge \
51+
--cmake-args -DCMAKE_BUILD_TYPE=Release \
52+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
53+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
54+
55+
- name: Test
56+
shell: bash
57+
run: |
58+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
59+
source install/setup.bash
60+
colcon test --packages-select pj_bridge
61+
colcon test-result --verbose
Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,21 @@
1-
name: Pixi CI
1+
name: AppImage
22

33
on:
44
push:
5-
branches: [development, main]
6-
pull_request:
7-
branches: [development, main]
5+
tags: ['*']
86
workflow_dispatch:
97

108
concurrency:
119
group: ${{ github.workflow }}-${{ github.ref }}
1210
cancel-in-progress: true
1311

1412
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-
3913
appimage:
40-
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
41-
runs-on: ubuntu-latest
42-
needs: build-and-test
4314
strategy:
4415
fail-fast: false
4516
matrix:
4617
environment: [humble, jazzy, kilted]
18+
runs-on: ubuntu-latest
4719
name: appimage-${{ matrix.environment }}
4820

4921
steps:

.github/workflows/pixi_humble.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Pixi: Humble"
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+
uses: ./.github/workflows/_pixi.yaml
17+
with:
18+
environment: humble

.github/workflows/pixi_jazzy.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Pixi: Jazzy"
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+
uses: ./.github/workflows/_pixi.yaml
17+
with:
18+
environment: jazzy

.github/workflows/pixi_kilted.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Pixi: Kilted"
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+
uses: ./.github/workflows/_pixi.yaml
17+
with:
18+
environment: kilted

.github/workflows/ros_ci.yaml

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

.github/workflows/ros_humble.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "ROS: Humble"
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+
uses: ./.github/workflows/_ros.yaml
17+
with:
18+
ros_distro: humble
19+
container: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
20+
runner: ubuntu-22.04

.github/workflows/ros_jazzy.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "ROS: Jazzy"
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+
uses: ./.github/workflows/_ros.yaml
17+
with:
18+
ros_distro: jazzy
19+
container: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest
20+
runner: ubuntu-24.04

.github/workflows/ros_kilted.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "ROS: Kilted"
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+
uses: ./.github/workflows/_ros.yaml
17+
with:
18+
ros_distro: kilted
19+
container: rostooling/setup-ros-docker:ubuntu-noble-ros-kilted-ros-base-latest
20+
runner: ubuntu-24.04

0 commit comments

Comments
 (0)