-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a25e50
commit e3357b1
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: project_legion_build | ||
|
||
on: | ||
# Triggered whenever push to the master branch | ||
push: | ||
branches: | ||
- main | ||
|
||
# Triggered whenever a pull request is created on master | ||
pull_request: | ||
branches: ["main"] | ||
types: [opened] | ||
|
||
|
||
jobs: | ||
build: | ||
# Create a container of the latest Ubuntu, other values could be | ||
# ubuntu-latest, ubuntu-22.04, etc. | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
# Install some system pacakges | ||
- name: Install ROS 2 Galactic packages | ||
run: | | ||
sudo apt update | ||
sudo apt install -y software-properties-common | ||
sudo add-apt-repository universe | ||
sudo apt update && sudo apt install -y curl | ||
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
sudo apt update | ||
sudo apt install -y ros-galactic-ros-base python3-colcon-common-extensions | ||
sudo apt install -y lcov | ||
- name: Setup Workspace | ||
run: | | ||
source /opt/ros/galactic/setup.bash | ||
mkdir -p ros_ws/src/project_legion | ||
cd ros_ws | ||
colcon build | ||
source install/setup.bash | ||
# We want to use GitHub CI checkout version 3 for checking out the branch | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: ros_ws/src/project_legion | ||
|
||
# Build for test coverage | ||
- name: Configure CMake flags and build exectables | ||
run: | | ||
source /opt/ros/galactic/setup.bash | ||
sudo apt install python3-rosdep | ||
sudo rosdep init | ||
rosdep update --include-eol-distros | ||
cd ros_ws | ||
rosdep install --from-paths src -y --ignore-src | ||
colcon build --packages-select project_legion | ||