Skip to content

Commit

Permalink
CI update (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsasaki0109 authored Nov 27, 2023
1 parent 2bbf57c commit 1372baa
Showing 1 changed file with 6 additions and 56 deletions.
62 changes: 6 additions & 56 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,16 @@
name: build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
foxy_build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: ROS2 Install
run: |
# Ref: https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install ros-foxy-desktop
source /opt/ros/foxy/setup.bash
- uses: actions/checkout@v1
with:
submodules: true
- name: Copy repository
run: |
mkdir -p ~/ros2_ws/src/pcl_localization_ros2
cp -rf . ~/ros2_ws/src/pcl_localization_ros2
- name: Install dependencies
run: |
source /opt/ros/foxy/setup.bash
sudo apt install -y python3-rosdep2
rosdep update
cd ~/ros2_ws/src
rosdep install -r -y --from-paths . --ignore-src
- name: Build packages
run: |
source /opt/ros/foxy/setup.bash
# Install colcon
# Ref: https://index.ros.org/doc/ros2/Tutorials/Colcon-Tutorial/
sudo apt install python3-colcon-common-extensions
cd ~/ros2_ws
colcon build
source ~/ros2_ws/install/setup.bash
humble_build:
name: Build
runs-on: ubuntu-22.04
container: ros:humble
steps:
- name: ROS2 Install
run: |
# Ref: https://index.ros.org/doc/ros2/Installation/Humnble/Linux-Install-Debians/
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install ros-humble-desktop
source /opt/ros/humble/setup.bash
- uses: actions/checkout@v1
with:
submodules: true
Expand All @@ -74,10 +21,12 @@ jobs:
- name: Install dependencies
run: |
source /opt/ros/humble/setup.bash
sudo apt install -y python3-rosdep2
sudo apt install -y python3-rosdep
apt update
rosdep update
cd ~/ros2_ws/src
rosdep install -r -y --from-paths . --ignore-src
rosdep install -r -y --from-paths . --ignore-src
shell: bash
- name: Build packages
run: |
source /opt/ros/humble/setup.bash
Expand All @@ -87,3 +36,4 @@ jobs:
cd ~/ros2_ws
colcon build
source ~/ros2_ws/install/setup.bash
shell: bash

0 comments on commit 1372baa

Please sign in to comment.