From 89ea771570555d6f59a1acbadd09415ccfff2c96 Mon Sep 17 00:00:00 2001 From: EulalieCoevoet Date: Tue, 6 May 2025 17:12:38 +0200 Subject: [PATCH 01/10] changes pybind11 version to 2.12.0 for all OS (#67) --- docker/sofabuilder_ubuntu/Dockerfile | 2 +- setup/setup-windows_2.bat | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/sofabuilder_ubuntu/Dockerfile b/docker/sofabuilder_ubuntu/Dockerfile index 42cd2cc..2907471 100644 --- a/docker/sofabuilder_ubuntu/Dockerfile +++ b/docker/sofabuilder_ubuntu/Dockerfile @@ -67,7 +67,7 @@ RUN apt-get install -y \ ENV VM_BUILDS_IMGUI="true" # Install pip, numpy, scipy, pybind11 -ARG PYBIND11_VERSION=2.11.1 +ARG PYBIND11_VERSION=2.12.0 RUN curl -L https://bootstrap.pypa.io/pip/2.7/get-pip.py --output /tmp/get-pip2.py \ && python2.7 /tmp/get-pip2.py \ && python2.7 -m pip install --upgrade "pip == 20.3.4" \ diff --git a/setup/setup-windows_2.bat b/setup/setup-windows_2.bat index 205f2a4..fa3ae7a 100755 --- a/setup/setup-windows_2.bat +++ b/setup/setup-windows_2.bat @@ -45,11 +45,11 @@ pathed /MACHINE /REMOVE C:\Python311\ pathed /MACHINE /REMOVE C:\Python312\Scripts\ pathed /MACHINE /REMOVE C:\Python312\ C:\Python310\python.exe -m pip install --upgrade pip -C:\Python310\python.exe -m pip install numpy scipy pybind11==2.9.1 matplotlib mypy pybind11-stubgen +C:\Python310\python.exe -m pip install numpy scipy pybind11==2.12.0 matplotlib mypy pybind11-stubgen C:\Python311\python.exe -m pip install --upgrade pip -C:\Python311\python.exe -m pip install numpy scipy pybind11==2.9.1 matplotlib mypy pybind11-stubgen +C:\Python311\python.exe -m pip install numpy scipy pybind11==2.12.0 matplotlib mypy pybind11-stubgen C:\Python312\python.exe -m pip install --upgrade pip -C:\Python312\python.exe -m pip install numpy scipy pybind11==2.9.1 matplotlib mypy pybind11-stubgen +C:\Python312\python.exe -m pip install numpy scipy pybind11==2.12.0 matplotlib mypy pybind11-stubgen REM Install plugins dependencies From 14b22adbb9152622f36b20bb330140765429b157 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Mon, 26 May 2025 16:50:42 +0200 Subject: [PATCH 02/10] Add option to limit number of job pool for CGAL --- scripts/configure.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/configure.sh b/scripts/configure.sh index b295430..5105611 100644 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -354,6 +354,8 @@ elif in-array "build-scope-full" "$BUILD_OPTIONS"; then if [[ "$VM_HAS_CGAL" == "false" ]]; then add-cmake-option "-DPLUGIN_CGALPLUGIN=OFF -DSOFA_FETCH_CGALPLUGIN=OFF" + elif vm-is-ubuntu || vm-is-centos; then + add-cmake-option "-DSOFA_CGALPLUGIN_LIMIT_NINJA_JOB_POOL=ON" fi if [[ "$VM_HAS_ASSIMP" == "false" ]]; then From 271a4d598a9febb602596f99271d72c1627fec9f Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Tue, 27 May 2025 11:12:57 +0200 Subject: [PATCH 03/10] Apply changes introduced by modernization of SofaCUDA cmake --- scripts/configure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index b295430..116ec9d 100644 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -367,9 +367,9 @@ elif in-array "build-scope-full" "$BUILD_OPTIONS"; then if [[ "$VM_HAS_CUDA" == "true" ]]; then add-cmake-option "-DSOFACUDA_DOUBLE=ON" if in-array "build-release-package" "$BUILD_OPTIONS"; then - add-cmake-option "-DCUDA_ARCH_LIST=6.0;6.1;7.0;7.5;8.0;8.6;8.9" + add-cmake-option "-DCMAKE_CUDA_ARCHITECTURES=60;61;70;75;80;86;89" else - add-cmake-option "-DCUDA_ARCH_LIST=6.0;8.9" + add-cmake-option "-DCMAKE_CUDA_ARCHITECTURES=60;89" fi add-cmake-option "-DPLUGIN_VOLUMETRICRENDERING_CUDA=ON" add-cmake-option "-DPLUGIN_SOFADISTANCEGRID_CUDA=ON" From 030a1b0acdadff81d3d03196a9b965d9672e1997 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Tue, 27 May 2025 14:47:06 +0200 Subject: [PATCH 04/10] Exit buildi f ci-depend-on cannot be automatically merged and explain it in message --- scripts/pre-builds.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/pre-builds.sh b/scripts/pre-builds.sh index c1c6878..0d7aa6f 100644 --- a/scripts/pre-builds.sh +++ b/scripts/pre-builds.sh @@ -54,6 +54,7 @@ if [[ "$DASH_COMMIT_BRANCH" == *"/PR-"* ]]; then export GITHUB_CONTEXT="[ci-depends-on]" # edit pr_has_dependencies="false" pr_is_mergeable="true" + pr_is_broken="false" github_comment_header='**[ci-depends-on]** detected during [build #'$BUILD_NUMBER']('$BUILD_URL').' github_comment_body='\n\n To unlock the merge button, you must' @@ -86,7 +87,10 @@ if [[ "$DASH_COMMIT_BRANCH" == *"/PR-"* ]]; then flag_repository="-D${fixed_name}_GIT_REPOSITORY='$dependency_project_url'" flag_tag="-D${fixed_name}_GIT_TAG='$dependency_merge_commit'" - if [[ "$dependency_is_merged" != [Tt]"rue" ]]; then # this dependency is a merged PR + if [[ "$dependency_merge_commit" == "null" ]]; then + github_comment_body=$github_comment_body'\n- **Please fix merging issues of '$dependency_url'. This build is aborted until these issues are fixed.** + pr_is_broken="true" + elif [[ "$dependency_is_merged" != [Tt]"rue" ]]; then # this dependency is a merged PR github_comment_body=$github_comment_body'\n- **Merge or close '$dependency_url'**\n_For this build, the following CMake flags will be set_\n'${flag_repository}'\n'${flag_tag} pr_is_mergeable="false" fi From cd11ccae0c94dc624e3fd9483a9b6bebc6c1f1d0 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Tue, 27 May 2025 14:47:37 +0200 Subject: [PATCH 05/10] Exit buildi f ci-depend-on cannot be automatically merged and explain it in message --- scripts/pre-builds.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/pre-builds.sh b/scripts/pre-builds.sh index 0d7aa6f..dfe8eb0 100644 --- a/scripts/pre-builds.sh +++ b/scripts/pre-builds.sh @@ -88,7 +88,7 @@ if [[ "$DASH_COMMIT_BRANCH" == *"/PR-"* ]]; then flag_tag="-D${fixed_name}_GIT_TAG='$dependency_merge_commit'" if [[ "$dependency_merge_commit" == "null" ]]; then - github_comment_body=$github_comment_body'\n- **Please fix merging issues of '$dependency_url'. This build is aborted until these issues are fixed.** + github_comment_body=$github_comment_body'\n- **Please fix merging issues of '$dependency_url'. This build is aborted until these issues are fixed.**' pr_is_broken="true" elif [[ "$dependency_is_merged" != [Tt]"rue" ]]; then # this dependency is a merged PR github_comment_body=$github_comment_body'\n- **Merge or close '$dependency_url'**\n_For this build, the following CMake flags will be set_\n'${flag_repository}'\n'${flag_tag} @@ -96,6 +96,14 @@ if [[ "$DASH_COMMIT_BRANCH" == *"/PR-"* ]]; then fi done < <( echo "$pr_description" | grep '\[ci-depends-on' ) + if [[ "$pr_is_broken" == "true" ]]; the + github-notify "success" "Dependencies are OK." + github-post-pr-comment "$pr_id" "$github_comment_header $github_comment_body" + echo "WARNING: Pr dependencies cannot be automatically merged, this builld is skipped." + echo "true" > "$output_dir/skip-this-build" # will be searched by Groovy script on launcher + exit 0 + fi + if [[ "$pr_has_dependencies" == "true" ]]; then if [[ "$pr_is_mergeable" == "true" ]]; then # PR has dependencies that are all closed/merged and ExternalProject pointers are up-to-date From c7a26a3aa059607eb47ac985ec85d08c77ab3a57 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Wed, 28 May 2025 16:16:49 +0200 Subject: [PATCH 06/10] Fix typo in script --- scripts/pre-builds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pre-builds.sh b/scripts/pre-builds.sh index dfe8eb0..3c882f1 100644 --- a/scripts/pre-builds.sh +++ b/scripts/pre-builds.sh @@ -96,7 +96,7 @@ if [[ "$DASH_COMMIT_BRANCH" == *"/PR-"* ]]; then fi done < <( echo "$pr_description" | grep '\[ci-depends-on' ) - if [[ "$pr_is_broken" == "true" ]]; the + if [[ "$pr_is_broken" == "true" ]]; then github-notify "success" "Dependencies are OK." github-post-pr-comment "$pr_id" "$github_comment_header $github_comment_body" echo "WARNING: Pr dependencies cannot be automatically merged, this builld is skipped." From dc028455a2fb845ab3c256b548a6ba503b6e9d31 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Wed, 4 Jun 2025 16:59:13 +0200 Subject: [PATCH 07/10] Filter CUDA extension --- scripts/configure.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index cbc5582..f274b54 100644 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -376,7 +376,9 @@ elif in-array "build-scope-full" "$BUILD_OPTIONS"; then add-cmake-option "-DPLUGIN_VOLUMETRICRENDERING_CUDA=ON" add-cmake-option "-DPLUGIN_SOFADISTANCEGRID_CUDA=ON" else - add-cmake-option "-DPLUGIN_SOFACUDA=OFF" + add-cmake-option "-DPLUGIN_SOFACUDA=OFF" + #Deactivate all CUDA modules based on naming ocnvention 'XXX.CUDA" that creates a CMake flag "PLUGIN_XXX_CUDA" thus the double grep + add-cmake-option "$(cat $SRC_DIR/CMakePresets.json | grep PLUGIN_ | grep _CUDA | awk -F'"' '{ print "-D"$2"=OFF" }' | sort | uniq)" fi if [[ "$VM_BUILDS_IMGUI" == "false" ]]; then From 445e7397dce308a4df18acd56e128bf916f29f3a Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Thu, 5 Jun 2025 14:13:57 +0200 Subject: [PATCH 08/10] Update scripts/configure.sh Co-authored-by: Alex Bilger --- scripts/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index f274b54..31803bc 100644 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -377,7 +377,7 @@ elif in-array "build-scope-full" "$BUILD_OPTIONS"; then add-cmake-option "-DPLUGIN_SOFADISTANCEGRID_CUDA=ON" else add-cmake-option "-DPLUGIN_SOFACUDA=OFF" - #Deactivate all CUDA modules based on naming ocnvention 'XXX.CUDA" that creates a CMake flag "PLUGIN_XXX_CUDA" thus the double grep + #Deactivate all CUDA modules based on naming convention 'XXX.CUDA" that creates a CMake flag "PLUGIN_XXX_CUDA" thus the double grep add-cmake-option "$(cat $SRC_DIR/CMakePresets.json | grep PLUGIN_ | grep _CUDA | awk -F'"' '{ print "-D"$2"=OFF" }' | sort | uniq)" fi From 230b07fe1bedc4bb393d2a3db22c3386bdb291f1 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Fri, 4 Jul 2025 17:40:17 +0200 Subject: [PATCH 09/10] Activate imgui on fedora --- docker/sofabuilder_fedora/Dockerfile | 1 - scripts/configure.sh | 8 -------- 2 files changed, 9 deletions(-) diff --git a/docker/sofabuilder_fedora/Dockerfile b/docker/sofabuilder_fedora/Dockerfile index 9a9e9a6..e03ef6a 100644 --- a/docker/sofabuilder_fedora/Dockerfile +++ b/docker/sofabuilder_fedora/Dockerfile @@ -58,7 +58,6 @@ RUN yum install -y -q \ xorg-x11-server-devel\ gtk3-devel -ENV VM_BUILDS_IMGUI="false" # Install pip, numpy, scipy, pybind11 ARG PYBIND11_VERSION=2.11.1 diff --git a/scripts/configure.sh b/scripts/configure.sh index 31803bc..f3343f2 100644 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -341,10 +341,6 @@ elif in-array "build-scope-standard" "$BUILD_OPTIONS"; then PRESETS="standard-dev" echo "Configuring with the default plugins/modules (scope = standard-dev)" - if [[ "$VM_BUILDS_IMGUI" == "false" ]]; then - add-cmake-option "-DPLUGIN_SOFAIMGUI=OFF" - fi - # Build with as much plugins/modules as possible (scope = full) elif in-array "build-scope-full" "$BUILD_OPTIONS"; then @@ -381,10 +377,6 @@ elif in-array "build-scope-full" "$BUILD_OPTIONS"; then add-cmake-option "$(cat $SRC_DIR/CMakePresets.json | grep PLUGIN_ | grep _CUDA | awk -F'"' '{ print "-D"$2"=OFF" }' | sort | uniq)" fi - if [[ "$VM_BUILDS_IMGUI" == "false" ]]; then - add-cmake-option "-DPLUGIN_SOFAIMGUI=OFF" - fi - fi add-cmake-option "--preset=$PRESETS" From ebcf182c13879299bfd70beb9a8550fc3ecd0bb6 Mon Sep 17 00:00:00 2001 From: Paul Baksic Date: Tue, 15 Jul 2025 14:13:35 +0200 Subject: [PATCH 10/10] Update numpy version for python over 3.10 --- docker/sofabuilder_fedora/Dockerfile | 4 ++-- docker/sofabuilder_ubuntu/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/sofabuilder_fedora/Dockerfile b/docker/sofabuilder_fedora/Dockerfile index e03ef6a..d5e8916 100644 --- a/docker/sofabuilder_fedora/Dockerfile +++ b/docker/sofabuilder_fedora/Dockerfile @@ -70,10 +70,10 @@ ARG PYBIND11_VERSION=2.11.1 RUN python3.10 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ && python3.11 /tmp/get-pip3.py \ - && python3.11 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION + && python3.11 -m pip install numpy==2.2.2 scipy matplotlib pybind11==$PYBIND11_VERSION RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ && python3.12 /tmp/get-pip3.py \ - && python3.12 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION + && python3.12 -m pip install numpy==2.2.2 scipy matplotlib pybind11==$PYBIND11_VERSION ENV PYTHONPATH="" ENV VM_HAS_ASSIMP="true" ENV VM_HAS_OPENCASCADE="false" diff --git a/docker/sofabuilder_ubuntu/Dockerfile b/docker/sofabuilder_ubuntu/Dockerfile index 2907471..a2f02ee 100644 --- a/docker/sofabuilder_ubuntu/Dockerfile +++ b/docker/sofabuilder_ubuntu/Dockerfile @@ -79,11 +79,11 @@ RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ && python3.11 /tmp/get-pip3.py \ && python3.11 -m pip install --upgrade pip \ - && python3.11 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen + && python3.11 -m pip install numpy==2.2.2 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ && python3.12 /tmp/get-pip3.py \ && python3.12 -m pip install --upgrade pip \ - && python3.12 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen + && python3.12 -m pip install numpy==2.2.2 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen ENV VM_HAS_ASSIMP="true" ENV VM_HAS_OPENCASCADE="true"