-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.14 KB
/
scan_build.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
name: scan_build
on:
pull_request:
types: [labeled]
workflow_dispatch:
env:
PACKAGE_NAME: maliput_sparse
ROS_DISTRO: foxy
ROS_WS: maliput_ws
jobs:
static_analysis:
if: ${{ contains(github.event.pull_request.labels.*.name, 'do-static-analyzer-test') || github.event_name == 'workflow_dispatch'}}
name: Static analysis
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
CC: clang-8
CXX: clang++-8
LDFLAGS: -fuse-ld=lld-8
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}
# use setup-ros action to get vcs, rosdep, and colcon
- uses: ros-tooling/setup-ros@v0.6
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}/.github/clang_suite_installation.sh
- name: vcs import
shell: bash
working-directory: ${{ env.ROS_WS }}
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos
- name: check if dependencies have a matching branch
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} .
- run: colcon graph
shell: bash
working-directory: ${{ env.ROS_WS }}
- name: rosdep install
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update --include-eol-distros
rosdep install -i -y --rosdistro ${ROS_DISTRO} --skip-keys "pybind11" --from-paths src
- name: colcon build up-to
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
. /opt/ros/${ROS_DISTRO}/setup.bash;
colcon build --packages-up-to ${PACKAGE_NAME} \
--packages-skip ${PACKAGE_NAME} \
--event-handlers=console_direct+
- name: scan_build
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
. /opt/ros/${ROS_DISTRO}/setup.bash;
./src/${PACKAGE_NAME}/.github/run_scan_build \
--packages-select ${PACKAGE_NAME} \
--event-handlers=console_direct+;