File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments