Skip to content

Commit 9950d24

Browse files
author
mcbed
committed
added CI for rolling
1 parent e817d2d commit 9950d24

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

.github/workflows/ci.yml renamed to .github/workflows/ci-humble.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI-Humble
22
on:
33
push:
44
branches: [ main ]
@@ -21,6 +21,7 @@ jobs:
2121
tags: ethercat_driver_ros2:humble
2222
file: .docker/Dockerfile
2323
push: false
24+
build-args: ROS_DISTRO=humble
2425

2526
- name: Build
2627
uses: addnab/docker-run-action@v3

.github/workflows/ci-rolling.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI-Rolling
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
CI:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Prepare
12+
run: |
13+
mkdir -p ${{github.workspace}}/src
14+
- uses: actions/checkout@v2
15+
with:
16+
path: src/ethercat_driver_ros2
17+
18+
- name: Build Docker Image
19+
uses: docker/build-push-action@v2
20+
with:
21+
tags: ethercat_driver_ros2:rolling
22+
file: .docker/Dockerfile
23+
push: false
24+
build-args: ROS_DISTRO=rolling
25+
26+
- name: Build
27+
uses: addnab/docker-run-action@v3
28+
with:
29+
image: ethercat_driver_ros2:rolling
30+
options: -v ${{github.workspace}}/:/ros/
31+
run: |
32+
cd /ros
33+
. /opt/ros/rolling/setup.sh
34+
rosdep install --ignore-src --from-paths . -y -r && \
35+
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
36+
37+
- name: Tests
38+
uses: addnab/docker-run-action@v3
39+
with:
40+
image: ethercat_driver_ros2:rolling
41+
options: -v ${{github.workspace}}/:/ros/
42+
run: |
43+
cd /ros
44+
. /opt/ros/rolling/setup.sh
45+
rosdep install --ignore-src --from-paths . -y -r && \
46+
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
47+
colcon test
48+
colcon test-result
49+
50+
- name: Upload Tests to Artifacts
51+
uses: actions/upload-artifact@v2
52+
if: always()
53+
with:
54+
name: test-results
55+
path: build/*/test_results/*/*.xml
56+
57+
- name: Publish Unit Test Results
58+
uses: EnricoMi/publish-unit-test-result-action@v1
59+
if: always()
60+
with:
61+
files: build/*/test_results/*/*.xml

0 commit comments

Comments
 (0)