From 19054b0f4dc9739b2c047627a7c47d2097db64c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20=C5=81ukawski?= Date: Tue, 1 Oct 2024 17:25:37 +0200 Subject: [PATCH 1/2] Use `SWIG_ROOT` to point at the binaries built by us --- .github/workflows/ci.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fde62143..a4662f8ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,14 +78,7 @@ jobs: path: .deps/swig - name: Install dependencies via apt - if: ${{matrix.os != 'ubuntu-24.04'}} - run: sudo apt-get install -qq ccache libeigen3-dev swig googletest - - - name: Install dependencies via apt (Ubuntu-24.04-specific) - if: ${{matrix.os == 'ubuntu-24.04'}} - run: | - sudo apt-get install -qq ccache libeigen3-dev bison googletest - sudo apt-get remove -y -qq swig + run: sudo apt-get install -qq ccache libeigen3-dev googletest - name: Set up CMake uses: jwlawson/actions-setup-cmake@v2 @@ -126,6 +119,7 @@ jobs: cmake -S .deps/swig -B .deps/swig/build $CMAKE_CCACHE_LAUNCHER cmake --build .deps/swig/build sudo cmake --install .deps/swig/build + echo "SWIG_ROOT=/usr/local/bin" >> $GITHUB_ENV - name: Configure kinematics-dynamics run: cmake -S . -B ./build $CMAKE_CCACHE_LAUNCHER -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON From fe9cf8fd7e8f7727ec901d3538a0eb5a1d9fa2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20=C5=81ukawski?= Date: Thu, 3 Oct 2024 19:36:06 +0200 Subject: [PATCH 2/2] Hack CMake's "find" mechanism There is a `find_program(NAMES)` command involved which favors a `swig4.0` command already present in /usr/bin. Using the `SWIG_ROOT` env var is not enough to override it. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4662f8ac..d3fe55e7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,7 @@ jobs: cmake -S .deps/swig -B .deps/swig/build $CMAKE_CCACHE_LAUNCHER cmake --build .deps/swig/build sudo cmake --install .deps/swig/build - echo "SWIG_ROOT=/usr/local/bin" >> $GITHUB_ENV + sudo ln -s /usr/local/bin/swig /usr/local/bin/swig4.0 # shadows /usr/bin/swig4.0 - name: Configure kinematics-dynamics run: cmake -S . -B ./build $CMAKE_CCACHE_LAUNCHER -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON