From 087a77ab553945b24dd09d1f07123580b9aefb00 Mon Sep 17 00:00:00 2001 From: lorenz Date: Fri, 19 Jul 2024 11:40:37 +0200 Subject: [PATCH] Occt7.8.1, vtk9.3.0 (#89) * simplified run dependencies * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.36.2, and conda-forge-pinning 2024.07.10.17.49.47 * +=1 * use occt7.8.1 branch * disable netgen * simplifications * Rebuild for occt 7.8.1 * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.36.2, and conda-forge-pinning 2024.07.14.16.05.21 * enable netgen * remove unused med cmake specification * vtk-base, debug builds * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.37.0, and conda-forge-pinning 2024.07.17.12.11.55 * depend on package vtk, otherwise it's not listed in ci_support files * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.37.1, and conda-forge-pinning 2024.07.17.19.24.35 * use release * update sha256sum * remove unnecessary dependencies * update sha256 sum * update path to LICENSE.txt * Update sha256sum * update test commands * cross compile for linux_aarch64 and ppc64 * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.37.1, and conda-forge-pinning 2024.07.18.19.29.01 * further simplifications * ninja -C build * changed location of test-files * Update run_test.bat --------- Co-authored-by: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> --- .azure-pipelines/azure-pipelines-linux.yml | 4 +-- .ci_support/linux_64_.yaml | 4 +-- .ci_support/linux_aarch64_.yaml | 6 ++--- .ci_support/linux_ppc64le_.yaml | 6 ++--- .ci_support/migrations/occt781.yaml | 8 ++++++ .ci_support/osx_64_.yaml | 4 +-- .ci_support/osx_arm64_.yaml | 4 +-- .ci_support/win_64_.yaml | 4 +-- .scripts/build_steps.sh | 10 ++++++-- conda-forge.yml | 2 ++ recipe/bld.bat | 30 ++++++++-------------- recipe/build.sh | 19 +++----------- recipe/meta.yaml | 30 ++++++++-------------- recipe/run_test.bat | 28 ++++++++------------ recipe/run_test.sh | 22 +++++----------- 15 files changed, 72 insertions(+), 109 deletions(-) create mode 100644 .ci_support/migrations/occt781.yaml diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index bdf1723..aef462c 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -15,11 +15,11 @@ jobs: linux_aarch64_: CONFIG: linux_aarch64_ UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_: CONFIG: linux_ppc64le_ UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-ppc64le + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index fb8d9e9..99175ab 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -21,7 +21,7 @@ docker_image: libboost_devel: - '1.84' occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -34,5 +34,3 @@ zip_keys: - cxx_compiler_version - - c_stdlib_version - cdt_name -zlib: -- '1' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 04d3217..7c8be00 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -21,11 +21,11 @@ cxx_compiler: cxx_compiler_version: - '12' docker_image: -- quay.io/condaforge/linux-anvil-aarch64 +- quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_devel: - '1.84' occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -38,5 +38,3 @@ zip_keys: - cxx_compiler_version - - c_stdlib_version - cdt_name -zlib: -- '1' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 644379a..cbf2eb5 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -17,11 +17,11 @@ cxx_compiler: cxx_compiler_version: - '12' docker_image: -- quay.io/condaforge/linux-anvil-ppc64le +- quay.io/condaforge/linux-anvil-cos7-x86_64 libboost_devel: - '1.84' occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -34,5 +34,3 @@ zip_keys: - cxx_compiler_version - - c_stdlib_version - cdt_name -zlib: -- '1' diff --git a/.ci_support/migrations/occt781.yaml b/.ci_support/migrations/occt781.yaml new file mode 100644 index 0000000..8286567 --- /dev/null +++ b/.ci_support/migrations/occt781.yaml @@ -0,0 +1,8 @@ +__migrator: + build_number: 1 + commit_message: Rebuild for occt 7.8.1 + kind: version + migration_number: 1 +migrator_ts: 1714946042.220433 +occt: +- 7.8.1 diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 4e36d2d..9ccaeb4 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -23,7 +23,7 @@ libboost_devel: macos_machine: - x86_64-apple-darwin13.4.0 occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -34,5 +34,3 @@ vtk: zip_keys: - - c_compiler_version - cxx_compiler_version -zlib: -- '1' diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 6434a74..a1afe42 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -23,7 +23,7 @@ libboost_devel: macos_machine: - arm64-apple-darwin20.0.0 occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -34,5 +34,3 @@ vtk: zip_keys: - - c_compiler_version - cxx_compiler_version -zlib: -- '1' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 24cf874..440cc68 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -11,7 +11,7 @@ cxx_compiler: libboost_devel: - '1.84' occt: -- 7.7.2 +- 7.8.1 pin_run_as_build: occt: max_pin: x.x @@ -19,5 +19,3 @@ target_platform: - win-64 vtk: - 9.3.0 -zlib: -- '1' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index add9a62..0467124 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -43,6 +43,12 @@ setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup +( +# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm +# are drastically slowed down when the number of file descriptors is very high. +# This can be visible during a `yum install` step of a feedstock build. +# => Set a lower limit in a subshell for the `yum install`s only. +ulimit -n 1024 # Install the yum requirements defined canonically in the # "recipe/yum_requirements.txt" file. After updating that file, @@ -51,7 +57,8 @@ source run_conda_forge_build_setup /usr/bin/sudo -n yum install -y mesa-libGL-devel -# make the build number clobber + +)# make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then @@ -80,7 +87,6 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 diff --git a/conda-forge.yml b/conda-forge.yml index e21ddb8..02a8865 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,5 +1,7 @@ build_platform: osx_arm64: osx_64 + linux_aarch64: linux_64 + linux_ppc64le: linux_64 conda_build: pkg_format: '2' conda_forge_output_validation: true diff --git a/recipe/bld.bat b/recipe/bld.bat index 35301cb..beb581e 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,23 +1,15 @@ -git clone https://github.com/realthunder/SMESH.git -cd SMESH -git checkout patch-4 -git submodule update --init --recursive -python prepare.py - -mkdir build -cd build - cmake -G "Ninja" ^ - -D CMAKE_BUILD_TYPE=Release ^ - -D CMAKE_INSTALL_PREFIX:FILEPATH="%LIBRARY_PREFIX%" ^ - -D CMAKE_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ - -D CMAKE_SYSTEM_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ - -D PTHREAD_INCLUDE_DIRS:FILEPATH="%LIBRARY_PREFIX%/include" ^ - -D PTHREAD_LIB_DIRS:FILEPATH="%LIBRARY_PREFIX%/lib" ^ - -D Boost_NO_BOOST_CMAKE:BOOL=ON ^ - -D ENABLE_LIB_NAMING:BOOL=OFF ^ - .. + -B build -S . ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_INSTALL_PREFIX:FILEPATH="%LIBRARY_PREFIX%" ^ + -D CMAKE_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ + -D CMAKE_SYSTEM_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ + -D PTHREAD_INCLUDE_DIRS:FILEPATH="%LIBRARY_PREFIX%/include" ^ + -D PTHREAD_LIB_DIRS:FILEPATH="%LIBRARY_PREFIX%/lib" ^ + -D ENABLE_NETGEN:BOOL=ON ^ + -D Boost_NO_BOOST_CMAKE:BOOL=ON ^ + -D ENABLE_LIB_NAMING:BOOL=OFF if errorlevel 1 exit 1 -ninja install +ninja -C build install if errorlevel 1 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index 71c2f8e..eba71fe 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,20 +1,9 @@ -git clone https://github.com/realthunder/SMESH.git -cd SMESH -git checkout patch-4 -git submodule update --init --recursive -python prepare.py - -mkdir build -cd build - cmake -G "Ninja" \ - -D CMAKE_BUILD_TYPE:STRING="Release" \ + -B build -S . \ + -D CMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \ -D CMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \ -D CMAKE_PREFIX_PATH:FILEPATH=$PREFIX \ -D Boost_NO_BOOST_CMAKE:BOOL=ON \ - -D ENABLE_MED:BOOL=OFF \ - -D ENABLE_NETGEN:BOOL=ON \ - -D CMAKE_CXX_STANDARD=14 \ - .. + -D ENABLE_NETGEN:BOOL=ON -ninja install +ninja -C build install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3f32d8a..8b02c56 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,21 +1,19 @@ {% set name = "smesh" %} {% set version = "9.9.0.0" %} -{% set sha256 = "bd5bddd509e5120bdd56178c37471984062e8abd36465389d64fb6e1b811a1d4" %} +{% set build_number = 12 %} +{% set build_number = build_number + 500 %} # [FEATURE_DEBUG] package: name: {{ name }} version: {{ version }} -# source: - # fn: {{ name }}_{{ version }}.tar.gz - # url: https://github.com/LaughlinResearch/SMESH/archive/v{{ version }}.tar.gz - # sha256: {{ sha256 }} - # patches: - # - osx-vtk.patch # [osx] - # - linker.patch # [win] +source: + fn: {{ name }}_{{ version }}.tar.gz + url: https://github.com/looooo/SMESH/releases/download/occt7.8.1/SMESH_occt7.8.1.tar.gz + sha256: 876390cf80a3918199949a574b5e091dd705e3e425d2323903989639450bb07a build: - number: 11 + number: {{ build_number }} run_exports: - {{ pin_subpackage('smesh', max_pin='x.x.x') }} @@ -29,26 +27,20 @@ requirements: - {{ cdt('libxext-devel') }} # [linux] - ninja - cmake - - git - - python-patch - - python host: - vtk - - libboost-devel - occt - - zlib + - libboost-devel + - libzlib - pthreads-win32 # [win] # - libmed run: - - vtk - - {{ pin_compatible('occt', max_pin='x.x.x') }} - - zlib - pthreads-win32 # [win] # - libmed test: source_files: - - SMESH/test + - test requires: - {{ compiler('cxx') }} - {{ compiler('c') }} @@ -69,7 +61,7 @@ about: home: https://github.com/LaughlinResearch/SMESH license: LGPL-2.1-or-later license_family: LGPL - license_file: SMESH/LICENSE.txt + license_file: LICENSE.txt summary: A complete MESH framework based on the OCCT library. description: Standalone version of the meshing library from the Salome Platform. diff --git a/recipe/run_test.bat b/recipe/run_test.bat index 0146141..8f44621 100644 --- a/recipe/run_test.bat +++ b/recipe/run_test.bat @@ -1,22 +1,16 @@ -cd SMESH/test -mkdir build -cd build - cmake -G "Ninja" ^ - -D CMAKE_BUILD_TYPE=Release ^ - -D CMAKE_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ - -D CMAKE_SYSTEM_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ - -D PTHREAD_INCLUDE_DIRS:FILEPATH="%LIBRARY_PREFIX%/include" ^ - -D PTHREAD_LIB_DIRS:FILEPATH="%LIBRARY_PREFIX%/lib" ^ - .. + -B test/build -S test/. ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ + -D CMAKE_SYSTEM_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^ + -D PTHREAD_INCLUDE_DIRS:FILEPATH="%LIBRARY_PREFIX%/include" ^ + -D PTHREAD_LIB_DIRS:FILEPATH="%LIBRARY_PREFIX%/lib" ^ if errorlevel 1 exit 1 -ninja install +ninja -C test/build install if errorlevel 1 exit 1 -cd .. -cd tests -test_Catch.exe -test_StdMeshers.exe -test_NETGENPlugin.exe -test_MEFISTO2.exe +test/tests/test_Catch.exe +test/tests/test_StdMeshers.exe +test/tests/test_NETGENPlugin.exe +test/tests/test_MEFISTO2.exe diff --git a/recipe/run_test.sh b/recipe/run_test.sh index 0758b03..f094adc 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -1,7 +1,3 @@ -cd SMESH/test -mkdir build -cd build - if [[ $target_platform == linux-aarch64 ]]; then echo "tests are not yet working" exit 0 @@ -18,19 +14,15 @@ if [[ ${HOST} =~ .*linux.* ]]; then fi cmake -G "Ninja" \ + -B test/build -S test/. \ -D CMAKE_BUILD_TYPE:STRING="Release" \ ${CMAKE_PLATFORM_FLAGS[@]} \ -D CMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \ - -D CMAKE_PREFIX_PATH:FILEPATH=$PREFIX \ - .. - -ninja install - -cd .. -cd tests + -D CMAKE_PREFIX_PATH:FILEPATH=$PREFIX +ninja -C test/build install -./test_Catch -./test_StdMeshers -./test_NETGENPlugin -./test_MEFISTO2 +./test/tests/test_Catch +./test/tests/test_StdMeshers +./test/tests/test_NETGENPlugin +./test/tests/test_MEFISTO2