forked from FloatingArrayDesign/MoorDyn
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request FloatingArrayDesign#248 from FloatingArrayDesign/dev
Release v2.3.7
- Loading branch information
Showing
7 changed files
with
159 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,21 @@ on: | |
description: 'Architecture target' | ||
required: true | ||
type: string | ||
vtk_major: | ||
description: 'VTK major version' | ||
required: false | ||
type: string | ||
default: '9' | ||
vtk_minor: | ||
description: 'VTK minor version' | ||
required: false | ||
type: string | ||
default: '3' | ||
vtk_patch: | ||
description: 'VTK patch version' | ||
required: false | ||
type: string | ||
default: '1' | ||
|
||
permissions: write-all | ||
|
||
|
@@ -24,31 +39,37 @@ jobs: | |
os: ${{ fromJSON(inputs.os) }} | ||
env: | ||
# Skip 32-bit windows wheels builds. | ||
CIBW_SKIP: "*-win32* *musllinux* pp38* pp39* pp310*" | ||
CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-*" | ||
CIBW_ARCHS: ${{inputs.arch}} | ||
CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib" | ||
CIBW_BEFORE_ALL_LINUX: > | ||
echo "Considering vtk-manylinux2014_`uname -m`.tar.gz..." && | ||
if pip debug --verbose | grep -q 'musllinux'; then | ||
DISTRO=musllinux_1_2 | ||
else | ||
DISTRO=manylinux2014 | ||
fi && | ||
echo "Considering vtk-${DISTRO}_`uname -m`.tar.gz..." && | ||
mkdir -p vtk && | ||
tar -xvzf vtk-manylinux2014_`uname -m`.tar.gz -C vtk/ && | ||
tar -xvzf vtk-${DISTRO}_`uname -m`.tar.gz -C vtk/ && | ||
if [ -d "vtk/lib" ]; then | ||
VTK_DIR=vtk/lib/cmake/vtk-9.2/ | ||
VTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} | ||
else | ||
VTK_DIR=vtk/lib64/cmake/vtk-9.2/ | ||
VTK_DIR=vtk/lib64/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} | ||
fi && | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=$VTK_DIR -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && | ||
cmake --build build --config Release && | ||
cmake --install build --config Release && | ||
rm -rf docs extern source tests | ||
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" | ||
CIBW_BEFORE_ALL_WINDOWS: > | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-9.2/ -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF && | ||
cmake --build build --config Release && | ||
cmake --install build --config Release && | ||
rm -rf docs extern source tests | ||
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}" | ||
CIBW_ENVIRONMENT_MACOS: 'MACOSX_DEPLOYMENT_TARGET="10.15"' | ||
CIBW_BEFORE_ALL_MACOS: > | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 && | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=ON -DVTK_DIR=vtk/lib/cmake/vtk-${{inputs.vtk_major}}.${{inputs.vtk_minor}} -DMOORDYN_PACKAGE_IGNORE_VTK_DEPENDENCY=ON -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_NAME_DIR:PATH=$(pwd)/install/lib && | ||
cmake --build build --config Release && | ||
cmake --install build --config Release && | ||
rm -rf docs extern source tests | ||
|
@@ -70,23 +91,32 @@ jobs: | |
cat pyproject.toml | ||
shell: bash | ||
|
||
- name: download pre-built VTK static library (Linux) | ||
- name: download pre-built VTK static library (ManyLinux) | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-manylinux2014_${{inputs.arch}}.tar.gz | ||
target: ${{github.workspace}}/ | ||
if: runner.os == 'Linux' | ||
|
||
- name: download pre-built VTK static library (MUSLLinux) | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-manylinux2014_${{inputs.arch}}.tar.gz | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-musllinux_1_2_${{inputs.arch}}.tar.gz | ||
target: ${{github.workspace}}/ | ||
if: runner.os == 'Linux' | ||
|
||
- name: download pre-built VTK static library (Windows) | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-9.2.6-static/vtk-Windows-x86_64.tar.gz | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-Windows-x86_64.tar.gz | ||
target: ${{github.workspace}}/ | ||
if: runner.os == 'Windows' | ||
|
||
- name: Install VTK (MacOS) | ||
run: | | ||
brew install vtk | ||
- name: download pre-built VTK static library (MacOS) | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{inputs.vtk_major}}.${{inputs.vtk_minor}}.${{inputs.vtk_patch}}-static/vtk-macOS-${{inputs.arch}}.tar.gz | ||
target: ${{github.workspace}}/ | ||
if: runner.os == 'MacOS' | ||
|
||
- name: Create folders | ||
|
@@ -100,6 +130,11 @@ jobs: | |
tar -xvzf vtk-Windows-x86_64.tar.gz -C vtk/ | ||
if: runner.os == 'Windows' | ||
|
||
- name: Extract VTK tgz (MacOS) | ||
run: | | ||
tar -xvzf vtk-macOS-${{inputs.arch}}.tar.gz -C vtk/ | ||
if: runner.os == 'MacOS' | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Python-manylinux-arch | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: 'Host OS' | ||
required: false | ||
type: string | ||
default: '["ubuntu-22.04"]' | ||
arch: | ||
description: 'Architecture target' | ||
required: true | ||
type: string | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
test_wheels: | ||
name: Test Python wheels | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ${{ fromJSON(inputs.os) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Download the wheels | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist/ | ||
pattern: python-wheels-${{runner.os}}_${{inputs.arch}}* | ||
merge-multiple: true | ||
|
||
- name: Install and run | ||
run: | | ||
cd dist/ | ||
rm -f *musllinux*.whl | ||
pip debug --verbose | ||
ls -alh | ||
pip install $(ls *cp312*.whl) --break-system-packages | ||
cd ../tests | ||
python test_minimal.py | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters