diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 7ef28d2a76..c12b47cabe 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -20,10 +20,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] - config: [Debug, Release] include: - os: ubuntu-latest + config: Debug + integration_tests_flag: &integration_tests_off '' + name: Linux + - os: ubuntu-latest + config: Release + integration_tests_flag: &integration_tests_on '-DWMTK_BUILD_INTEGRATION_TESTS=ON' name: Linux steps: - name: Checkout repository @@ -54,14 +58,10 @@ jobs: run: | mkdir -p build cd build - WMTK_INTEGRATION_TESTS_FLAG="" - if [ "${{ matrix.config }}" = "Release" ]; then - WMTK_INTEGRATION_TESTS_FLAG="-DWMTK_BUILD_INTEGRATION_TESTS=ON" - fi cmake .. \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ - ${WMTK_INTEGRATION_TESTS_FLAG} + ${{ matrix.integration_tests_flag }} - name: Build run: cd build; make -j2; ccache --show-stats @@ -79,8 +79,19 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, macos-14] - config: [Debug, Release] + include: + - os: macos-latest + config: Debug + integration_tests_flag: *integration_tests_off + - os: macos-latest + config: Release + integration_tests_flag: *integration_tests_on + - os: macos-14 + config: Debug + integration_tests_flag: *integration_tests_off + - os: macos-14 + config: Release + integration_tests_flag: *integration_tests_on steps: - name: Checkout repository @@ -110,13 +121,10 @@ jobs: run: | mkdir -p build cd build - WMTK_INTEGRATION_TESTS_FLAG="" - if [ "${{ matrix.config }}" = "Release" ]; then - WMTK_INTEGRATION_TESTS_FLAG="-DWMTK_BUILD_INTEGRATION_TESTS=ON" - fi cmake .. \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=${{ matrix.config }} + -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ + ${{ matrix.integration_tests_flag }} - name: Build run: cd build; make -j2; ccache --show-stats @@ -129,14 +137,34 @@ jobs: #################### Windows: - name: Windows (${{ matrix.config }}) - runs-on: windows-2022 + name: ${{ matrix.name }} (${{ matrix.config }}) + runs-on: ${{ matrix.os }} env: SCCACHE_IDLE_TIMEOUT: "12000" strategy: fail-fast: false matrix: - config: [Debug, Release] + include: + - os: windows-2022 + name: Windows 2022 + config: Debug + vs_path: &vs_path_2022 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat' + integration_tests_flag: *integration_tests_off + - os: windows-2022 + name: Windows 2022 + config: Release + vs_path: *vs_path_2022 + integration_tests_flag: *integration_tests_on + - os: windows-2025-vs2026 + name: Windows 2025 (VS 2026) + config: Debug + vs_path: &vs_path_2026 'C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat' + integration_tests_flag: *integration_tests_off + - os: windows-2025-vs2026 + name: Windows 2025 (VS 2026) + config: Release + vs_path: *vs_path_2026 + integration_tests_flag: *integration_tests_on steps: - name: Checkout repository @@ -172,22 +200,26 @@ jobs: - name: Configure shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 - set WMTK_INTEGRATION_TESTS_FLAG= - if "${{ matrix.config }}"=="Release" set WMTK_INTEGRATION_TESTS_FLAG=-DWMTK_BUILD_INTEGRATION_TESTS=ON + echo Runner OS: ${{ matrix.os }} + echo Build Config: ${{ matrix.config }} + echo VS Dev Cmd: ${{ matrix.vs_path }} + call "${{ matrix.vs_path }}" -arch=x64 cmake -G Ninja ^ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^ -DCMAKE_POLICY_DEFAULT_CMP0141=NEW ^ -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded ^ -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^ - %WMTK_INTEGRATION_TESTS_FLAG% ^ + ${{ matrix.integration_tests_flag }} ^ -B build ^ -S . - name: Build shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 + echo Runner OS: ${{ matrix.os }} + echo Build Config: ${{ matrix.config }} + echo VS Dev Cmd: ${{ matrix.vs_path }} + call "${{ matrix.vs_path }}" -arch=x64 cmake --build build -j2 && sccache --show-stats - name: Tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 12d7418cf3..f1ed632462 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,16 @@ if(WMTK_WITH_CCACHE AND CCACHE_PROGRAM) endforeach() endif() +################################################################################ +# CMake Policies +################################################################################ + +cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted. +cmake_policy(SET CMP0076 NEW) # target_sources() command converts relative paths to absolute. +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24") + cmake_policy(SET CMP0135 NEW) # Set the timestamps of all extracted contents to the time of the extraction. +endif() + # ############################################################################### project(WildMeshingToolkit DESCRIPTION "A mesh optimization toolkit") diff --git a/cmake/recipes/delaunay_psm.cmake b/cmake/recipes/delaunay_psm.cmake index 53799c10db..273f0952ac 100644 --- a/cmake/recipes/delaunay_psm.cmake +++ b/cmake/recipes/delaunay_psm.cmake @@ -11,7 +11,7 @@ include(FetchContent) FetchContent_Declare( delauanay_psm GIT_REPOSITORY https://github.com/wildmeshing/Delaunay_psm - GIT_TAG 80242c22dc09ee215bc7037e561af0c4779e6cc7 + GIT_TAG 85225e697ce496e744589b1576718754499e03a4 ) FetchContent_MakeAvailable(delauanay_psm) diff --git a/components/tetwild/wmtk/components/tetwild/tetwild.cpp b/components/tetwild/wmtk/components/tetwild/tetwild.cpp index 5e30ea56ad..772d24adac 100644 --- a/components/tetwild/wmtk/components/tetwild/tetwild.cpp +++ b/components/tetwild/wmtk/components/tetwild/tetwild.cpp @@ -440,7 +440,7 @@ TetWildMesh::ExportStruct tetwild_with_export(nlohmann::json json_params) if (json_params["DEBUG_hausdorff"]) { const int n_samples = 10000; Eigen::MatrixXd B; - Eigen::MatrixXi FI; + Eigen::VectorX FI; // must be int64 for new MSVC compiler Eigen::MatrixXd X; igl::random_points_on_mesh(n_samples, V, F, B, FI, X);