-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (87 loc) · 2.97 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: scan_build
on:
push:
branches:
- main
pull_request:
env:
PACKAGE_NAME: maliput_malidrive
ROS_DISTRO: dashing
ROS_WS: maliput_ws
jobs:
static_analysis:
name: Static analysis
runs-on: ubuntu-18.04
container:
image: ubuntu:18.04
steps:
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout
- uses: ros-tooling/setup-ros@0.1.2
# install git from ppa since git 2.18+ is needed to fetch all branches from actions/checkout
# this step can be removed on 20.04
- name: install git from ppa
shell: bash
run: |
apt update;
apt install -y software-properties-common;
add-apt-repository -y -u ppa:git-core/ppa;
apt install -y git;
- uses: actions/checkout@v2
with:
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}
# clone private dependencies
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/drake-vendor
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/drake_vendor
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/dsim-repos-index
fetch-depth: 0
path: dsim-repos-index
token: ${{ secrets.MALIPUT_TOKEN }}
- 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/}} .
# install drake_vendor prereqs using dsim-repos-index/tools/prereqs.lib
- name: install drake_vendor prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/drake_vendor
run: ${GITHUB_WORKSPACE}/dsim-repos-index/tools/prereqs-install -t drake .
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${PACKAGE_NAME}/.github/clang_suite_installation.sh
# clone public dependencies
- name: vcs import
shell: bash
working-directory: ${{ env.ROS_WS }}
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos
- run: colcon graph
shell: bash
working-directory: ${{ env.ROS_WS }}
- name: rosdep install
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update;
rosdep install -i -y --rosdistro ${ROS_DISTRO} \
--skip-keys "pybind11" \
--from-paths src
- name: scan_build
shell: bash
working-directory: ${{ env.ROS_WS }}
run: |
. /opt/ros/${ROS_DISTRO}/setup.bash;
./src/${PACKAGE_NAME}/.github/run_scan_build \
--cmake-args -DCMAKE_LINKER=/usr/bin/llvm-ld \
--packages-up-to ${PACKAGE_NAME} \
--event-handlers=console_direct+;