Install vcs in ubuntu_20_04.yml #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu 22.04 build with debian ros packages along with source packages | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ubuntu2204: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [install, devel] | |
build_all: [minimal, full] | |
runs-on: ubuntu-22.04 | |
# env: | |
steps: | |
- name: git clone ros_from_src | |
uses: actions/checkout@v3 | |
with: | |
path: other/src/ros_from_src | |
- name: os version | |
run: | | |
lsb_release -a | |
- name: apt update | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get update | |
- name: apt upgrade | |
run: | | |
echo "skip" | |
# sudo apt-get upgrade | |
- name: needrestart | |
run: | | |
sudo needrestart -v | |
# sudo needrestart -r a | |
# sudo systemctl restart packagekit | |
# sudo systemctl restart php8.1-fpm | |
# sudo systemctl restart ssh | |
- name: apt library installs 1 | |
run: | | |
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libunwind-dev | |
dpkg -l | grep libunwind | |
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libceres-dev | |
sudo apt-get install -yqq devscripts dh-make | |
- name: apt library installs 2 | |
run: | | |
sudo apt-get install -yqq libgeographic-dev | |
sudo apt-get install -yqq libgmock-dev libgoogle-glog-dev | |
sudo apt-get install -yqq liborocos-bfl-dev | |
sudo apt-get install -yqq libprotobuf-dev libprotoc-dev | |
- name: apt library installs 3 | |
run: | | |
sudo apt-get install -yqq libspnav-dev liburdfdom-dev | |
sudo apt-get install -yqq libyaml-cpp-dev | |
sudo apt-get install -yqq cython3 | |
sudo apt-get install -yqq freeglut3-dev | |
sudo apt-get install -yqq libapriltag-dev | |
sudo apt-get install -yqq libcgal-dev | |
sudo apt-get install -yqq libfmt-dev | |
sudo apt-get install -yqq libgsl-dev | |
sudo apt-get install -yqq libhdf5-dev | |
sudo apt-get install -yqq libturbojpeg0-dev | |
sudo apt-get install -yqq libzmq3-dev | |
sudo apt-get install -yqq ocl-icd-opencl-dev opencl-headers | |
sudo apt-get install -yqq libopenvdb-dev | |
- name: apt sdl installs | |
run: | | |
sudo apt-get install -o Debug::pkgProblemResolver=true -yqq libsdl2-* libsdl-image1.2-dev python3-sdl2 | |
sudo apt-get install -yqq frei0r-plugins-dev libfrei0r-ocaml-dev | |
- name: apt video installs | |
run: | | |
sudo apt-get install -yqq libgst-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev | |
sudo apt-get install -yqq libuvc-dev libv4l-dev | |
- name: apt qt installs | |
run: | | |
sudo apt-get install -yqq libqt5svg5-dev libqt5websockets5-dev libqt5x11extras5-dev libqwt-qt5-dev | |
sudo apt-get install -yqq libqtav-dev | |
- name: apt tool installs | |
run: | | |
sudo apt-get install -yqq git | |
sudo apt-get install -yqq vim curl jq | |
sudo apt-get install -yqq python-is-python3 python3-venv | |
- name: apt ros installs | |
run: | | |
sudo apt-get install -yqq ros-* | |
sudo apt-get install -yqq catkin-lint | |
sudo apt-get install -yqq libimage-view-dev | |
sudo apt-get install -yqq libpcl-ros-dev | |
sudo apt-get install -yqq python3-tf2-geometry-msgs | |
- name: setup | |
run: | | |
mkdir -p other/src | |
echo "DEST=$HOME/other/install" >> $GITHUB_ENV | |
# echo "$DEST/bin" >> $GITHUB_PATH | |
echo PYTHON_MAJOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f1` >> $GITHUB_ENV | |
echo PYTHON_MINOR_VERSION=`python --version | awk '{print $2}' | cut -d'.' -f2` >> $GITHUB_ENV | |
- name: setup 2 | |
run: | | |
echo "PATH=$PATH:$DEST/bin" >> $GITHUB_ENV | |
echo "PYTHONPATH=$DEST/lib/python$PYTHON_MAJOR_VERSION.$PYTHON_MINOR_VERSION/site-packages/" >> $GITHUB_ENV | |
echo "CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$DEST/lib/cmake" >> $GITHUB_ENV | |
- name: check setup | |
run: | | |
echo $HOME | |
echo $GITHUB_PATH | |
echo $PATH | |
echo $PYTHONPATH | |
- name: git clone vcstool | |
uses: actions/checkout@v3 | |
with: | |
repository: dirk-thomas/vcstool | |
path: other/src/vcstool | |
- name: vcs | |
run: | | |
cd other/src | |
cd vcstool | |
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed | |
vcs --help | |
- name: git clone pycommon | |
uses: actions/checkout@v3 | |
with: | |
repository: osrf/osrf_pycommon | |
path: other/src/osrf_pycommon | |
- name: pycommon | |
run: | | |
cd other/src | |
cd osrf_pycommon | |
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed | |
- name: git clone catkin tools | |
uses: actions/checkout@v3 | |
with: | |
repository: lucasw/catkin_tools | |
path: other/src/catkin_tools | |
ref: sanitize_cmake_prefix_path | |
- name: catkin tools | |
run: | | |
cd other/src | |
cd catkin_tools | |
python3 setup.py install --prefix=$DEST --record install_manifest.txt --single-version-externally-managed | |
which catkin | |
catkin --version | |
- name: setup base_catkin_ws | |
run: | | |
mkdir -p ${{ matrix.build_type }}_base_catkin_ws/src | |
cd ${{ matrix.build_type }}_base_catkin_ws/src | |
ln -s ../../other/src/ros_from_src/ubuntu_2204/base_repos.yaml | |
# need https instead of git@github | |
sed -i 's/[email protected]:/https:\/\/github.com\//' base_repos.yaml | |
ls -l | |
vcs import --shallow < base_repos.yaml | |
# show which versions were imported | |
vcs export --exact | |
# ignore repos that aren't yet building in 22.04 | |
../../other/src/ros_from_src/ubuntu_2204/ignore.sh | |
# the newer openvdb that doesn't have tbb error that the apt install version has | |
- name: install build openvdb | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
mkdir -p other/build/openvdb | |
cd other/build/openvdb | |
cmake ../../../${{ matrix.build_type }}_base_catkin_ws/src/other/vdb/openvdb/ -DCMAKE_INSTALL_PREFIX=$DEST | |
make -j3 # it's a slow build | |
make install | |
# TODO(lucasw) later have an entirely separately layer for the larger slow building packages | |
- name: ignore large slow packages | |
if: ${{ matrix.build_all == 'minimal' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws/src | |
touch other/PlotJuggler/CATKIN_IGNORE | |
touch other/plotjuggler_msgs/CATKIN_IGNORE | |
touch other/plotjuggler-ros-plugins/CATKIN_IGNORE | |
touch other/jsk_common/CATKIN_IGNORE | |
touch other/jsk_common_msgs/CATKIN_IGNORE | |
touch other/jsk_recognition/CATKIN_IGNORE | |
touch other/jsk_roseus/CATKIN_IGNORE | |
touch other/jsk_visualization/CATKIN_IGNORE | |
touch other/fiducials/CATKIN_IGNORE | |
touch other/fuse/CATKIN_IGNORE | |
touch other/lvr2/CATKIN_IGNORE | |
touch other/mesh_tools/CATKIN_IGNORE | |
touch other/rtabmap/CATKIN_IGNORE | |
touch other/rtabmap_ros/CATKIN_IGNORE | |
touch ros/grid_map/CATKIN_IGNORE | |
touch other/anybotics/CATKIN_IGNORE | |
touch other/octomap_mapping/CATKIN_IGNORE | |
touch other/octomap_ros/CATKIN_IGNORE | |
touch other/vdb/CATKIN_IGNORE | |
- name: devel setup | |
if: ${{ matrix.build_type == 'devel' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -Wno-dev -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include -DCMAKE_LIBRARY_PATH=$DEST/lib | |
# TODO(lucasw) lvr2 not building in devel, but could build it | |
# outside of catkin entirely and install to DEST | |
touch src/other/lvr2/CATKIN_IGNORE | |
touch src/other/mesh_tools/CATKIN_IGNORE | |
- name: install setup | |
if: ${{ matrix.build_type == 'install' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -Wno-dev -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include -DCMAKE_LIBRARY_PATH=$DEST/lib | |
# individual packages or sets of packages built separately | |
# this first one sources last because nothing has been built yet | |
- name: build qt_gui_core | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
catkin build --no-status qt_gui_core | |
source ${{ matrix.build_type }}/setup.bash | |
- name: build vdb mapping | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status vdb_mapping* --verbose | |
- name: build fiducials | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status fiducials | |
- name: build grid_map | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status grid_map* | |
- name: build rtabmap_ros | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status rtabmap_ros | |
- name: build joint_trajectory_controller | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status joint_trajectory_controller | |
- name: test joint_trajectory_controller | |
# TODO(lucasw) this test is slow, maybe don't do it at all | |
if: ${{ (matrix.build_type == 'devel' && matrix.build_all == 'full') }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build joint_trajectory_controller --no-status --no-deps --catkin-make-args tests | |
rostest joint_trajectory_controller joint_trajectory_controller.test | |
# catkin test --no-status joint_trajectory_controller | |
- name: test install joint_trajectory_controller | |
if: ${{ (matrix.build_type == 'devel' && matrix.build_all == 'full') }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin test --no-status joint_trajectory_controller | |
- name: build plotjuggler | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
# Does building plotjuggler before plotjuggler_ros mess up in install? | |
# catkin build --no-status plotjuggler | |
catkin build --no-status plotjuggler_ros | |
source ${{ matrix.build_type }}/setup.bash | |
- name: build rviz | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status rviz | |
source ${{ matrix.build_type }}/setup.bash | |
- name: build rviz_map_plugin | |
if: ${{ matrix.build_all == 'full' && matrix.build_type == 'install' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status rviz_map_plugin | |
- name: build jsk | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status jsk* | |
- name: build fuse | |
if: ${{ matrix.build_all == 'full' }} | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status fuse_models fuse_optimizers | |
- name: build rest of ${{ matrix.build_type }}_base_catkin_ws | |
run: | | |
cd ${{ matrix.build_type }}_base_catkin_ws | |
source ${{ matrix.build_type }}/setup.bash | |
catkin build --no-status | |
- name: tar up install_catkin_ws | |
if: ${{ matrix.build_type == 'install' }} | |
run: | | |
tar cvzf install_catkin_ws_2204.tgz install_base_catkin_ws/install | |
tar cvzf install_dest_2204.tgz $DEST | |
ls -l | |
- name: upload install_catkin_ws_2204.tgz | |
if: ${{ matrix.build_type == 'install' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install_dest_2204_${{ matrix.build_all }} | |
path: install_dest_2204.tgz | |
- name: upload install_catkin_ws_2204.tgz | |
if: ${{ matrix.build_type == 'install' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install_catkin_ws_2204__${{ matrix.build_all }} | |
path: install_catkin_ws_2204.tgz | |
- name: make a deb from the entirety of install_catkin_ws/install | |
if: ${{ matrix.build_type == 'install' }} | |
run: | | |
cd other/src/ros_from_src/debian | |
ln -s ../../../../install_base_catkin_ws/install | |
dpkg-buildpackage -A -uc | |
- name: upload .deb | |
if: ${{ matrix.build_type == 'install' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install_catkin_ws_2204_${{ matrix.build_all }}.deb | |
# TODO(lucasw) extract name from debian files, VERSION? | |
path: other/src/ros_from_src/rosone_0.0.6-1_all.deb |