-
Notifications
You must be signed in to change notification settings - Fork 32
84 lines (78 loc) · 2.86 KB
/
build_test_20.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
name: 'Ubuntu 20 + ROS Noetic: Build + Tests '
on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {name: 'Ubuntu 20 + ROS Noetic: Build + Tests ', rosdistro: 'noetic', container: 'ros:noetic-ros-base-focal'}
container: ${{ matrix.config.container }}
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup ccache
shell: bash
run: |
apt update && apt install -y ccache
export PATH="/usr/lib/ccache:$PATH"
export CCACHE_DIR=$HOME/catkin_ws/ccache
export CCACHE_STAMP=$(date +%Y-%m-%d_%H-%M-%S)
echo "Updated PATH=$PATH"
echo "Set CCACHE_DIR=$CCACHE_DIR"
echo "Set CCACHE_STAMP=$CCACHE_STAMP"
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
echo "CCACHE_STAMP=$CCACHE_STAMP" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
mkdir -p $CCACHE_DIR
ccache --max-size=1G
- name: Cache ccache files
uses: actions/[email protected]
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.config.name }}-ccache-${{ env.CCACHE_STAMP }}
restore-keys: |
${{ matrix.config.name }}-ccache-
- name: Install System Deps on Noetic
if: ${{ matrix.config.container == 'ros:noetic-ros-base-focal' }}
run: |
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
apt update && apt install -y python3-pip python3-wstool python3-catkin-tools autoconf libtool git
pip3 install osrf-pycommon
- name: Release Build Test
working-directory:
env:
DEBIAN_FRONTEND: noninteractiv
shell: bash
run: |
apt update
mkdir -p $HOME/catkin_ws/src;
cd $HOME/catkin_ws
catkin init
catkin config --extend "/opt/ros/${{matrix.config.rosdistro}}"
catkin config --merge-devel
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd $HOME/catkin_ws/src
ln -s $GITHUB_WORKSPACE
wstool init . ./panoptic_mapping/panoptic_mapping_https.rosinstall
wstool update
rosdep update
rosdep install --from-paths . --ignore-src -y --rosdistro ${{matrix.config.rosdistro}}
catkin build -j$(nproc) -l$(nproc) panoptic_mapping_utils
- name: Run Unit Tests
working-directory:
shell: bash
run: |
cd $HOME/catkin_ws/src
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCATKIN_ENABLE_TESTING=True
catkin build panoptic_mapping --no-deps -i --catkin-make-args tests
source $HOME/catkin_ws/devel/setup.bash
status=0 && for f in $HOME/catkin_ws/devel/lib/panoptic_mapping/*-test; do $f || exit 1; done