diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1db65889..0a447c5b 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,8 +13,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 + VTK_VERSION_MINOR: 3 + VTK_VERSION_PATCH: 1 jobs: create_release: diff --git a/.github/workflows/python-wheels-emulated.yml b/.github/workflows/python-wheels-emulated.yml index c3144449..1059faa8 100644 --- a/.github/workflows/python-wheels-emulated.yml +++ b/.github/workflows/python-wheels-emulated.yml @@ -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,17 +39,22 @@ 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 && @@ -42,13 +62,14 @@ jobs: 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/actions-download-file@v1.6.0 + 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/actions-download-file@v1.6.0 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/actions-download-file@v1.6.0 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/actions-download-file@v1.6.0 + 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: diff --git a/.github/workflows/python-wheels-test.yml b/.github/workflows/python-wheels-test.yml new file mode 100644 index 00000000..0c959706 --- /dev/null +++ b/.github/workflows/python-wheels-test.yml @@ -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 diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 9eaf8b8c..63701445 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -6,13 +6,6 @@ on: permissions: write-all -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 - jobs: build_wheels: name: Build Python wheels x86_64 @@ -69,10 +62,18 @@ jobs: name: Build MacOS_x86_64 uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master with: - os: '["macOS-latest"]' + os: '["macOS-13"]' arch: "x86_64" secrets: inherit + build_MacOS_arm64: + name: Build MacOS_arm64 + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master + with: + os: '["macOS-14"]' + arch: "arm64" + secrets: inherit + build_Linux_i686: name: Build Linux_i686 uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-emulated.yml@master @@ -105,9 +106,36 @@ jobs: arch: "s390x" secrets: inherit + test_Linux_x86_64: + name: Test Linux_x86_64 + needs: [build_Linux_x86_64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["ubuntu-22.04"]' + arch: "x86_64" + secrets: inherit + + test_Windows_AMD64: + name: Test Windows_AMD64 + needs: [build_Windows_AMD64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["windows-latest"]' + arch: "AMD64" + secrets: inherit + + test_MacOS_arm64: + name: Test MacOS_arm64 + needs: [build_MacOS_arm64] + uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-test.yml@master + with: + os: '["macOS-14"]' + arch: "arm64" + secrets: inherit + publish: runs-on: ${{ matrix.os }} - needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x] + needs: [build_wheels, build_Linux_x86_64, build_Windows_AMD64, build_MacOS_x86_64, build_MacOS_arm64, build_Linux_i686, build_Linux_aarch64, build_Linux_ppc64le, build_Linux_s390x, test_Linux_x86_64, test_Windows_AMD64, test_MacOS_arm64] strategy: matrix: os: [ubuntu-22.04] diff --git a/.github/workflows/python-wrapper.yml b/.github/workflows/python-wrapper.yml index ed80d237..9b3191dc 100644 --- a/.github/workflows/python-wrapper.yml +++ b/.github/workflows/python-wrapper.yml @@ -13,8 +13,8 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release VTK_VERSION_MAJOR: 9 - VTK_VERSION_MINOR: 2 - VTK_VERSION_PATCH: 6 + VTK_VERSION_MINOR: 3 + VTK_VERSION_PATCH: 1 jobs: test: diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b92da1..2cdd5889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.6...v) (2024-08-23) + +### Bug Fixes + +* **ci:** Ignore MUSLLinux wheels when testing ([63698bd](https://github.com/core-marine-dev/MoorDyn/commit/63698bd87f4224c8d062f4b3b732b2f52e5dbeef)) +* **ci:** List of dependencies to publish a package ([2c9ea79](https://github.com/core-marine-dev/MoorDyn/commit/2c9ea79d89002287bc0e718dcd433b9c891a3b92)) +* **ci:** Remove the MUSLLinux wheels before testing ([20a35bf](https://github.com/core-marine-dev/MoorDyn/commit/20a35bf0ad51f4500b84b03e266848f503665720)) +* **ci:** Removed unused env variables ([584bda5](https://github.com/core-marine-dev/MoorDyn/commit/584bda5581864d779d467875ee2b1a459cab8b91)) +* **ci:** Setting the VTK version ([3be2478](https://github.com/core-marine-dev/MoorDyn/commit/3be24786c21753f8aaba898ee4bdf551ca3196af)) +* **ci:** The VTK tar.gz can be directly extracted on MacOS ([9422fb2](https://github.com/core-marine-dev/MoorDyn/commit/9422fb21063254dc3e943f5a8b0399341aed491b)) +* **ci:** Update to VTK-9.3.1 ([154ab66](https://github.com/core-marine-dev/MoorDyn/commit/154ab66d5d7442ad15fd31a855577a848f91f5a9)) +* **ci:** Use directly the VTK version placeholders ([e528054](https://github.com/core-marine-dev/MoorDyn/commit/e5280542245ae5e7617aafb011c0f0f7a85cf7f9)) +* **ci:** Wrong VTK URI ([6ef95f9](https://github.com/core-marine-dev/MoorDyn/commit/6ef95f92ab826f8f4e09661728a54f7d6cb3d870)) +* **python-wheels:** Test the wheels ([f534b48](https://github.com/core-marine-dev/MoorDyn/commit/f534b48bd9eb508b00e6ff102e62a7d84addea0a)) +* **python:** Avoid using brew on MacOS-13 statically linking VTK ([a521444](https://github.com/core-marine-dev/MoorDyn/commit/a521444281e9117c09135640f49154c2d3d0a18a)) +* **python:** Enable MUSLLinux builds ([7f20dab](https://github.com/core-marine-dev/MoorDyn/commit/7f20dab357b8863320d35bee1723f21099900023)) +* **python:** Enable pypy builds again ([224f8e4](https://github.com/core-marine-dev/MoorDyn/commit/224f8e4f31271a96b6a4ef170d8337d252305cb7)) +* **python:** Set the install name id on MacOS ([32a9fca](https://github.com/core-marine-dev/MoorDyn/commit/32a9fcae8a8aee0558c632fe236f92d9e6bfda8d)) +* **python:** Set the MACOSX_DEPLOYMENT_TARGET to 10.15 ([f44e9c4](https://github.com/core-marine-dev/MoorDyn/commit/f44e9c4df1c1c9645d1a08255f16722baa519188)) +* **python:** Use the MUSLLinux VTK compilation when needed ([e5fe619](https://github.com/core-marine-dev/MoorDyn/commit/e5fe6190d5fdc67f6bb48c3fc7133a6ed5c5a4ec)) ## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.5...v) (2024-08-14) ### Bug Fixes diff --git a/CMakeLists.txt b/CMakeLists.txt index cac2ca2d..f6c7492d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) set(MOORDYN_MAJOR_VERSION 2) set(MOORDYN_MINOR_VERSION 3) -set(MOORDYN_PATCH_VERSION 6) +set(MOORDYN_PATCH_VERSION 7) set(MOORDYN_VERSION ${MOORDYN_MAJOR_VERSION}.${MOORDYN_MINOR_VERSION}) project(Moordyn VERSION ${MOORDYN_VERSION})