Skip to content

Commit a6abb67

Browse files
committed
workflows: migrate build test to github action
1 parent 8430c16 commit a6abb67

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

.github/workflows/build_tests.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: ROS Build & Pre-commit
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-24.04
12+
container:
13+
image: quay.io/carologistics/clips_executive_base_image:kilted
14+
options: --user root
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Install pre-commit
20+
run: |
21+
apt update && apt install -y pre-commit git
22+
git clone https://github.com/carologistics/pre-commit.git /workdir/pre-commit
23+
export CAROLOGISTICS_PRE_COMMIT_SETTINGS_DIR=/workdir/pre-commit
24+
bash /workdir/pre-commit/setup.bash
25+
26+
- name: Run pre-commit hooks
27+
run: pre-commit run --all-files --hook-stage manual
28+
env:
29+
PRE_COMMIT_HOME: /var/cache/pre-commit
30+
31+
ros-build:
32+
runs-on: ubuntu-24.04
33+
needs: pre-commit
34+
strategy:
35+
matrix:
36+
ros_distro: [humble, jazzy, kilted]
37+
container:
38+
image: quay.io/carologistics/clips_executive_base_image:${{ matrix.ros_distro }}
39+
options: --user root
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
43+
44+
- name: Build ROS workspace
45+
run: |
46+
set -e
47+
export ROS_DISTRO=${{ matrix.ros_distro }}
48+
echo "Building workspace for $ROS_DISTRO"
49+
. /opt/ros/$ROS_DISTRO/setup.sh
50+
cd /ros_ws
51+
colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF
52+
53+
- name: Run ROS tests
54+
run: |
55+
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
56+
cd /ros_ws
57+
colcon test

.github/workflows/generate_docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Generate and Publish Docs
33
on:
44
push:
55
branches:
6-
- master # Replace with your default branch
6+
- master
77
pull_request:
88

99
jobs:

0 commit comments

Comments
 (0)