forked from RoboSherlock/robosherlock
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (107 loc) · 4.5 KB
/
actions.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ noetic ]
pull_request:
branches: [ noetic ]
# Allows you to run this workflow manually from the Actions tab
#workflow_dispatch:
#name: Cache
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
services:
mongo:
image: mongodb
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Cache
id: cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('hashFile.txt') }}
restore-keys: ${{ runner.os }}-ccache-
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: noetic
- uses: ros-tooling/[email protected]
with:
package-name: my_package
target-ros1-distro: noetic
- name: Install Boost
run: |
sudo apt update
sudo apt install -y libicu-dev
- name: Install Boost
run: |
sudo apt update
sudo apt install -y libboost-all-dev
- name: Env variable
env:
ROS_DISTRO: kinetic
ROS_CI_DESKTOP: "`lsb_release -cs`"
ROS_PARALLEL_JOBS: '-j5 -l3'
CI_SOURCE_PATH: $(pwd)
CATKIN_OPTIONS: $CI_SOURCE_PATH/robosherlock/catkin.options
- name: before_install
run: |
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-kinetic-catkin ros-kinetic-libmongocxx-ros libxerces-c-dev libapr1-dev mongodb protobuf-compiler lcov swi-prolog --force-yes
source /opt/ros/$ROS_DISTRO/setup.bash
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
echo "export PYTHON_EXECUTABLE=/usr/bin/python" >> ~/.bashrc
echo "export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages" >> ~/.bashrc
source ~/.bashrc
- name: install
run: |
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ../
catkin_make
source devel/setup.bash
cd ~/catkin_ws/src
ln -s $CI_SOURCE_PATH .
- name: before_script
run: |
cd ~/catkin_ws
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
echo "export APR_HOME=/usr" >> ~/.bashrc
echo "export ICU_HOME=/usr" >> ~/.bashrc
echo "export XERCES_HOME=/usr" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}" >> ~/.bashrc
. ~/.bashrc
- name: script
run: |
cd ~/catkin_ws
source devel/setup.bash
find -L /home/travis/catkin_ws/src/robosherlock/robosherlock -name include -type d
catkin_make "$( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )"
source devel/setup.bash
cd ~/catkin_ws/src/robosherlock
lcov -c -i -d ~/catkin_ws -o coverage_base.info
cd ~/catkin_ws
nohup roscore
catkin_make run_tests_robosherlock
catkin_test_results
- name: after_script
run: |
cd ~/catkin_ws/src/robosherlock
lcov --directory ~/catkin_ws/ --capture --output-file coverage_test.info
lcov -a coverage_base.info -a coverage_test.info -o ~/catkin_ws/src/robosherlock/coverage_total.info
lcov --remove coverage_total.info '/usr/*' --output-file coverage_total.info
lcov --extract coverage_total.info '*robosherlock*' --output-file coverage_total.info
lcov --list coverage_total.info
bash <(curl -s https://codecov.io/bash) -X gcov -f ~/catkin_ws/src/robosherlock/coverage_total.info || echo "Codecov did not collect coverage reports"