Skip to content

Commit

Permalink
Merge pull request #3 from fcladera/main
Browse files Browse the repository at this point in the history
Build action for ROFL
  • Loading branch information
Chao Qu authored Jan 9, 2024
2 parents 46e8905 + 0ad68d9 commit f63a612
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ROS build pipeline based on kr_mav_control build
# https://github.com/KumarRobotics/kr_mav_control/blob/master/.github/workflows/build.yml
name: build

on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

jobs:
build:
strategy:
matrix:
ros_distro: [noetic]

runs-on: ubuntu-latest
container: osrf/ros:${{ matrix.ros_distro }}-desktop
steps:
- uses: actions/checkout@v2

- name: Apt dependencies
run: |
apt-get update
apt-get install -qy g++ libeigen3-dev git python3-catkin-tools
rosdep update
rosdep install --from-paths . --ignore-src -y -r --as-root apt:false
- name: Setup catkin workspace
run: |
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
mkdir -p ${RUNNER_WORKSPACE}/catkin_ws/src
cd ${RUNNER_WORKSPACE}/catkin_ws
catkin init
catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release
- name: Install glog
run: |
git clone --depth 1 --branch v0.6.0 https://github.com/google/glog.git
cd glog
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_CXX_STANDARD=17
cmake --build build
sudo cmake --build build --target install
- name: Install fmt
run: |
git clone --depth 1 --branch 8.1.0 https://github.com/fmtlib/fmt.git
cd fmt
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_CXX_STANDARD=17 -DFMT_TEST=False
sudo make install
- name: Install Abseil
run: |
git clone --depth 1 --branch 20220623.0 https://github.com/abseil/abseil-cpp.git
cd abseil-cpp
mkdir build && cd build
cmake -DABSL_BUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
sudo cmake --build . --target install
- name: Install Sophus
run: |
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout 785fef3
mkdir build && cd build
cmake -DBUILD_SOPHUS_TESTS=OFF -DBUILD_SOPHUS_EXAMPLES=OFF -DCMAKE_CXX_STANDARD=17 ..
sudo make install
- name: Install Benchmark
run: |
git clone --depth 1 --branch v1.8.3 https://github.com/google/benchmark.git
cd benchmark
mkdir build && cd build
cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 ..
sudo cmake --build . --target install
- name: Build workspace
run: |
. /opt/ros/${{ matrix.ros_distro }}/setup.sh
cd ${RUNNER_WORKSPACE}/catkin_ws/src
ln -s ${GITHUB_WORKSPACE}
catkin build -j2 --no-status -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17

0 comments on commit f63a612

Please sign in to comment.