Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realthunder branch #73

Merged
merged 17 commits into from
Nov 23, 2023
105 changes: 50 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,165 +1,160 @@
name: Workflow
name: Build Project

on:
push:
branches:
- '*'
branches: ['*']
pull_request:
branches:
- '*'
branches: ['*']
release:
types: [published]
jobs:

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"
shell: pwsh
run: |
conda init --all
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
use-mamba: true
channels: conda-forge

- name: "Install conda build"
shell: pwsh
run: conda install -c conda-forge conda-build
run: mamba install conda-build python-patch

- name: "Check conda"
shell: pwsh
run: |
conda info -a
conda list

- name: Prepare sources
- name: "Install Linux Dependencies"
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: |
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 --output-folder conda

- name: "Upload conda package"
uses: actions/upload-artifact@v2
with:
name: smesh-${{ matrix.os }}
path: conda

build_win:
build_osx:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-latest']
os: ['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"
shell: bash -l {0}
run: |
conda init --all
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
use-mamba: true
channels: conda-forge

- name: "Install conda build"
shell: bash -l {0}
run: conda install -c conda-forge conda-build
shell: sh -l {0}
run: mamba install conda-build python-patch

- name: "Check conda"
shell: bash -l {0}
shell: sh -l {0}
run: |
conda info -a
conda list

- name: Prepare sources
shell: bash -l {0}
- name: "Prepare sources"
shell: sh -l {0}
run: |
conda activate
conda install -c conda-forge python-patch
python prepare.py

- name: "Run conda build"
shell: bash -l {0}
shell: sh -l {0}
run: |
mkdir conda
source activate
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
with:
name: smesh-${{ matrix.os }}
path: conda

build_macos:
build_windows:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['macos-latest']
os: ['windows-latest']

steps:

- name: "Clone SMESH"
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: "Configure conda"
shell: pwsh
run: |
conda init --all
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
use-mamba: true
channels: conda-forge

- name: "Install conda build"
shell: pwsh
run: conda install -c conda-forge conda-build
shell: sh -l {0}
run: mamba install conda-build python-patch

- name: "Check conda"
shell: pwsh
shell: sh -l {0}
run: |
conda info -a
conda list

- name: Prepare sources
shell: pwsh
- name: "Prepare sources"
shell: sh -l {0}
run: |
conda activate
conda install -c conda-forge python-patch
python prepare.py

- name: "Run conda build"
shell: pwsh
shell: sh -l {0}
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
with:
name: smesh-${{ matrix.os }}
path: conda

24 changes: 14 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions ci/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: smesh4pyocct
version: "9.8.0.2"
version: "9.9.0.0"

source:
path: ../..
Expand All @@ -18,15 +18,15 @@ requirements:
- ninja

host:
- occt ==7.6
- occt
- boost-cpp
- tbb-devel
- vtk
- zlib
- pthreads-win32 # [win]

run:
- occt ==7.6
- {{ pin_compatible('occt', max_pin='x.x.x') }}
trelau marked this conversation as resolved.
Show resolved Hide resolved
- vtk
- boost-cpp
- zlib
Expand All @@ -49,7 +49,7 @@ test:
- {{ cdt('libxxf86vm') }} # [linux]
- cmake
- ninja
- catch2
- catch2 < 3.0

about:
home: https://github.com/trelau/SMESH
Expand Down
11 changes: 11 additions & 0 deletions patch/SMESH_swap_bool_vector.patch
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 5 additions & 1 deletion prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import patch


def prepare_netgen():
"""
Prepare sources for Netgen.
Expand Down Expand Up @@ -154,6 +153,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)
Expand Down
Loading