From 732409b6381879bea7af3e4f06d3133577a09e88 Mon Sep 17 00:00:00 2001 From: Samer Khshiboun <99127997+SamerKhshiboun@users.noreply.github.com> Date: Sun, 16 Jun 2024 21:00:20 +0300 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa4d904ac..280cc3808 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,7 +113,8 @@ 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/ @@ -121,9 +122,23 @@ jobs: # 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: |