forked from knowrob/knowrob
-
Notifications
You must be signed in to change notification settings - Fork 5
95 lines (95 loc) · 3.29 KB
/
main.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
name: CI
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
path: 'ros_ws/src/knowrob'
#- name: Checkout rosprolog
# uses: actions/checkout@v2
# with:
# path: 'ros_ws/src/rosprolog'
# repository: knowrob/rosprolog
# - name: Checkout iai_common_msgs
# uses: actions/checkout@v2
# with:
# path: 'ros_ws/src/iai_common_msgs'
# repository: code-iai/iai_common_msgs
- name: Setup KnowRob workspace
uses: betwo/github-setup-catkin@master
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
# Version range or exact version of ROS version to use, using SemVer's version range syntax.
ros-version: noetic
# Root directory of the catkin workspace
workspace: $GITHUB_WORKSPACE/ros_ws
- name: Build KnowRob workspace
shell: bash
run: |
sudo add-apt-repository ppa:swi-prolog/stable
sudo apt-get update -y -qq
sudo apt-get install swi-prolog libspdlog-dev \
libboost-python-dev libboost-serialization-dev libboost-program-options-dev \
libraptor2-dev librdf0-dev \
libfmt-dev \
doxygen graphviz
cd ros_ws
catkin_make_isolated
- name: Run unit tests
shell: bash
run: |
sudo systemctl start mongod
export ROS_HOSTNAME=localhost
roscore &
cd $GITHUB_WORKSPACE/ros_ws/src/knowrob
source $GITHUB_WORKSPACE/ros_ws/devel_isolated/setup.bash
$GITHUB_WORKSPACE/ros_ws/devel_isolated/knowrob/lib/knowrob/all_gtests --gtest_filter=* --gtest_output="xml:$GITHUB_WORKSPACE/gtest-knowrob.xml" --gtest_color=no
- name: Report test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "gtest-knowrob.xml"
action_fail: true
action_fail_on_inconclusive: true
#####
- name: Run doxygen
if: ${{ github.event_name == 'push' }}
shell: bash
run: |
cd $GITHUB_WORKSPACE/ros_ws/build_isolated/knowrob
make doc
#- name: Run pldoc
# if: ${{ github.event_name == 'push' }}
# shell: bash
# run: |
# source $GITHUB_WORKSPACE/ros_ws/devel_isolated/setup.bash
# cp $GITHUB_WORKSPACE/ros_ws/src/knowrob/README.md $GITHUB_WORKSPACE/ros_ws/src/knowrob/src/
# rosrun rosprolog rosprolog-doc knowrob
- name: Move checkout
run: |
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/.git $GITHUB_WORKSPACE/
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/* $GITHUB_WORKSPACE/
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Deploy doc to gh-pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The branch the action should deploy to.
BRANCH: gh-pages
# The folder the action should deploy.
FOLDER: doc/html
# The folder in the target branch
TARGET_FOLDER: ${{ steps.extract_branch.outputs.branch }}
CLEAN: true
SINGLE_COMMIT: true