From 0f58a15e90212b865013bb8a7fd92467ec9e783e Mon Sep 17 00:00:00 2001 From: lorenz Date: Wed, 3 Aug 2022 10:25:39 +0200 Subject: [PATCH 01/17] pin catch2, update to 9.9 --- ci/conda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/conda/meta.yaml b/ci/conda/meta.yaml index 3df58d9..3b4e176 100644 --- a/ci/conda/meta.yaml +++ b/ci/conda/meta.yaml @@ -1,6 +1,6 @@ package: name: smesh4pyocct - version: "9.8.0.2" + version: "9.9.0.0" source: path: ../.. @@ -49,7 +49,7 @@ test: - {{ cdt('libxxf86vm') }} # [linux] - cmake - ninja - - catch2 + - catch2 < 3.0 about: home: https://github.com/trelau/SMESH From 5fbf9f29887d7bbb804877dc7f385e58f1066409 Mon Sep 17 00:00:00 2001 From: lorenz Date: Wed, 3 Aug 2022 10:28:00 +0200 Subject: [PATCH 02/17] pin Salome version 9.9 for submodules --- .gitmodules | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index 877ad5f..309681d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,16 +1,20 @@ [submodule "external/Netgen"] - path = external/Netgen - url = https://github.com/NGSolve/netgen.git + path = external/Netgen + url = https://github.com/NGSolve/netgen.git branch = netgen-5.3 [submodule "external/NETGENPlugin"] - path = external/NETGENPlugin - url = https://git.salome-platform.org/gitpub/plugins/netgenplugin.git + path = external/NETGENPlugin + url = https://git.salome-platform.org/gitpub/plugins/netgenplugin.git + branch = V9_9_0 [submodule "external/SMESH"] - path = external/SMESH - url = https://git.salome-platform.org/gitpub/modules/smesh.git + path = external/SMESH + url = https://git.salome-platform.org/gitpub/modules/smesh.git + branch = V9_9_0 [submodule "external/Kernel"] - path = external/Kernel - url = https://git.salome-platform.org/gitpub/modules/kernel.git + path = external/Kernel + url = https://git.salome-platform.org/gitpub/modules/kernel.git + branch = V9_9_0 [submodule "external/Geom"] - path = external/Geom - url = https://git.salome-platform.org/gitpub/modules/geom.git + path = external/Geom + url = https://git.salome-platform.org/gitpub/modules/geom.git + branch = V9_9_0 From a70b678c15455e1a986f2a84bc9f2af005b95482 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 15 May 2023 06:05:23 +0800 Subject: [PATCH 03/17] Add SMESH patch --- patch/SMESH_swap_bool_vector.patch | 11 +++++++++++ prepare.py | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 patch/SMESH_swap_bool_vector.patch diff --git a/patch/SMESH_swap_bool_vector.patch b/patch/SMESH_swap_bool_vector.patch new file mode 100644 index 0000000..cfbdc5a --- /dev/null +++ b/patch/SMESH_swap_bool_vector.patch @@ -0,0 +1,11 @@ +--- a/src/SMESH/SMESH_MeshEditor.cxx 2023-05-13 20:04:14.611798489 +0800 ++++ b/src/SMESH/SMESH_MeshEditor.cxx 2023-05-15 05:58:50.875607024 +0800 +@@ -4307,7 +4307,7 @@ + std::swap( itNN[0], itNN[1] ); + std::swap( prevNod[0], prevNod[1] ); + std::swap( nextNod[0], nextNod[1] ); +- std::swap( isSingleNode[0], isSingleNode[1] ); ++ isSingleNode.swap( isSingleNode[0], isSingleNode[1] ); + if ( nbSame > 0 ) + sames[0] = 1 - sames[0]; + iNotSameNode = 1 - iNotSameNode; diff --git a/prepare.py b/prepare.py index 57768a2..72ac2d8 100644 --- a/prepare.py +++ b/prepare.py @@ -154,6 +154,11 @@ def prepare_smesh(): if not success: raise RuntimeError('Failed to apply StdMeshers_ViscousLayers patch.') + pset = patch.fromfile('patch/SMESH_swap_bool_vector.patch') + success = pset.apply(strip=0, root='src/SMESH') + if not success: + raise RuntimeError('Failed to apply SMESH_swap_bool_vector patch.') + # Copy MeshVSLink sources shutil.copytree('extra/MeshVSLink', 'src/SMESH/src/MeshVSLink', dirs_exist_ok=True) From 531dd7c578acbb3672b1e19296aba41d28e1d09d Mon Sep 17 00:00:00 2001 From: lorenz Date: Sat, 18 Nov 2023 18:54:40 +0100 Subject: [PATCH 04/17] GitHub action: conda-incubator/setup-miniconda@v2 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fd393f..1369ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: sudo apt-get install libxext-dev sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - - name: "Configure conda" - shell: pwsh - run: | - conda init --all + - name: "Configure conda" + uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true - name: "Install conda build" shell: pwsh From 89e122895cadbd66107a18944e470978576141d5 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sat, 18 Nov 2023 20:39:59 +0100 Subject: [PATCH 05/17] github-action: use Conda-incubator --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1369ce9..61abefc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,9 +82,9 @@ jobs: run: echo "$CONDA/Scripts" >> $GITHUB_PATH - name: "Configure conda" - shell: bash -l {0} - run: | - conda init --all + uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true - name: "Install conda build" shell: bash -l {0} @@ -131,9 +131,9 @@ jobs: submodules: 'recursive' - name: "Configure conda" - shell: pwsh - run: | - conda init --all + uses: conda-incubator/setup-miniconda@v2 + with: + auto-activate-base: true - name: "Install conda build" shell: pwsh From 63ba360571f707f12216f2d5b5d26b61b0806e83 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sat, 18 Nov 2023 20:56:01 +0100 Subject: [PATCH 06/17] loose oct-restriction --- ci/conda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/conda/meta.yaml b/ci/conda/meta.yaml index 3b4e176..68514cc 100644 --- a/ci/conda/meta.yaml +++ b/ci/conda/meta.yaml @@ -18,7 +18,7 @@ requirements: - ninja host: - - occt ==7.6 + - occt - boost-cpp - tbb-devel - vtk @@ -26,7 +26,7 @@ requirements: - pthreads-win32 # [win] run: - - occt ==7.6 + - {{ pin_compatible('occt', max_pin='x.x.x') }} - vtk - boost-cpp - zlib From 989b122fe4395774faadb0788641d5b4c852fe65 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sat, 18 Nov 2023 21:06:42 +0100 Subject: [PATCH 07/17] refactor GitHub-action file --- .github/workflows/ci.yml | 135 ++++----------------------------------- 1 file changed, 14 insertions(+), 121 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61abefc..97690fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,162 +1,55 @@ -name: Workflow +name: Build Project + on: push: - branches: - - '*' + branches: ['*'] pull_request: - branches: - - '*' + branches: ['*'] release: types: [published] -jobs: - - build_linux: - name: Build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ['ubuntu-latest'] - steps: - - - name: "Clone SMESH" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: "Fix dependencies" - run: | - sudo apt-get install libxext-dev - sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - - - name: "Configure conda" - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - - - name: "Install conda build" - shell: pwsh - run: conda install -c conda-forge conda-build - - - name: "Check conda" - shell: pwsh - run: | - conda info -a - conda list - - - name: Prepare sources - shell: pwsh - run: | - conda activate - conda install -c conda-forge python-patch - python prepare.py - - - name: "Run conda build" - shell: pwsh - run: | - mkdir conda - conda build ci/conda -c conda-forge --output-folder conda - - - name: "Upload conda package" - uses: actions/upload-artifact@v2 - with: - name: smesh-${{ matrix.os }} - path: conda - build_win: - name: Build (${{ matrix.os }}) +jobs: + build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ['windows-latest'] + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + steps: - - name: "Clone SMESH" uses: actions/checkout@v2 with: submodules: 'recursive' - - name: "Add conda to PATH" - shell: bash -l {0} - run: echo "$CONDA/Scripts" >> $GITHUB_PATH - - name: "Configure conda" uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - name: "Install conda build" - shell: bash -l {0} run: conda install -c conda-forge conda-build - name: "Check conda" - shell: bash -l {0} run: | conda info -a conda list - - name: Prepare sources - shell: bash -l {0} + - name: "Install Linux Dependencies" + if: matrix.os == 'ubuntu-latest' run: | - conda activate - conda install -c conda-forge python-patch - python prepare.py - - - name: "Run conda build" - shell: bash -l {0} - run: | - mkdir conda - source activate - conda build ci/conda -c conda-forge --output-folder conda - - - name: "Upload conda package" - uses: actions/upload-artifact@v2 - with: - name: smesh-${{ matrix.os }} - path: conda - - build_macos: - name: Build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ['macos-latest'] - steps: - - - name: "Clone SMESH" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: "Configure conda" - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - - - name: "Install conda build" - shell: pwsh - run: conda install -c conda-forge conda-build - - - name: "Check conda" - shell: pwsh - run: | - conda info -a - conda list + sudo apt-get install -y libxext-dev + sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - - name: Prepare sources - shell: pwsh + - name: "Prepare sources" run: | - conda activate conda install -c conda-forge python-patch python prepare.py - name: "Run conda build" - shell: pwsh run: | mkdir conda - conda build ci/conda -c conda-forge --output-folder conda + conda build ci/conda -c conda-forge --output-folder conda - name: "Upload conda package" uses: actions/upload-artifact@v2 From fa90a9f23898cac7cf99972b3349b728d3fcc3c1 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 15:03:24 +0100 Subject: [PATCH 08/17] Add debug info --- prepare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare.py b/prepare.py index 72ac2d8..1364ba4 100644 --- a/prepare.py +++ b/prepare.py @@ -2,7 +2,7 @@ import shutil import patch - +print("debug: which patch library is loaded? " + patch.__file__) def prepare_netgen(): """ From 48958fc998ca3da10f5f57fbfbd6c8e791ab5b7e Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 15:46:05 +0100 Subject: [PATCH 09/17] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97690fe..17067c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,8 @@ jobs: auto-activate-base: true - name: "Install conda build" - run: conda install -c conda-forge conda-build + run: conda install -c conda-forge conda-build python-patch + - name: "Check conda" run: | @@ -43,7 +44,6 @@ jobs: - name: "Prepare sources" run: | - conda install -c conda-forge python-patch python prepare.py - name: "Run conda build" From 75a2ee64dca87776296a6ea98c9a772c1aab4ee3 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 15:58:18 +0100 Subject: [PATCH 10/17] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17067c4..6d2b1e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,13 @@ jobs: - name: "Configure conda" uses: conda-incubator/setup-miniconda@v2 - with: + with: auto-activate-base: true + activate-environment: test - name: "Install conda build" run: conda install -c conda-forge conda-build python-patch - - name: "Check conda" run: | conda info -a From 45778c44e55e015417d4fed01cbcc0eb82802547 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 16:06:01 +0100 Subject: [PATCH 11/17] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d2b1e2..309eae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - activate-environment: test + activate-environment: "" - name: "Install conda build" run: conda install -c conda-forge conda-build python-patch From c75a91ee32738d57ab5e4cd649116cb0e96873e4 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 16:28:06 +0100 Subject: [PATCH 12/17] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 309eae3..94f4342 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - activate-environment: "" + activate-environment: "base" - name: "Install conda build" run: conda install -c conda-forge conda-build python-patch From fb380bb236ccd53dbc050cd053c466ad531d30ad Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 18:44:13 +0100 Subject: [PATCH 13/17] Update ci.yml --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94f4342..163faf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,11 +25,12 @@ jobs: - name: "Configure conda" uses: conda-incubator/setup-miniconda@v2 with: - auto-activate-base: true - activate-environment: "base" + miniforge-version: latest + use-mamba: true + channels: conda-forge - name: "Install conda build" - run: conda install -c conda-forge conda-build python-patch + run: mamba install conda-build python-patch - name: "Check conda" run: | @@ -49,7 +50,7 @@ jobs: - name: "Run conda build" run: | mkdir conda - conda build ci/conda -c conda-forge --output-folder conda + conda build ci/conda --output-folder conda - name: "Upload conda package" uses: actions/upload-artifact@v2 From f8326e6debdc9210ee8d6bffba92e816be6726d8 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sun, 19 Nov 2023 19:20:21 +0100 Subject: [PATCH 14/17] Update ci.yml --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 163faf3..8ffd797 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,11 @@ jobs: channels: conda-forge - name: "Install conda build" - run: mamba install conda-build python-patch + shell: sh -l {0} + run: mamba install conda-build python-patch - name: "Check conda" + shell: sh -l {0} run: | conda info -a conda list @@ -44,10 +46,12 @@ jobs: sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - name: "Prepare sources" + shell: sh -l {0} run: | python prepare.py - name: "Run conda build" + shell: sh -l {0} run: | mkdir conda conda build ci/conda --output-folder conda From 094b63f314cb1d34f59c9c761497459bcdddc20f Mon Sep 17 00:00:00 2001 From: lorenz Date: Tue, 21 Nov 2023 19:22:03 +0100 Subject: [PATCH 15/17] Update ci.yml --- .github/workflows/ci.yml | 104 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ffd797..d16fc5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,12 @@ on: types: [published] jobs: - build: + build_linux: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + os: ['ubuntu-latest'] steps: - name: "Clone SMESH" @@ -30,21 +30,67 @@ jobs: channels: conda-forge - name: "Install conda build" - shell: sh -l {0} + shell: pwsh run: mamba install conda-build python-patch - name: "Check conda" - shell: sh -l {0} + shell: pwsh run: | conda info -a conda list - name: "Install Linux Dependencies" - if: matrix.os == 'ubuntu-latest' run: | sudo apt-get install -y libxext-dev sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 + - name: "Prepare sources" + shell: pwsh + run: | + python prepare.py + + - name: "Run conda build" + shell: pwsh + run: | + mkdir conda + conda build ci/conda --output-folder conda + + - name: "Upload conda package" + uses: actions/upload-artifact@v2 + with: + name: smesh-${{ matrix.os }} + path: conda + + build_osx: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['macos-latest'] + + steps: + - name: "Clone SMESH" + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: "Configure conda" + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-version: latest + use-mamba: true + channels: conda-forge + + - name: "Install conda build" + shell: sh -l {0} + run: mamba install conda-build python-patch + + - name: "Check conda" + shell: sh -l {0} + run: | + conda info -a + conda list + - name: "Prepare sources" shell: sh -l {0} run: | @@ -61,3 +107,51 @@ jobs: with: name: smesh-${{ matrix.os }} path: conda + + build_windows: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['windows-latest'] + + steps: + - name: "Clone SMESH" + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: "Configure conda" + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-version: latest + use-mamba: true + channels: conda-forge + + - name: "Install conda build" + shell: sh -l {0} + run: mamba install conda-build python-patch + + - name: "Check conda" + shell: sh -l {0} + run: | + conda info -a + conda list + + - name: "Prepare sources" + shell: sh -l {0} + run: | + python prepare.py + + - name: "Run conda build" + shell: sh -l {0} + run: | + mkdir conda + conda build ci/conda --output-folder conda + + - name: "Upload conda package" + uses: actions/upload-artifact@v2 + with: + name: smesh-${{ matrix.os }} + path: conda + From 404994b2507a215be1e5f5a43cf37034bdd76700 Mon Sep 17 00:00:00 2001 From: lorenz Date: Wed, 22 Nov 2023 20:04:36 +0100 Subject: [PATCH 16/17] Update ci.yml --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d16fc5c..91a2996 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: jobs: build_linux: + name: Build (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -62,6 +63,7 @@ jobs: path: conda build_osx: + name: Build (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -109,6 +111,7 @@ jobs: path: conda build_windows: + name: Build (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false From e8f813ec8980ff7edb9499a195a167b0466b8a17 Mon Sep 17 00:00:00 2001 From: lorenz Date: Thu, 23 Nov 2023 20:04:11 +0100 Subject: [PATCH 17/17] Update prepare.py --- prepare.py | 1 - 1 file changed, 1 deletion(-) diff --git a/prepare.py b/prepare.py index 1364ba4..e3112b6 100644 --- a/prepare.py +++ b/prepare.py @@ -2,7 +2,6 @@ import shutil import patch -print("debug: which patch library is loaded? " + patch.__file__) def prepare_netgen(): """