Skip to content

Commit

Permalink
Fix CI failure with SWIG::Python on Ubuntu 24.04 (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini authored Dec 9, 2024
1 parent 489cbc9 commit 22c06ce
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
build_type: [Release]
os: [ubuntu-22.04, windows-latest]
os: [ubuntu-24.04, windows-latest]
build_shared_libs: [ON, OFF]

steps:
Expand All @@ -34,7 +34,7 @@ jobs:
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
Expand All @@ -56,12 +56,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Dependencies [Ubuntu]
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
sudo apt update
sudo apt install -y git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev libopencv-dev qtbase5-dev \
qtdeclarative5-dev qtmultimedia5-dev libtinyxml-dev libgsl-dev libpython3-dev swig
qtdeclarative5-dev qtmultimedia5-dev libtinyxml-dev libgsl-dev libpython3-dev
# regression documented in https://github.com/robotology/robotology-superbuild/blob/master/cmake/RobotologySuperbuildLogic.cmake#L39-L64
- name: Install Custom SWIG 4.2.1 [Ubuntu]
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
sudo apt remove swig
cd ${GITHUB_WORKSPACE}
wget https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/swig_4_2_1_ubuntu_24_04.zip
unzip swig_4_2_1_ubuntu_24_04.zip
echo "${{ github.workspace }}/swig_4_2_1_ubuntu_24_04_install/bin" >> $GITHUB_PATH
echo "SWIG_LIB=${{ github.workspace }}/swig_4_2_1_ubuntu_24_04_install/share/swig/4.2.1" >> $GITHUB_ENV
- name: Check SWIG version
run: swig -version

- name: Determine YCM and YARP required versions
shell: bash
Expand Down Expand Up @@ -114,7 +129,7 @@ jobs:
cmake --build . --config ${{ matrix.build_type }} --target INSTALL
- name: Source-based Dependencies [Ubuntu]
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
# YCM
Expand Down Expand Up @@ -173,7 +188,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Configure [Ubuntu]
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
mkdir -p build
Expand Down Expand Up @@ -202,7 +217,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Enable python bindings on Ubuntu
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
cd build
Expand Down

0 comments on commit 22c06ce

Please sign in to comment.