Skip to content

x

x #232

Workflow file for this run

name: Build-Test
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
build-test:
# Name the Job
name: Build test
# Set the type of machine to run on
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
container: ros:noetic
# Only run when merging to main.
if: github.ref == 'refs/heads/main'
steps:
# Run package update
- name: Run package update
run: |
sudo apt update
sudo apt dist-upgrade -y
# Install dependencies
- name: Install dependencies
run: |
sudo apt-get install -y git screen
# Checks out a copy of your repository
- name: Checkout code
uses: actions/checkout@v2
- name: Install conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.12.8
auto-activate-base: false
- name: Set up conda environment
run: |
cd $GITHUB_WORKSPACE
conda create -n codebotler python=3.12.8 pip
conda activate codebotler
pip install -r requirements.txt
- name: Catkin make
shell: bash
run: |
source /opt/ros/noetic/setup.bash
cd $GITHUB_WORKSPACE/robot_interface
catkin_make
- name: Run robot server interface
shell: bash
run: |
source /opt/ros/noetic/setup.bash
source $GITHUB_WORKSPACE/robot_interface/devel/setup.bash
screen -s bash -mdS roscore roscore
sleep 2
cd $GITHUB_WORKSPACE
source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate codebotler
timeout --preserve-status 5 python robot_interface/src/robot_server_example.py
- name: Run deployment interface with robot server
shell: bash
run: |
source /opt/ros/noetic/setup.bash
source $GITHUB_WORKSPACE/robot_interface/devel/setup.bash
screen -s bash -mdS roscore roscore
sleep 2
cd $GITHUB_WORKSPACE
screen -s bash -mdS robot_server conda init && conda activate codebotler && python robot_interface/src/robot_server_example.py
export OPENAI_API_KEY=FAKE_KEY
conda init
conda activate codebotler
timeout --preserve-status -s SIGINT 5 python codebotler.py --robot --ip 0.0.0.0