SCXML implementation of BT Control Nodes #369
Workflow file for this run
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: Test | |
# Test the python packages that are part of the toolchain | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- ros-distro: jazzy | |
os: ubuntu-24.04 | |
- ros-distro: humble | |
os: ubuntu-22.04 | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Set up ROS | |
- name: Set up ROS | |
uses: ros-tooling/[email protected] | |
with: | |
required-ros-distributions: ${{ matrix.ros-distro }} | |
# Get bt_tools TODO: remove after the release of bt_tools | |
- name: Checkout bt_tools | |
uses: actions/checkout@v2 | |
with: | |
repository: boschresearch/bt_tools | |
ref: main | |
path: colcon_ws/src/bt_tools | |
# Remove unused packages from checked out bt_tools | |
- name: Remove packages we don't need | |
run: | | |
rm -rf colcon_ws/src/bt_tools/bt_live | |
rm -rf colcon_ws/src/bt_tools/bt_tools | |
rm -rf colcon_ws/src/bt_tools/bt_tools_common | |
rm -rf colcon_ws/src/bt_tools/bt_view | |
# Compile bt_tools TODO: remove after the release of bt_tools | |
- name: Compile bt_tools | |
run: | | |
source /opt/ros/${{ matrix.ros-distro }}/setup.bash | |
# Install dependencies | |
cd colcon_ws | |
rosdep update && rosdep install --from-paths src --ignore-src -y | |
# Build and install bt_tools | |
colcon build --symlink-install | |
# Get smc_storm for testing | |
- name: Get smc_storm | |
id: get_smc_storm | |
run: | | |
wget https://github.com/convince-project/smc_storm/releases/download/0.0.3/smc_storm_executable.tar.gz | |
tar -xzf smc_storm_executable.tar.gz | |
./install.sh --install-dependencies | |
# Save the path to the smc_storm executable | |
echo SMC_STORM_PATH=$PWD/bin/ >> $GITHUB_OUTPUT | |
# Update pip | |
- name: Update pip | |
run: python -m pip install ${{ matrix.os == 'ubuntu-24.04' && '--break-system-packages' || '' }} --upgrade pip | |
# workaround python 3.12 issue | |
- name: Install special fork of js2py | |
run: | | |
pip install --break-system-packages git+https://github.com/felixonmars/[email protected] | |
if: ${{ matrix.os == 'ubuntu-24.04' }} | |
# install the packages | |
- name: Install packages | |
run: | | |
pip install ${{ matrix.os == 'ubuntu-24.04' && '--break-system-packages' || '' }} . | |
# this solves | |
# E ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject | |
- name: Downgrade numpy, networkx to match | |
run: | | |
pip install numpy==1.26.4 networkx==2.8.8 | |
if: ${{ matrix.os == 'ubuntu-22.04' }} | |
# lint packages | |
# TODO: add linting | |
# run the tests | |
- name: Run tests | |
run: | | |
export PATH=$PATH:${{ steps.get_smc_storm.outputs.SMC_STORM_PATH }} | |
# source /opt/ros/${{ matrix.ros-distro }}/setup.bash | |
source colcon_ws/install/setup.bash # TODO: remove after the release of bt_tools | |
pytest-3 -vs test/ |