-
Notifications
You must be signed in to change notification settings - Fork 25
102 lines (95 loc) · 3.42 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build and Test
on: [push, pull_request]
jobs:
# Use skip-duplicate-actions to prevent duplicate workflow runs.
# This configuration sets the should_skip flag for a pull_request workflow run if there is a completed or ongoing
# workflow run on the exact same content (same tree hash).
skip_duplicate_workflow_check:
runs-on: ubuntu-latest
name: "skip-duplicate-workflow-check"
outputs:
should_skip: ${{steps.skip_check.outputs.should_skip}}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
do_not_skip: '["push"]'
# Any *_CHECK argument causes industrial_ci to only perform the given check.
code_check:
needs: skip_duplicate_workflow_check
if: ${{needs.skip_duplicate_workflow_check.outputs.should_skip != 'true'}}
runs-on: ubuntu-latest
name: "code-check"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Industrial CI - C++ ClangFormat
uses: 'ros-industrial/industrial_ci@master'
env:
CLANG_FORMAT_CHECK: file
ROS_DISTRO: noetic
- name: Industrial CI - Python Black
uses: 'ros-industrial/industrial_ci@master'
env:
BLACK_CHECK: true
ROS_DISTRO: noetic
build_and_test:
needs: skip_duplicate_workflow_check
if: ${{needs.skip_duplicate_workflow_check.outputs.should_skip != 'true'}}
runs-on: ${{matrix.os}}
name: "${{matrix.os}}-ros${{matrix.ros_version}}-${{matrix.ros_distro}}-sdk-${{matrix.ensenso_sdk_version}}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
ros_distro: [humble]
ros_version: [2]
ensenso_sdk_version: [3.5.1394, 3.4.743, 3.3.1417]
include:
# Ubuntu 20.04 - foxy
- os: ubuntu-20.04
ros_distro: foxy
ros_version: 2
ensenso_sdk_version: 3.5.1394
- os: ubuntu-20.04
ros_distro: foxy
ros_version: 2
ensenso_sdk_version: 3.4.743
- os: ubuntu-20.04
ros_distro: foxy
ros_version: 2
ensenso_sdk_version: 3.3.1417
# Ubuntu 20.04 - noetic
- os: ubuntu-20.04
ros_distro: noetic
ros_version: 1
ensenso_sdk_version: 3.5.1394
- os: ubuntu-20.04
ros_distro: noetic
ros_version: 1
ensenso_sdk_version: 3.4.743
- os: ubuntu-20.04
ros_distro: noetic
ros_version: 1
ensenso_sdk_version: 3.3.1417
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare repo for ROS2 build
if: ${{ matrix.ros_version == '2' }}
run: ./.github/scripts/prepare_ros2_build.sh
shell: bash
env:
ROS_VERSION: ${{matrix.ros_version}}
ROS_DISTRO: ${{matrix.ros_distro}}
- name: Industrial CI - Build and Test
uses: 'ros-industrial/industrial_ci@master'
env:
AFTER_INSTALL_TARGET_DEPENDENCIES: "./.github/scripts/install_external_dependencies.sh"
CATKIN_LINT: true
CATKIN_LINT_ARGS: "--resolve-env"
DOCKER_RUN_OPTS: "-e ENSENSO_INSTALL=/opt/ensenso -e ENSENSO_SDK_VERSION=${{matrix.ensenso_sdk_version}}"
ROS_DISTRO: ${{matrix.ros_distro}}
ROS_PYTHON_VERSION: 3