Skip to content

Commit

Permalink
PR #3130 from SamerKhshiboun: Install specific numpy version to avoid…
Browse files Browse the repository at this point in the history
… errors in github actions
  • Loading branch information
SamerKhshiboun committed Jun 16, 2024
2 parents d30980f + 732409b commit 68473bd
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,32 @@ jobs:
# wget $bag_filename -P "records/"
# sudo apt install ros-${{ matrix.ros_distro}}-launch-pytest

- name: Install Packages For Tests
- name: Install Packages For Foxy Tests
if: ${{ matrix.ros_distro == 'foxy' }}
run: |
# To avoid mixing of 'apt' provided packages and 'pip' provided packages, one way is to create virtual env
# and manage python packages within it. Ref: https://peps.python.org/pep-0668/
python3 -m venv .venv
# Activate the virtual env such that following python related commands run within it.
source .venv/bin/activate
sudo apt-get install python3-pip
pip3 install numpy --upgrade
# numpy-quaternion needs numpy<2.0.0. Chose 1.24.1 as it is the highest version that support foxy.
pip3 install --force-reinstall numpy==1.24.1
pip3 install numpy-quaternion tqdm pyyaml
- name: Install Packages For Humble/Iron/Rolling/Jazzy Tests
if: ${{ matrix.ros_distro != 'foxy' }}
run: |
# To avoid mixing of 'apt' provided packages and 'pip' provided packages, one way is to create virtual env
# and manage python packages within it. Ref: https://peps.python.org/pep-0668/
python3 -m venv .venv
# Activate the virtual env such that following python related commands run within it.
source .venv/bin/activate
sudo apt-get install python3-pip
# numpy-quaternion needs numpy<2.0.0. Chose 1.26.4 as it is the lowest working version for ubuntu 24.04.
pip3 install --force-reinstall numpy==1.26.4
pip3 install numpy-quaternion tqdm pyyaml

- name: Run Tests
run: |
Expand Down

0 comments on commit 68473bd

Please sign in to comment.