-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.33 KB
/
sonarcloud.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
name: SonarCloud
on: [push]
env:
ROS_DISTRO: noetic
defaults:
run:
shell: bash
jobs:
tests:
runs-on: ubuntu-20.04
timeout-minutes: 8
container:
image: ros:noetic
steps:
- run: apt-get update && apt-get install -y git
- run: if [[ "$ROS_DISTRO" = "melodic" ]] ; then apt-get install -y python-catkin-tools python-pip python3-pip python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential python-catkin-tools ; fi
- run: if [[ "$ROS_DISTRO" = "noetic" ]] ; then apt-get install -y python3-pip ros-noetic-catkin python3-catkin-tools ; fi
- uses: actions/checkout@v2
with:
path: catkin_ws/src/uav_hitl_dynamics
- name: Install requirements
run: ./catkin_ws/src/uav_hitl_dynamics/install_requirements.sh
- run: apt install -y curl unzip
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build-wrapper
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
cd catkin_ws
build-wrapper-linux-x86-64 --out-dir src/uav_hitl_dynamics/bw-output catkin build
- name: Run sonar-scanner
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cd catkin_ws/src/uav_hitl_dynamics
sonar-scanner