Crazyswarm test 🐝 #884
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: Download latest firmware files | |
with: | |
repo: bitcraze/crazyflie-release | |
workflow: nightly.yml | |
uses: dawidd6/action-download-artifact@v2 | |
- name: Checkout Crazyswarm | |
uses: actions/checkout@v3 | |
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 |