Skip to content

Commit

Permalink
[Fix] Fix github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hridaybavle committed Apr 19, 2024
1 parent 592f58e commit 15899e0
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 34 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/foxy_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ name: ROS 2 Foxy

on:
push:
branches:
- "feature/ros2"
branches:
- feature/ros2

jobs:
build:
runs-on: ubuntu-latest
container:
image: ros:foxy
steps:
- name: Create Workspace
run: mkdir -p $HOME/workspaces/s_graphs_ros2_ws/src

- name: Checkout code
run: cd $HOME/workspaces/s_graphs_ros2_ws/src && . /opt/ros/foxy/setup.sh && git clone https://github.com/snt-arg/s_graphs.git

- name: Create Workspace and checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build
run: . /opt/ros/foxy/setup.sh && ./setup.sh
run: . /opt/ros/foxy/setup.sh && ./.github/workflows/setup.sh && colcon build
11 changes: 3 additions & 8 deletions .github/workflows/humble_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ jobs:
steps:
- name: Create Workspace and checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build
run: |
. /opt/ros/humble/setup.sh && \
mkdir -p $HOME/workspace/s_graphs_ws/src && \
cd .. && \
cp -r s_graphs $HOME/workspace/s_graphs_ws/src && \
cd $HOME/workspace/s_graphs_ws/src/s_graphs && \
./.github/workflows/setup.sh && \
cd ../../ && colcon build --symlink-install
run: . /opt/ros/humble/setup.sh && ./.github/workflows/setup.sh && colcon build
13 changes: 6 additions & 7 deletions .github/workflows/iron_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ name: ROS 2 Iron
on:
push:
branches:
- feature/ros2
- feature/ros2

jobs:
build:
runs-on: ubuntu-latest
container:
image: ros:iron
steps:
- name: Create Workspace
run: mkdir -p $HOME/workspaces/s_graphs_ros2_ws/src && cd $HOME/workspaces/s_graphs_ros2_ws/src && . /opt/ros/iron/setup.sh

- name: Checkout code
run: cd $HOME/workspaces/s_graphs_ros2_ws/src && . /opt/ros/iron/setup.sh && git clone https://github.com/snt-arg/s_graphs.git
- name: Create Workspace and checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build
run: . /opt/ros/iron/setup.sh && ./setup.sh
run: . /opt/ros/iron/setup.sh && ./.github/workflows/setup.sh && colcon build
15 changes: 12 additions & 3 deletions .github/workflows/setup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash

# - Installing cpp dependencies
sudo apt update
sudo apt install -y libceres-dev

#rosdep init
rosdep update --include-eol-distros

#import all repos
vcs import --recursive < .rosinstall_ros2
git submodule update --init --recursive

#install python requirements
pip3 install -r requirements.txt

#rosdep install
rosdep install --from-paths . -y --ignore-src -r
rosdep install --from-paths . -y --ignore-src -r

# - Importing all dependencies
colcon build --symlink-install
6 changes: 3 additions & 3 deletions .real_mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
procs:
rosbag:
shell: 'bash -c "source /opt/ros/foxy/setup.bash && rosbag play ~/Downloads/real/stugalux_oetrange_f2_3r.db3"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/real/stugalux_oetrange_f2_3r.db3"'
autostart: true
stop: SIGINT
s_graphs:
shell: 'bash -c "source ~/workspaces/s_graphs_ros2_ws/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=false env:=real"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=false env:=real"'
autostart: true
rviz:
shell: 'bash -c "source ~/workspaces/s_graphs_ros2_ws/install/setup.bash && rviz2 -d ~/workspaces/s_graphs_ros2_ws/src/s_graphs/rviz/s_graphs_ros2.rviz"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"'
autostart: true
8 changes: 4 additions & 4 deletions .virtual_mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
procs:
rosbag:
shell: 'bash -c "source /opt/ros/foxy/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"'
autostart: true
stop: SIGINT
s_graphs:
shell: 'bash -c "source ~/workspaces/s_graphs_ros2_ws/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"'
autostart: true
rviz:
shell: 'bash -c "source ~/workspaces/s_graphs_ros2_ws/install/setup.bash && rviz2 -d ~/workspaces/s_graphs_ros2_ws/src/s_graphs/rviz/s_graphs_ros2.rviz"'
autostart: true
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"'
autostart: true

0 comments on commit 15899e0

Please sign in to comment.