Skip to content

Crazyswarm test 🐝 #1096

Crazyswarm test 🐝

Crazyswarm test 🐝 #1096

name: Crazyswarm test 🐝
# Controls when the action will run.
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *'
jobs:
swarm_at_crazylab:
runs-on: self-hosted
container:
image: ros:noetic
options: --privileged
env:
CSW_PYTHON: python3
CRAZYSWARM_PATH: crazyswarm
CRAZYSWARM_YAML: crazylab-malmö.yaml
steps:
- name: Install Crazyswarm dependencies
run: |
apt update
apt install -y git swig libpython3-dev python3-numpy \
python3-yaml python3-matplotlib python3-pytest python3-scipy \
libpcl-dev libusb-1.0-0-dev sdcc ros-noetic-vrpn gcc-arm-none-eabi \
ros-noetic-tf ros-noetic-tf-conversions python3-toml python3-pip
- name: Check out sources
uses: actions/checkout@v4
- name: Download latest firmware files
with:
repo: bitcraze/crazyflie-release
workflow: nightly.yml
uses: dawidd6/action-download-artifact@v3
- name: Checkout Crazyswarm
uses: actions/checkout@v4
with:
repository: USC-ACTLab/crazyswarm
path: crazyswarm
- name: Build Crazyswarm
run: |
source /opt/ros/noetic/setup.bash
cd crazyswarm
./build.sh
shell: bash
- name: Install Crazyflie python library
run: pip3 install git+https://github.com/bitcraze/crazyflie-lib-python.git@master
- name: Upgrade swarm to latest firmware
run: |
source crazyswarm/ros_ws/devel/setup.bash
python3 management/program_swarm.py nightly/firmware-tag-nightly.zip --sim
shell: bash
- name: Run Crazyswarm tests
run: |
source crazyswarm/ros_ws/devel/setup.bash
roslaunch swarms/crazylab-malmö.launch &
python3 -m pytest --verbose tests/crazyswarm
shell: bash