From 6dd920b2b2628f88839c8e2449426e7d3309cda8 Mon Sep 17 00:00:00 2001 From: Matteo Salvador <44835004+MatteoSalvador@users.noreply.github.com> Date: Wed, 27 Mar 2024 22:23:05 -0700 Subject: [PATCH] Update tolerances for cep tests and fix continuous integration issues for Ubuntu (#210) --- .github/workflows/test.yml | 62 ------------------- .github/workflows/test_macos12.yml | 33 ++++++++++ .github/workflows/test_ubuntu20.yml | 25 ++++++++ .github/workflows/test_ubuntu22.yml | 38 ++++++++++++ tests/cases/cep/cable_TTP_1d/result_001.vtu | 4 +- tests/cases/cep/cable_TTP_1d/svFSI.xml | 6 +- .../result_BICG_CN_epicardium_BO_001.vtu | 4 +- .../result_CG_RK4_myocardium_BO_001.vtu | 4 +- .../result_GMRES_FE_epicardium_TTP_001.vtu | 4 +- .../result_GMRES_FE_pfib_AP_001.vtu | 4 +- .../svFSI_BICG_CN_epicardium_BO.xml | 4 +- .../svFSI_CG_RK4_myocardium_BO.xml | 4 +- .../svFSI_GMRES_FE_epicardium_TTP.xml | 4 +- .../svFSI_GMRES_FE_pfib_AP.xml | 4 +- tests/cases/cep/purkinje/result_001.vtu | 4 +- tests/cases/cep/purkinje/svFSI.xml | 6 +- tests/cases/cep/spiral_BO_2d/result_001.vtu | 4 +- tests/cases/cep/spiral_BO_2d/svFSI.xml | 6 +- tests/cases/cep/square_AP_2d/result_001.vtu | 4 +- tests/cases/cep/square_AP_2d/svFSI.xml | 6 +- 20 files changed, 132 insertions(+), 98 deletions(-) delete mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/test_macos12.yml create mode 100644 .github/workflows/test_ubuntu20.yml create mode 100644 .github/workflows/test_ubuntu22.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 0cf60125..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Integration -on: [push, pull_request] -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-12] - fail-fast: false - steps: - - uses: actions/checkout@v3 - - name: Install Ubuntu dependencies - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt update - sudo apt install -y build-essential cmake qtbase5-dev libblas-dev liblapack-dev - sudo apt install -y libopenblas-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev - sudo apt install -y libvtk7-dev openmpi-bin libopenmpi-dev - sudo apt install -y lcov - - name: Install MacOS dependencies - if: startsWith(matrix.os, 'macos') - run: | - brew reinstall -v gcc - brew install -v cmake vtk openblas lapack mesa open-mpi qt - brew install lcov - sudo ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs - sudo ln -s /usr/local/opt/qt5/plugins /usr/local/plugins - - name: Build svFSIplus - run: | - mkdir build - cd build - cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. - make -j2 - - name: Install test dependencies - run: | - conda create -n svfsiplus python=3.9 - conda run -n svfsiplus pip install pytest pytest-cov pytest-mock numpy meshio pandas - - name: Run integration tests - run: | - git lfs pull - cd tests - conda run -n svfsiplus pytest -rPv --durations=0 - - name: Run unit tests - run: | - cd build/svFSI-build/Source/svFSI - ctest --verbose - - name: Generate code coverage - if: startsWith(matrix.os, 'ubuntu-22.04') - run: | - cd build/svFSI-build - make coverage - - name: Save coverage report - if: startsWith(matrix.os, 'ubuntu-22.04') - uses: actions/upload-artifact@v3 - with: - name: coverage_report - path: build/svFSI-build/coverage - - name: Upload coverage reports to Codecov - if: startsWith(matrix.os, 'ubuntu-22.04') - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test_macos12.yml b/.github/workflows/test_macos12.yml new file mode 100644 index 00000000..b9819b7e --- /dev/null +++ b/.github/workflows/test_macos12.yml @@ -0,0 +1,33 @@ +name: macOS 12 +on: [push, pull_request] +jobs: + test: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Install MacOS dependencies + run: | + brew reinstall -v gcc + brew install -v cmake vtk openblas lapack mesa open-mpi qt + brew install lcov + sudo ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs + sudo ln -s /usr/local/opt/qt5/plugins /usr/local/plugins + - name: Build svFSIplus + run: | + mkdir build + cd build + cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. + make -j2 + - name: Install test dependencies + run: | + conda create -n svfsiplus python=3.9 + conda run -n svfsiplus pip install pytest pytest-cov pytest-mock numpy meshio pandas + - name: Run integration tests + run: | + git lfs pull + cd tests + conda run -n svfsiplus pytest -rPv --durations=0 + - name: Run unit tests + run: | + cd build/svFSI-build/Source/svFSI + ctest --verbose \ No newline at end of file diff --git a/.github/workflows/test_ubuntu20.yml b/.github/workflows/test_ubuntu20.yml new file mode 100644 index 00000000..df42574e --- /dev/null +++ b/.github/workflows/test_ubuntu20.yml @@ -0,0 +1,25 @@ +name: Ubuntu 20.04 +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-20.04 + container: msalvad/ubuntu20_vtk9:v1 + steps: + - uses: actions/checkout@v3 + - name: Build svFSIplus + run: | + mkdir build + cd build + cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. + make -j2 + cd .. + - name: Run integration tests + run: | + git config --global --add safe.directory /__w/svFSIplus/svFSIplus + git lfs pull + cd tests + conda run -n svfsiplus pytest -rPv --durations=0 + - name: Run unit tests + run: | + cd build/svFSI-build/Source/svFSI + ctest --verbose \ No newline at end of file diff --git a/.github/workflows/test_ubuntu22.yml b/.github/workflows/test_ubuntu22.yml new file mode 100644 index 00000000..86d0a8ed --- /dev/null +++ b/.github/workflows/test_ubuntu22.yml @@ -0,0 +1,38 @@ +name: Ubuntu 22.04 +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-22.04 + container: msalvad/ubuntu22_vtk9:v1 + steps: + - uses: actions/checkout@v3 + - name: Build svFSIplus + run: | + mkdir build + cd build + cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. + make -j2 + cd .. + - name: Run integration tests + run: | + git config --global --add safe.directory /__w/svFSIplus/svFSIplus + git lfs pull + cd tests + conda run -n svfsiplus pytest -rPv --durations=0 + - name: Run unit tests + run: | + cd build/svFSI-build/Source/svFSI + ctest --verbose + - name: Generate code coverage + run: | + cd build/svFSI-build + make coverage + - name: Save coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage_report + path: build/svFSI-build/coverage + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/tests/cases/cep/cable_TTP_1d/result_001.vtu b/tests/cases/cep/cable_TTP_1d/result_001.vtu index a98765d8..e8d9f50c 100644 --- a/tests/cases/cep/cable_TTP_1d/result_001.vtu +++ b/tests/cases/cep/cable_TTP_1d/result_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15a085fafbfa77ab98c969cb81495a4e2d01d22eacd39f248db78a40f3d8d714 -size 4075 +oid sha256:8be46ee399abf9577bb89126c7d7e0bca146dac9d0c5ce10b97086abe85b078c +size 3862 diff --git a/tests/cases/cep/cable_TTP_1d/svFSI.xml b/tests/cases/cep/cable_TTP_1d/svFSI.xml index ecbc76c6..5f0dfc95 100644 --- a/tests/cases/cep/cable_TTP_1d/svFSI.xml +++ b/tests/cases/cep/cable_TTP_1d/svFSI.xml @@ -31,8 +31,8 @@ true 1 - 5 - 1e-6 + 2 + 1e-12 TTP @@ -58,7 +58,7 @@ 100 - 1e-6 + 1e-12 50 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_BICG_CN_epicardium_BO_001.vtu b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_BICG_CN_epicardium_BO_001.vtu index 03842bc3..4e7b6e6c 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_BICG_CN_epicardium_BO_001.vtu +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_BICG_CN_epicardium_BO_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6af5a1ba655072991230391acabfddff4cb3a34b0a5c81241ee4a311aa550fe3 -size 8305950 +oid sha256:5ca618669a71038a1385eb16a483d0d4ac1b4213df67a15d59b0522d47f8ac71 +size 8238606 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_CG_RK4_myocardium_BO_001.vtu b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_CG_RK4_myocardium_BO_001.vtu index 91f6d532..4cdc28a4 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_CG_RK4_myocardium_BO_001.vtu +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_CG_RK4_myocardium_BO_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd7cc1fa1369a3965e615577e1f9c584cd794013794cf0d1077217a19b2ac88f -size 8279618 +oid sha256:94e247849b57f1feac14e3cde7c52af13b4112751a41a7320754b91da1c8f7cd +size 8282430 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_epicardium_TTP_001.vtu b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_epicardium_TTP_001.vtu index 8d8a62f7..ecd13e8b 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_epicardium_TTP_001.vtu +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_epicardium_TTP_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a3b96e0e8fad864daeda38acf5fbe46a0db55a054a60b7c28542ec94d258098 -size 8288167 +oid sha256:862e6a065fc065f25169b9b0ca220e4e4ea70ab461d0eae68bb38435fcb8b729 +size 8224038 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_pfib_AP_001.vtu b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_pfib_AP_001.vtu index 05deeb85..a7a017b4 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_pfib_AP_001.vtu +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/result_GMRES_FE_pfib_AP_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d044cb38f9578ec54541e5097674dbce5b06bd7b8fd7b5f56ae36f78590c770e -size 8286611 +oid sha256:a38f51e854c188ffee9a4e893de80fc5bb617d93ac68112d587ca75aef172d38 +size 8301266 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_BICG_CN_epicardium_BO.xml b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_BICG_CN_epicardium_BO.xml index dd22ab3c..575b28aa 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_BICG_CN_epicardium_BO.xml +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_BICG_CN_epicardium_BO.xml @@ -68,7 +68,7 @@ true 1 1 - 1e-6 + 1e-12 BO @@ -105,7 +105,7 @@ 100 - 1e-6 + 1e-12 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_CG_RK4_myocardium_BO.xml b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_CG_RK4_myocardium_BO.xml index bd01f38e..255f4e31 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_CG_RK4_myocardium_BO.xml +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_CG_RK4_myocardium_BO.xml @@ -68,7 +68,7 @@ true 1 1 - 1e-6 + 1e-12 BO @@ -105,7 +105,7 @@ svfsi - 1e-6 + 1e-12 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_epicardium_TTP.xml b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_epicardium_TTP.xml index e9aeb8fe..fe6aa6eb 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_epicardium_TTP.xml +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_epicardium_TTP.xml @@ -68,7 +68,7 @@ true 1 1 - 1e-6 + 1e-12 TTP @@ -117,7 +117,7 @@ 100 - 1e-6 + 1e-12 50 diff --git a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_pfib_AP.xml b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_pfib_AP.xml index b1bd2111..31745800 100644 --- a/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_pfib_AP.xml +++ b/tests/cases/cep/niederer_benchmark_ECGs_quadrature/svFSI_GMRES_FE_pfib_AP.xml @@ -68,7 +68,7 @@ true 1 1 - 1e-6 + 1e-12 AP @@ -105,7 +105,7 @@ 100 - 1e-6 + 1e-12 50 diff --git a/tests/cases/cep/purkinje/result_001.vtu b/tests/cases/cep/purkinje/result_001.vtu index 9fb9be7f..66163a3e 100644 --- a/tests/cases/cep/purkinje/result_001.vtu +++ b/tests/cases/cep/purkinje/result_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd457cc3a4b72665dfbc0814b22071f7b2fbe718b0a11a3b52e32a8793ff5c84 -size 722384 +oid sha256:1bf39effdb55cf6f0ee63645720a788c869b6eeba3dc23c044cc15321e2c0eef +size 718891 diff --git a/tests/cases/cep/purkinje/svFSI.xml b/tests/cases/cep/purkinje/svFSI.xml index ae779e9d..0209f2ca 100644 --- a/tests/cases/cep/purkinje/svFSI.xml +++ b/tests/cases/cep/purkinje/svFSI.xml @@ -39,8 +39,8 @@ true 1 - 3 - 1e-6 + 2 + 1e-12 TTP @@ -68,7 +68,7 @@ 100 - 1e-6 + 1e-12 50 diff --git a/tests/cases/cep/spiral_BO_2d/result_001.vtu b/tests/cases/cep/spiral_BO_2d/result_001.vtu index 32fd4a4f..9e3dab81 100644 --- a/tests/cases/cep/spiral_BO_2d/result_001.vtu +++ b/tests/cases/cep/spiral_BO_2d/result_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e05fcc0004f38abef3eede2d4a8e9b62f4e33269886d9f3bbcddc0d49f8ed72 -size 14228715 +oid sha256:9cf7d9d6e416ac49dd62c09683677bcfa4673d0d027a33ec23f0e0b248ac144a +size 14201942 diff --git a/tests/cases/cep/spiral_BO_2d/svFSI.xml b/tests/cases/cep/spiral_BO_2d/svFSI.xml index f83bd5e1..ad9b3daa 100644 --- a/tests/cases/cep/spiral_BO_2d/svFSI.xml +++ b/tests/cases/cep/spiral_BO_2d/svFSI.xml @@ -49,8 +49,8 @@ true 1 - 5 - 1e-4 + 2 + 1e-12 BO @@ -88,7 +88,7 @@ rcs - 1e-6 + 1e-12 diff --git a/tests/cases/cep/square_AP_2d/result_001.vtu b/tests/cases/cep/square_AP_2d/result_001.vtu index e8ff19f1..3c45cb1c 100644 --- a/tests/cases/cep/square_AP_2d/result_001.vtu +++ b/tests/cases/cep/square_AP_2d/result_001.vtu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60bc623969a212be4f5e87be73a614329489d3f587e5c07fe1970ececee23c24 -size 2180579 +oid sha256:61e7da67b5f90550dbbf3fbeef101f45494e5de92f0db1b536f26a92f8b3ef36 +size 2174946 diff --git a/tests/cases/cep/square_AP_2d/svFSI.xml b/tests/cases/cep/square_AP_2d/svFSI.xml index aac2d66f..5d48cf1d 100644 --- a/tests/cases/cep/square_AP_2d/svFSI.xml +++ b/tests/cases/cep/square_AP_2d/svFSI.xml @@ -49,8 +49,8 @@ true 1 - 4 - 1e-4 + 2 + 1e-12 AP @@ -75,7 +75,7 @@ fsils - 1e-6 + 1e-12