Skip to content

Commit dc7867c

Browse files
author
mcbed
committed
added CI for rolling
1 parent dcbf51a commit dc7867c

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
File renamed without changes.

.github/workflows/ci-rolling.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
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+
25+
- name: Build
26+
uses: addnab/docker-run-action@v3
27+
with:
28+
image: ethercat_driver_ros2:rolling
29+
options: -v ${{github.workspace}}/:/ros/
30+
run: |
31+
cd /ros
32+
. /opt/ros/rolling/setup.sh
33+
rosdep install --ignore-src --from-paths . -y -r && \
34+
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
35+
36+
- name: Tests
37+
uses: addnab/docker-run-action@v3
38+
with:
39+
image: ethercat_driver_ros2:rolling
40+
options: -v ${{github.workspace}}/:/ros/
41+
run: |
42+
cd /ros
43+
. /opt/ros/rolling/setup.sh
44+
rosdep install --ignore-src --from-paths . -y -r && \
45+
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
46+
colcon test
47+
colcon test-result
48+
49+
- name: Upload Tests to Artifacts
50+
uses: actions/upload-artifact@v2
51+
if: always()
52+
with:
53+
name: test-results
54+
path: build/*/test_results/*/*.xml
55+
56+
- name: Publish Unit Test Results
57+
uses: EnricoMi/publish-unit-test-result-action@v1
58+
if: always()
59+
with:
60+
files: build/*/test_results/*/*.xml

0 commit comments

Comments
 (0)