Skip to content

Changed base yaml

Changed base yaml #50

Workflow file for this run

name: Build Test
on:
push:
branches:
- jazzy*
pull_request:
branches:
- jazzy*
jobs:
build:
runs-on: ubuntu-latest
container:
image: osrf/ros:jazzy-desktop
steps:
- name: 🚀 Checkout code
uses: actions/checkout@v3
- name: 🔧 Install Dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
python3-venv \
python3-pip \
git
- name: 📦 Setup workspace
run: |
mkdir -p /smarty_ws
cp -r $GITHUB_WORKSPACE/* /smarty_ws
python3 -m venv .venv
. .venv/bin/activate
bash -c "source /opt/ros/jazzy/setup.bash && cd /smarty_ws && ./setup.sh"
- name: 🛠️ Installing Base Packages
run: |
. .venv/bin/activate
# Find all dependencies.repos files within the src directory
cd /smarty_ws
repos_files=$(find src -type f -name "dependencies.repos")
# Check if any dependencies.repos files were found
if [ -z "$repos_files" ]; then
echo "No dependencies.repos files found in $BASE_DIR."
else
echo "Found dependencies.repos files:"
echo "$repos_files"
fi
# Iterate over each found dependencies.repos file and install dependencies
for repos_file in $repos_files; do
echo "Installing dependencies from $repos_file"
vcs import < "$repos_file" src/
done
find src/* -maxdepth 3 -name requirements.txt -exec pip install -r {} \;
- name: 🛠️ Build packages
run: |
. .venv/bin/activate
bash -c "source /opt/ros/jazzy/setup.bash && cd /smarty_ws && colcon build --event-handlers console_cohesion+"
- name: 🧪 Run tests
run: |
. .venv/bin/activate
echo "Skipping tests for now"
# bash -c "source /opt/ros/jazzy/setup.bash && cd /smarty_ws && colcon test --event-handlers console_cohesion+"
- name: 🎯 Finish
run: echo "Build and test finished"