-
Notifications
You must be signed in to change notification settings - Fork 20
97 lines (95 loc) · 4.25 KB
/
build.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
name: build
on:
push:
paths-ignore:
- 'docs/**'
workflow_dispatch:
schedule:
- cron: "0 1 * * 1"
jobs:
build:
runs-on: ubuntu-20.04
env:
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...]
CI_SOURCE_PATH: $(pwd)
WS_DEF_FILE: ${{ github.workspace }}/smb.repos
HW_FILE: ${{ github.workspace }}/smb_hw.repos
ROS_PARALLEL_JOBS: '-j8 -l6'
ROS_DISTRO: noetic
CATKIN_WS: /root/catkin_ws_test/
LIBSPINNAKER_FILEID: 1r4LNuU9IhfRWavegSaLTFLIenTrmMpN1
LIBSPINNAKER_FILENAME: spinnaker-2.7.0.128-Ubuntu20.04-amd64-pkg.tar.gz
container:
image: ethzrobotx/smb_docker:latest
steps:
- uses: actions/checkout@v3
- name: Install Python and ROS
run: |
sudo apt-get update
sudo apt-get install -y python3-catkin-tools python3-pip python3-vcstool git software-properties-common wget
- name: Create workspace
run: |
mkdir -p $CATKIN_WS/src
cd $CATKIN_WS
catkin config --init --extend /opt/ros/noetic -DCMAKE_BUILD_TYPE=Release
- name: Install ROS packages with rosdep
run: |
rosdep update
cd $CATKIN_WS/src
vcs import --recursive --input $WS_DEF_FILE .
vcs import --recursive --input $HW_FILE .
rosdep install --from-paths . --ignore-src --os=ubuntu:focal -r -y
- name: catkin build smb_opc
run: |
cd $CATKIN_WS
catkin build smb_opc --no-status
- name: catkin build smb_gazebo
run: |
cd $CATKIN_WS
catkin build smb_gazebo --no-status
- name: catkin build smb_slam
run: |
cd $CATKIN_WS
catkin build smb_slam --no-status
- name: catkin build smb_path_planner
run: |
cd $CATKIN_WS
catkin build smb_path_planner --no-status
- name: catkin build gbplanner
run: |
cd $CATKIN_WS
catkin build gbplanner* pci_general --no-status
- name: catkin build frontier_exploration
run: |
cd $CATKIN_WS
catkin build explore_lite slam_gmapping --no-status
- name: Install librealsense and dependencies
run: |
# Realsense
sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main"
sudo apt update
sudo apt install librealsense2-dev librealsense2-dkms librealsense2-utils -y
sudo apt install ros-noetic-ddynamic-reconfigure -y
- name: Install Robosense dependencies
run: |
# Robosense
sudo apt-get install -y libyaml-cpp-dev libpcap-dev libprotobuf-dev protobuf-compiler git
# - name: Install FLIR camera driver (libspinnaker)
# run: |
# # Spinnaker
# sudo apt update
# sudo apt install debconf-utils libusb-1.0-0 -y
# wget --quiet --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id='"$LIBSPINNAKER_FILEID" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$LIBSPINNAKER_FILEID" -O $LIBSPINNAKER_FILENAME && rm -rf /tmp/cookies.txt
# tar -xf $LIBSPINNAKER_FILENAME
# SPINNAKER_DIR=$(tar -xvf $LIBSPINNAKER_FILENAME | head -1)
# SPINNAKER_VERSION=${SPINNAKER_DIR#spinnaker-}
# SPINNAKER_VERSION="${SPINNAKER_VERSION%-amd64/}"_amd64
# rm $LIBSPINNAKER_FILENAME
# cd $SPINNAKER_DIR
# echo libspinnaker libspinnaker/accepted-flir-eula boolean true | sudo debconf-set-selections
# sudo dpkg -i libgentl_${SPINNAKER_VERSION}.deb libspinnaker_${SPINNAKER_VERSION}.deb libspinnaker-dev_${SPINNAKER_VERSION}.deb libspinnaker-c_${SPINNAKER_VERSION}.deb libspinnaker-c-dev_${SPINNAKER_VERSION}.deb
- name: catkin build smb
run: |
cd $CATKIN_WS
catkin build smb --no-status