diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 327b8cd..979b611 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -23,7 +23,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, macOS-13, windows-2019] + os: [ubuntu-22.04, macOS-13, macOS-14, windows-2019] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] config: [Debug, Release] include: - os: ubuntu-22.04 @@ -31,7 +32,10 @@ jobs: - os: windows-2019 name: Windows - os: macos-13 - name: macOS + name: macOS-13 + - os: macos-14 + name: macOS-14 ARM64 + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -47,7 +51,7 @@ jobs: uses: conda-incubator/setup-miniconda@v3 with: channels: conda-forge - python-version: 3.7 + python-version: ${{ matrix.python-version }} channel-priority: true activate-environment: test-env @@ -67,18 +71,18 @@ jobs: - name: Build (Debug) if: matrix.config == 'Debug' - run: | - python setup.py build --debug install + run: python -m pip install -v --config-settings="--build-option=build_ext" --config-settings="--build-option=--debug" . - name: Build (Release) if: matrix.config == 'Release' - run: python setup.py build install + run: python -m pip install -v . - name: Fast Tests run: | python test/tri_test.py python test/small_tet_test.py + - name: Slow Tests if: matrix.config == 'Release' run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index b310010..8e13c5f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,16 +36,16 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Setup dependencies include(WildMeshingDependencies) -# triwild -wildmeshing_download_triwild() -add_subdirectory(${THIRD_PARTY_DIR}/triwild) - - # tetwild wildmeshing_download_tetwild() add_subdirectory(${THIRD_PARTY_DIR}/tetwild) +# triwild +wildmeshing_download_triwild() +add_subdirectory(${THIRD_PARTY_DIR}/triwild) + + # pybind11 wildmeshing_download_pybind11() add_subdirectory(${THIRD_PARTY_DIR}/pybind11) diff --git a/cmake/WildMeshingDownloadExternal.cmake b/cmake/WildMeshingDownloadExternal.cmake index 7c8ff11..3a7251f 100644 --- a/cmake/WildMeshingDownloadExternal.cmake +++ b/cmake/WildMeshingDownloadExternal.cmake @@ -25,15 +25,15 @@ endfunction() function(wildmeshing_download_triwild) wildmeshing_download_project(triwild - GIT_REPOSITORY https://github.com/wildmeshing/TriWild - GIT_TAG ac7977c1da9fb25de8c0f7c666055e6d09034686 + GIT_REPOSITORY https://github.com/MariusCausemann/TriWild + GIT_TAG ec752debe750628ad8147df99e11c766e0794efc ) endfunction() function(wildmeshing_download_tetwild) wildmeshing_download_project(tetwild - GIT_REPOSITORY https://github.com/wildmeshing/fTetWild - GIT_TAG f471f09dd26006745387dd61694762f861c787b9 + GIT_REPOSITORY https://github.com/MariusCausemann/fTetWild.git + GIT_TAG 7f2e76be786cb62540ede53764a14355b5412d79 ) endfunction() diff --git a/setup.py b/setup.py index 4cb4fd8..94760cb 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import os import re import sys +import shlex # import sysconfig import platform import subprocess @@ -38,8 +39,10 @@ def build_extension(self, ext): extdir = os.path.join(os.path.abspath(os.path.dirname( self.get_ext_fullpath(ext.name))), "wildmeshing") - cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, + cmake_args = shlex.split(os.environ.get("CMAKE_ARGS", "")) + cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_EXECUTABLE=' + sys.executable, + '-DTBB_BUILD_TESTS=OFF', '-DTBB_TEST=OFF' ] cfg = 'Debug' if self.debug else 'Release' @@ -49,12 +52,8 @@ def build_extension(self, ext): if platform.system() == "Windows": cmake_args += [ '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] - if os.environ.get('CMAKE_GENERATOR') != "NMake Makefiles": - if sys.maxsize > 2**32: - cmake_args += ['-A', 'x64'] - build_args += ['--', '/m'] else: - build_args += ['--', '-j2'] + build_args += ['--', '-j1'] env = os.environ.copy() env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format( diff --git a/src/tetrahedralize.cpp b/src/tetrahedralize.cpp index ed07934..5ea5c8b 100644 --- a/src/tetrahedralize.cpp +++ b/src/tetrahedralize.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -19,12 +20,11 @@ #include #ifdef FLOAT_TETWILD_USE_TBB -#include +#include #include #endif using namespace floatTetWild; -using namespace Eigen; namespace wildmeshing_binding { @@ -61,7 +61,7 @@ namespace wildmeshing_binding num_threads = std::min(max_threads, num_threads); // params.num_threads = num_threads; std::cout << "TBB threads " << num_threads << std::endl; - tbb::task_scheduler_init scheduler(num_threads, stack_size); + //tbb::task_scheduler_init scheduler(num_threads, stack_size); #endif set_num_threads(num_threads); } @@ -819,4 +819,4 @@ namespace wildmeshing_binding py::arg("coarsen") = true, py::arg("manifold_surface") = false, py::arg("use_input_for_wn") = false, py::arg("correct_surface_orientation") = false, py::arg("all_mesh") = false, py::arg("binary") = true); } #endif -} // namespace wildmeshing_binding \ No newline at end of file +} // namespace wildmeshing_binding diff --git a/wildmeshing/parse_svg b/wildmeshing/parse_svg index b920779..0cb2769 160000 --- a/wildmeshing/parse_svg +++ b/wildmeshing/parse_svg @@ -1 +1 @@ -Subproject commit b920779788948655d2985de19acad5133b5125d8 +Subproject commit 0cb27692f67b855f96c76e41778abdb0a10edd93