From cead5cc75d5dac043af0db2d92af6edf894e02e7 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 17 Nov 2025 18:42:22 +0500 Subject: [PATCH] ci - add swig build to fix failing stub test Older swig versions have some redundant symbols, using the one we use in other build scripts. --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5838f1c67..a969192d5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: libboost-regex-dev \ libboost-system-dev \ libboost-thread-dev \ - swig libpcre3-dev libxml2-dev \ + libpcre3-dev libxml2-dev \ libtbb-dev nlohmann-json3-dev \ libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \ libhdf5-dev libcgal-dev libeigen3-dev @@ -115,6 +115,23 @@ jobs: -DCMAKE_CXX_FLAGS_INIT="-fPIC" sudo make -j$(nproc) install + # Ubuntu has `swig` package, but we build it to match the version we use in the main build. + # To avoid failing tests when checking stub generation. + - name: build swig + run: | + # Remove default swig to avoid conflicts. + sudo apt remove --purge swig swig4.0 + sudo apt-get install -y libpcre2-dev bison + git clone https://github.com/swig/swig + cd swig + git checkout v4.1.0 + mkdir build && cd build + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + sudo make -j$(nproc) install + - name: Build ifcopenshell run: | echo $Python3_ROOT_DIR