-
Notifications
You must be signed in to change notification settings - Fork 23
60 lines (59 loc) · 1.67 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
name: Build and test
on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'
defaults:
run:
shell: bash
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
steps:
- name: Setup ROS 2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble
- name: Checkout repository
uses: actions/checkout@v3
- name: Build and test
id: ros-build
uses: ros-tooling/[email protected]
with:
package-name:
import-token: ${{ secrets.GITHUB_TOKEN }}
vcs-repo-file-url: |
$GITHUB_WORKSPACE/dependencies.repos
target-ros2-distro: humble
colcon-defaults: |
{
"build": {
"merge-install": true
},
"test": {
"packages-select-regex": [
"px4_ros2_cpp"
],
"ctest-args": [
"-R", "unit_tests"
],
"merge-install": true
}
}
- name: install clang tidy
run: |
sudo apt install --yes -qq clang-tidy
- name: clang tidy
run: |
ROS_WS_DIR="$(readlink -f ${{ steps.ros-build.outputs.ros-workspace-directory-name }})"
cd "$ROS_WS_DIR"
cd src
cd $(find -name ${{ github.event.repository.name }}|head -1) # the path looks like this: 'src/zlrido15uw/<repo-name>'
echo "Running clang-tidy on $PWD"
./scripts/run-clang-tidy-on-project.sh "$ROS_WS_DIR"/build