-
Notifications
You must be signed in to change notification settings - Fork 36
68 lines (63 loc) · 2.08 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
name: 'Ubuntu 20.04 + ROS Noetic: Build '
on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {name: 'Ubuntu 20.04 + ROS Noetic: Build ', 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: |
sudo apt-get install python3-vcstool python3-catkin-tools ros-$ROS_DISTRO-cmake-modules protobuf-compiler autoconf git rsync -y
- name: Release Build Test
working-directory:
env:
DEBIAN_FRONTEND: noninteractive
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
catkin build -j$(nproc) -l$(nproc) coin_lio