mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ '*' ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# melodic:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - name: Native Melodic build
|
|
# run: |
|
|
# docker run --rm -v $(pwd):/root/catkin_ws/src/clover ros:melodic-ros-base /root/catkin_ws/src/clover/builder/standalone-install.sh
|
|
noetic:
|
|
runs-on: ubuntu-latest
|
|
container: ros:noetic-ros-base
|
|
defaults:
|
|
run:
|
|
working-directory: catkin_ws
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
path: catkin_ws/src/clover
|
|
- name: Install requirements
|
|
run: apt-get update && apt-get -y install python3-pip fakeroot python3-bloom debhelper dpkg-dev
|
|
- name: Install dependencies
|
|
run: rosdep update && rosdep install --from-paths src --ignore-src -y
|
|
- name: Install GeographicLib datasets
|
|
run: wget -qO- https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | bash
|
|
- name: catkin_make
|
|
run: source /opt/ros/$ROS_DISTRO/setup.bash && catkin_make
|
|
- name: Run tests
|
|
run: source devel/setup.bash && catkin_make run_tests && catkin_test_results
|
|
- name: Build Debian packages
|
|
run: |
|
|
source devel/setup.bash
|
|
for file in `find . -name "package.xml"`; do
|
|
cd $(dirname ${file})
|
|
bloom-generate rosdebian --os-name ubuntu --os-version $(lsb_release -cs) --ros-distro $ROS_DISTRO
|
|
fakeroot debian/rules binary
|
|
cd -
|
|
done
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debian-packages
|
|
path: catkin_ws/src/clover/*.deb
|
|
retention-days: 1
|