Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
omarkhaled03 authored Nov 21, 2024
1 parent 8a25e50 commit e3357b1
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
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

0 comments on commit e3357b1

Please sign in to comment.